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
TypeScript compile error #35
Comments
Hi Ivan, Looks like it may be a lodash type definition issue - I've made an update in 7.0.0-alpha.6 to see if it fixes this (and also to improve the behaviour). Please take a look and let me know if it works for you or not. Regards, |
I'm a noob, tell me how to download alpha version from npm?
|
Hi Ivan, Almost there, the version separator is the '@' symbol, so this should work.
EDIT: Fixed typo - |
compile error lodash.d.ts 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) what is your lodash.d.ts version? |
That's really disappointing - let me take a look at the lodash typings file quickly, |
I change ext to load it =) ext is .ts lodash.d.txt P.S. i install iridium@7.0.0-alpha.6 version |
forOwn<T>(
object: Dictionary<T>,
iteratee?: DictionaryIterator<T, any>
): Dictionary<T>; you specify the context of the challenges of the third argument, and does not support the definition of typescript type this inside the function, in this this option at all missed. This error lodash.d this is fix error forOwn<T>(
object: Dictionary<T>,
iteratee?: DictionaryIterator<T, any>,
context?:any
): Dictionary<T>;
/**
* @see _.forOwn
*/
forOwn<T extends {}>(
object: T,
iteratee?: ObjectIterator<any, any>,
context?:any
): T; Please send it fix to the creators lodash.d cuz I do not know how to do it =) i noob on github |
Hi Ivan, I've put out 7.0.0-alpha.7 ( Regards, |
occur the same mistakes. I said what's the problem. It is that in lodash.d not described the third parameter of the function indicating the context, even in the most recent version lodash.d. If I remove the line in my script |
i use this https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/lodash/lodash.d.ts |
I see, I'm using this one, which I believe is a little more up to date: https://github.com/typed-typings/npm-lodash/blob/master/index.d.ts |
DefinitelyTyped has been deprecated in favour of https://github.com/typings/typings |
I did not know =) sorry. and you can not override the forOwn function types description manually in your script, not to depend on the version lodash.d? as a small hack |
omg "typings" is epic =)! Thank you, I have lived in darkness, let's close the ticket. but I also think that you should be somewhere in the documentation write depending on the framework files d.ts |
I probably could, and it may well be something I look at doing going forward, but for now the lodash implementation is nice and reliable. I actually should have checked that first, version 7 is the typings upgrade, while version 6 is using definitely typed. I'll make sure that there's a notice to that effect in the README when I'm ready to release 7.0.0 👍. Anyway, let me know if you run into any other issues, I'll do what I can to help out. |
TypeScript 1.8.10
head in index.ts
tsconfig.json
The text was updated successfully, but these errors were encountered: