Skip to content

Commit 91efff3

Browse files
committed
feature: @putout/plugin-putout: declare: types: exclude: import
1 parent 3a7c398 commit 91efff3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

packages/plugin-putout/lib/declare/index.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,8 @@ test('plugin-putout: declare: identifier', (t) => {
432432
`);
433433
t.end();
434434
});
435+
436+
test('plugin-putout: declare: no transform: import', (t) => {
437+
t.noTransformCode(`import('hello');\n`);
438+
t.end();
439+
});

packages/plugin-putout/lib/declare/types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,6 @@ export default {
656656
getOuterBindingIdentifiers: 'const {getOuterBindingIdentifiers} = types',
657657
identifier: 'const {identifier} = types',
658658
ifStatement: 'const {ifStatement} = types',
659-
import: 'const {import} = types',
660659
importAttribute: 'const {importAttribute} = types',
661660
importDeclaration: 'const {importDeclaration} = types',
662661
importDefaultSpecifier: 'const {importDefaultSpecifier} = types',

packages/plugin-putout/scripts/create-declare.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ for (const key of getKeys(data, path)) {
1414
if (key === 'is')
1515
continue;
1616

17+
if (key === 'import')
18+
continue;
19+
1720
if (key.toUpperCase() === key)
1821
continue;
1922

0 commit comments

Comments
 (0)