-
Notifications
You must be signed in to change notification settings - Fork 37
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
Can't use Deferred as a type #16
Comments
Correct, the typing is wrong. |
The typings are namespaced, so your example could be fixed by simply adding the "dojo." namespace: interface SomeInterface {
dfd: dojo.Deferred<SomeType>;
} |
@bitranch but what I didn't realise is you can merge the types too... which makes it handy! I learned something new. |
True. But since he's importing from 'dojo/Deferred' setting the type in 'dojo/_base/Deferred' might not fix this particular issue. |
True... the change I pushed was related to what he mentioned he imported. Didn't realise he was importing from one but referring to another. |
Ok, I have rolled this out to I think everything we currently have in the repo that it applies to. |
Repro case
Problem
The repro case results in a
TS2304: Cannot find name 'Deferred'
compiler message for the usage ofDeferred
as type in the interface, but not for the usage as constructor in the function.Solution
Changing the declaration Deferred in
module.d.ts
tofixes the problem.
The text was updated successfully, but these errors were encountered: