Skip to content

Commit

Permalink
fix: compact with new magic-string type
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 15, 2023
1 parent ceae0a5 commit 979c88f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ export {

export type Thenable<T> = T | Promise<T>

export type TransformResult = string | { code: string; map?: SourceMapInput | null } | null | undefined
export interface SourceMapCompact {
file?: string
mappings: string
names: string[]
sourceRoot?: string
sources: string[]
// In magic-string v0.27.0, `sourcesContent` becomes nullable, while rollup haven't catch up yet
sourcesContent?: (string | null)[]
version: number
}

export type TransformResult = string | { code: string; map?: SourceMapInput | SourceMapCompact | null } | null | undefined

export interface ExternalIdResult { id: string; external?: boolean }

Expand Down

0 comments on commit 979c88f

Please sign in to comment.