From 93a6b49f757c8c61dc1cd791726eb8ecdb851475 Mon Sep 17 00:00:00 2001 From: Arthur Fiorette Date: Wed, 22 May 2024 20:05:57 -0300 Subject: [PATCH] lint --- src/SchemaGenerator.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SchemaGenerator.ts b/src/SchemaGenerator.ts index 1dcadbf40..2d3fbfcaf 100644 --- a/src/SchemaGenerator.ts +++ b/src/SchemaGenerator.ts @@ -10,7 +10,6 @@ import type { TypeFormatter } from "./TypeFormatter.js"; import type { StringMap } from "./Utils/StringMap.js"; import { hasJsDocTag } from "./Utils/hasJsDocTag.js"; import { removeUnreachable } from "./Utils/removeUnreachable.js"; -import { symbolAtNode } from "./Utils/symbolAtNode.js"; export class SchemaGenerator { public constructor( @@ -189,8 +188,8 @@ export class SchemaGenerator { if (ts.isImportSpecifier(declaration)) { // Handling the `Foo` in `import { Foo } from "./lib"; export { Foo };` - const importSpecifierNode = declaration as ts.ImportSpecifier; - const type = typeChecker.getTypeAtLocation(importSpecifierNode); + const type = typeChecker.getTypeAtLocation(declaration); + if (type.symbol?.declarations?.length === 1) { this.inspectNode(type.symbol.declarations[0], typeChecker, allTypes); }