diff --git a/index.d.ts b/index.d.ts index bfce343d..4d01577f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -13,7 +13,7 @@ import { WarningName, WarningNameWithValue } from "./types/warnings"; -import { ASTDeps } from "./types/astdeps"; +import { ASTDeps, Dependency } from "./types/astdeps"; declare const warnings: Record>; @@ -26,6 +26,7 @@ export { RuntimeFileOptions, RuntimeOptions, ASTDeps, + Dependency, Warning, WarningDefault, WarningLocation, diff --git a/types/astdeps.d.ts b/types/astdeps.d.ts index 51910d0f..d1db942b 100644 --- a/types/astdeps.d.ts +++ b/types/astdeps.d.ts @@ -1,6 +1,7 @@ export { ASTDeps, - SourceLocation + SourceLocation, + Dependency } interface SourceLocation { @@ -14,6 +15,12 @@ interface SourceLocation { } } +interface Dependency { + unsafe: boolean; + inTry: boolean; + location?: SourceLocation; +} + declare class ASTDeps { constructor(); removeByName(name: string): void; @@ -21,10 +28,6 @@ declare class ASTDeps { getDependenciesInTryStatement(): IterableIterator; public isInTryStmt: boolean; - public dependencies: Record; + public dependencies: Record; public readonly size: number; }