-
Notifications
You must be signed in to change notification settings - Fork 425
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
Affecting the ES6 library #47
Comments
We should generate a new file dom.es6.d.ts, that include the definitions that contain es6-specific definitions. and we can wire it in the TS build in https://github.com/Microsoft/TypeScript/blob/master/Jakefile.js#L172 |
If it's in a separate file, won't there be conflicting definitions in the eventual lib.es6.d.ts output? In this case, the method signature changes depending on the language level. |
if the difference is only in the return types, then we need to to have two separate files that include all definitions. then the build can pick one or the other based on the language version. |
Perhaps I'm not properly explaining what I'm worried about. As I understand things, when I add to
So if there is a new file, say
...and that gets put into a Perhaps there could be an |
what i meant is to generate two files here, |
Is this fixed by microsoft/TypeScript#14053? |
Yes. we should just use |
Previously, these methods returned PromiseLike, even though the spec has always required them to return real Promises and browsers have always done so. According to #60, this was done in order to work around #47; now that #47 has been fixed, this workaround is obsolete. This generally should not be a breaking change since it is making the SubtleCrypto type contract stricter and that API is generally implemented by the platform, not by users.
I am attempting to update the WebCrypto interface definitions, where functions return Promises. If I declare these return values as Promises, tsc will fail to build. If I change this to PromiseLike, it builds fine, but if I am targeting es6 (or using the es6 library via other means), it would be nice to have the return values be actual Promises. Is there a way to specify separate signatures for es5 and es6 libraries?
The text was updated successfully, but these errors were encountered: