-
Notifications
You must be signed in to change notification settings - Fork 887
Unable to import and use moment.js #3478
Comments
Thank you, that would've been my first question.
|
That worked. But what if I want to use |
There are several options:
Nobody really knows what goes wrong and why. The rule somehow messes with typescript's internals. |
Bug Report
TypeScript code being linted
with
tslint.json
configuration:Actual behavior
Errors reported:
Expected behavior
The ability to use moment.js. As of now tslint is detecting it as type:
any
, which is causes linting errors. Interestingly, if I try to import a specific method, I still get the same no-unsafe-any errors:Example:
Produces output:
Just a heads up - .d.ts file is included with moment - no need to install from @types.
The text was updated successfully, but these errors were encountered: