Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

interface 'Symbol' is not exported #148

Closed
taoqf opened this issue Apr 21, 2016 · 7 comments
Closed

interface 'Symbol' is not exported #148

taoqf opened this issue Apr 21, 2016 · 7 comments
Labels
Milestone

Comments

@taoqf
Copy link

taoqf commented Apr 21, 2016

typings/dojo-core/dojo-core-2.0.0-pre.d.ts(912,11): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(913,11): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(956,7): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(959,7): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(973,7): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(1020,11): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(1021,11): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(1035,7): error TS2304: Cannot find name 'Symbol'.
typings/dojo-core/dojo-core-2.0.0-pre.d.ts(1036,7): error TS2304: Cannot find name 'Symbol'.
@taoqf
Copy link
Author

taoqf commented Apr 21, 2016

this occurse when target is es5
"target": "es5",

"target": "es6",is ok

@kitsonk
Copy link
Member

kitsonk commented Apr 21, 2016

Because the Symbol can conflict with other declarations (like when targeting ES6) when consuming core while targeting es5 you need to have the typings/symbol-shim.d.ts included in your project as well as the [typings/dojo-core/dojo-core-2.0.0-pre.d.ts]. Eventually we will figure out a better way to do this or properly document it.

@kitsonk kitsonk closed this as completed Apr 21, 2016
@taoqf
Copy link
Author

taoqf commented May 25, 2016

when i upgrade dojo-core to alpha7, i find the file symbol-shim.d.ts is missing.
and i got the same error, again. what should i do? help me please @kitsonk

@taoqf
Copy link
Author

taoqf commented May 25, 2016

luckly, i have found the symbol-shim.d.ts and added to my typings

@kitsonk
Copy link
Member

kitsonk commented May 25, 2016

@taoqf yes, sorry... we migrated to typings/typings. We are now maintain this (and other typings) at dojo/typings.

The file is located here: symbol-shim.d.ts and you can also have this managed by "typings/typings" by adding the following entry to your typings.json:

{
  "globalDevDependencies": {
    "symbol-shim": "github:dojo/typings/custom/symbol-shim/symbol-shim.d.ts#9a0185f465a3febe2bb1ff3f1210f43e5f96c5d2"
  }
}

@kitsonk
Copy link
Member

kitsonk commented May 25, 2016

Also, note that in TypeScript 2, we should be able to declare the Symbol interface in dojo-core and not have have a conflict (see Microsoft/TypeScript#8696).

@taoqf
Copy link
Author

taoqf commented May 25, 2016

thanks

@dylans dylans added this to the 2016.05 milestone Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants