blog.johnnyreilly.com icon indicating copy to clipboard operation
blog.johnnyreilly.com copied to clipboard

Q: TypeScript 5: importsNotUsedAsValues replaced by ESLint consistent-type-imports

Open sschneider-ihre-pvs opened this issue 2 years ago • 5 comments
trafficstars

What about using the mixed syntax?

https://www.typescriptlang.org/docs/handbook/modules.html#import

import { getResponse, type APIResponseType} from "./api";

sschneider-ihre-pvs avatar Sep 13 '23 09:09 sschneider-ihre-pvs

Sorry I'm not sure I understand?

johnnyreilly avatar Sep 13 '23 09:09 johnnyreilly

What I meant is, if you just use the regular import with either of type and value, wouldn't that fix the issue with the compiler yelling at you ?

sschneider-ihre-pvs avatar Sep 13 '23 09:09 sschneider-ihre-pvs

I mean, instead of pure value import and pure type import

sschneider-ihre-pvs avatar Sep 13 '23 09:09 sschneider-ihre-pvs

Or maybe I just don't understand the intention of the article :D

sschneider-ihre-pvs avatar Sep 13 '23 10:09 sschneider-ihre-pvs

No I do not think that helps - the compiler behaviour changed and so you need to use eslint

johnnyreilly avatar Sep 13 '23 11:09 johnnyreilly