Eslint-plugin-import: import/named: Typescript interface export from *.d.ts file not found

Created on 25 Mar 2020  路  2Comments  路  Source: benmosher/eslint-plugin-import

import/named reports an error on the code: import { Moment } from "moment";

"Moment not found in 'moment' (import/named)"

This is valid code, typescript correctly parses the imported interface from moment.d.ts

Likely related to: https://github.com/benmosher/eslint-plugin-import/issues/1282

bug help wanted typescript

Most helpful comment

Although now that import type exists, I'd suggest using that.

All 2 comments

Although now that import type exists, I'd suggest using that.

Thanks for the tip, I will use that!

Was this page helpful?
0 / 5 - 0 ratings