Skip to content

Commit

Permalink
fix: type guards (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Oct 18, 2021
1 parent c33f377 commit b92cd94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,13 @@ export interface NamedExport extends ESMExport {
names: string[]
}

export interface DefaultExport extends ESMExport {
type: 'default'
}

export function findStaticImports (code: string) : StaticImport[]
export function findDynamicImports (code: string) : DynamicImport[]
export function findExports (code: string): (NamedExport | DeclarationExport | ESMExport)[]
export function findExports (code: string): (NamedExport | DeclarationExport | DefaultExport)[]
export function parseStaticImport (staticImport: StaticImport) : ParsedStaticImport

// Evaluate
Expand Down

0 comments on commit b92cd94

Please # to comment.