You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TypeScript with the allowJs flag, types defined in a JSDoc can be imported in .ts files, but the import/named rule is not aware of the implicit export from the JSDoc and thus marks the import as invalid.
Absolutely. Honestly, I'm not totally sure how worth it it would be to implement. Personally, I just disabled import/named for .tsx? files in our project since TS performs the check, anyway.
In TypeScript with the
allowJs
flag, types defined in a JSDoc can be imported in.ts
files, but theimport/named
rule is not aware of the implicit export from the JSDoc and thus marks the import as invalid.Example:
This yields
error FooKey not found in './Foo' import/named
.It may be possible to use tsdoc to extract the type definitions.
Related: #1282
The text was updated successfully, but these errors were encountered: