-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating an interface with a symbol? #8099
Comments
Also, depending on the environment, that interface could be |
What I"m looking at here are specifically two future built-ins: |
Keep in mind, when imported through node definitions, the TypeScript compiler raises an error, because you cannot have ambient references as part of your source ( We had this at one point but it was causing errors so we backed it out. |
why not declare global {
SymbolConstructor {
observable: symbol;
}
} |
Because I'm a better JavaScript developer than I am a TypeScript expert? |
Good point @Blesh - I just filed this issue. |
because I didn't know that existed... I'll have to mess with that in a day or two. Thanks! |
No dice with |
@Blesh can you elaborate what issues you're running into? This works for me.
|
It complains at me:
|
I believe if you're using nightlies, you could avoid targeting ES6 and use |
logged #8102 for the error. |
What is this and how does it benefit us? |
@Blesh the nightly versions of TS let you do:
rather than providing say, es6-shim external defs (the above config is what's needed to use rxjs, currently) @DanielRosenwasser while Observable isn't part of the es6/es7 scope, its currently a stage1 proposal... does the |
closing in favor of #5579 |
TypeScript Version:
1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)
Code
or
Expected behavior:
I should be able to enforce types that have symbols on them, custom or otherwise.
Actual behavior:
I get really confused and go get myself a coffee.
The text was updated successfully, but these errors were encountered: