Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types *must* be imported with type keyword when TS compilerOptions.verbatimModuleSyntax is true #249

Closed
BinToss opened this issue May 8, 2024 · 0 comments · Fixed by #254

Comments

@BinToss
Copy link

BinToss commented May 8, 2024

If this file is intended to be built with verbatimModuleSyntax disabled or if this file shouldn't be imported by other packages, then close this issue as "not planned".


Types.ts imports interfaces from @babel/core, rollup, and @boost/common without the type keyword. Typescript prohibits this when 'verbatimModuleSyntax' is enabled.

node_modules/packemon/src/types.ts:1:10 - error TS1484: 'OutputOptions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

1 import { OutputOptions as RollupOutputOptions, RollupOptions } from 'rollup';
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/packemon/src/types.ts:1:48 - error TS1484: 'RollupOptions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

1 import { OutputOptions as RollupOutputOptions, RollupOptions } from 'rollup';
                                                 ~~~~~~~~~~~~~

node_modules/packemon/src/types.ts:2:10 - error TS1484: 'TransformOptions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

2 import { TransformOptions as BabelOptions } from '@babel/core';
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/packemon/src/types.ts:3:10 - error TS1484: 'PackageStructure' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3 import { PackageStructure } from '@boost/common';
           ~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant