Skip to content

fix(types): compiler error from importing type BlockToolData#2264

Merged
neSpecc merged 9 commits intocodex-team:nextfrom
arkamali:patch-1
Feb 20, 2023
Merged

fix(types): compiler error from importing type BlockToolData#2264
neSpecc merged 9 commits intocodex-team:nextfrom
arkamali:patch-1

Conversation

@arkamali
Copy link
Copy Markdown
Contributor

@arkamali arkamali commented Feb 2, 2023

Resolves #2209

vite v4.0.4 building for production...
node_modules/@editorjs/editorjs/types/configs/conversion-config.ts:1:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' 

1 import {BlockToolData} from '../tools';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@editorjs/editorjs/types/configs/conversion-config.ts:1:9 - error TS1444: 'BlockToolData' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.

1 import {BlockToolData} from '../tools';

vite v4.0.4 building for production...
node_modules/@editorjs/editorjs/types/configs/conversion-config.ts:1:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' 

1 import {BlockToolData} from '../tools';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@editorjs/editorjs/types/configs/conversion-config.ts:1:9 - error TS1444: 'BlockToolData' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.

1 import {BlockToolData} from '../tools';
@neSpecc neSpecc changed the title import BlockToolData as Type fix(types): compiler error from importing type BlockToolData Feb 20, 2023
@neSpecc
Copy link
Copy Markdown
Member

neSpecc commented Feb 20, 2023

Thanks @arkamali and @TatianaFomina

@neSpecc neSpecc merged commit 7bd5c53 into codex-team:next Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Typescript compiler errors when importing editorjs in SvelteKit project (preserveValueImports)

3 participants