Sugar
Sugar copied to clipboard
Typescript definitions missing Constructor
It looks like the version of sugar.d.ts
I get through npmjs is missing the Constructor
definition for some types.
Error at node_modules/sugar-date/sugar.d.ts:48:18: Namespace 'sugarjs.Array' has no exported member 'Constructor'.
Error at node_modules/sugar-date/sugar.d.ts:50:24: Namespace 'sugarjs.Function' has no exported member 'Constructor'.
Error at node_modules/sugar-date/sugar.d.ts:52:20: Namespace 'sugarjs.Object' has no exported member 'Constructor'.
Error at node_modules/sugar-date/sugar.d.ts:53:20: Namespace 'sugarjs.RegExp' has no exported member 'Constructor'.
Error at node_modules/sugar-date/sugar.d.ts:54:20: Namespace 'sugarjs.String' has no exported member 'Constructor'.
I compared the version I get through npmjs against the version in the repo here and they don't match...it looks like the ones here do contain the proper Constructor
definitions. Do I just need to wait for a new release for these to work?
Yeah... working on the Typescript declarations right now. It's taken longer than expected but it should be coming soon!
At the moment, sugar-date
's type library makes it impossible to get tslint
to pass. I think just publishing what you have would unblock this. Is that something that could happen soon?
The problem is that I have to do a major rework to build the types dynamically so it's not quite that simple... As I mentioned though it IS getting close, and I'll work to make it even sooner, but can't really make promises. That said, I'm willing to accept a PR if you can help figure out what you need in sugar.d.ts
to change.
Also just a note, the next version will be publishing the declarations to @types
instead of in this repo.
As far as I can tell, I don't think any changes to sugar.d.ts
are necessary. Just a re-publish such that the sugar.d.ts
that I pull down from npmjs matches the one you have checked in here.
In other words, things work fine for me if I manually overwrite node_modules/sugar-date/sugar.d.ts
with the one in the root of this repo.
Any updates on the published update to @types
? Looking forward to it :)
Sorry, not yet, but it's coming soon, I promise!
Any update on this?
Hello... very sorry, my definition of "soon" appears to be very bendable, but I promise it's still coming!