chore: support import { type Foo } in check deps (#23405)
This commit is contained in:
parent
6bb5c0a549
commit
06318d52d6
|
|
@ -113,8 +113,14 @@ async function innerCheckDeps(root) {
|
||||||
|
|
||||||
function visit(node, fileName) {
|
function visit(node, fileName) {
|
||||||
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
|
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
|
||||||
if (node.importClause && node.importClause.isTypeOnly)
|
if (node.importClause) {
|
||||||
return;
|
if (node.importClause.isTypeOnly)
|
||||||
|
return;
|
||||||
|
if (node.importClause.namedBindings && ts.isNamedImports(node.importClause.namedBindings)) {
|
||||||
|
if (node.importClause.namedBindings.elements.every(e => e.isTypeOnly))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const importName = node.moduleSpecifier.text;
|
const importName = node.moduleSpecifier.text;
|
||||||
let importPath;
|
let importPath;
|
||||||
if (importName.startsWith('.')) {
|
if (importName.startsWith('.')) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue