Skip to content

Import type when running typescript natively #57363

Closed Answered by ljharb
objectref asked this question in General
Discussion options

You must be logged in to vote

import { Token } from './Token.ts'. import type is only used when you just want a type, and if you're trying to new the class, you don't just want a type.

Replies: 6 comments 4 replies

Comment options

ljharb
Mar 7, 2025
Collaborator Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ljharb
Comment options

ljharb Mar 7, 2025
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@ljharb
Comment options

ljharb Mar 7, 2025
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@ljharb
Comment options

ljharb Mar 7, 2025
Collaborator Sponsor

Answer selected by objectref
Comment options

You must be logged in to vote
1 reply
@ljharb
Comment options

ljharb Mar 7, 2025
Collaborator Sponsor

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants