Skip to content

Commit 0e2068d

Browse files
authored
fix: update sourcesContent type (#263)
1 parent cf554e7 commit 0e2068d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export type SourceMapSegment =
3737
export interface DecodedSourceMap {
3838
file: string;
3939
sources: string[];
40-
sourcesContent: (string | null)[];
40+
sourcesContent?: string[];
4141
names: string[];
4242
mappings: SourceMapSegment[][];
4343
x_google_ignoreList?: number[];
@@ -49,7 +49,7 @@ export class SourceMap {
4949
version: number;
5050
file: string;
5151
sources: string[];
52-
sourcesContent: (string | null)[];
52+
sourcesContent?: string[];
5353
names: string[];
5454
mappings: string;
5555
x_google_ignoreList?: number[];
@@ -80,8 +80,8 @@ export class Bundle {
8080
addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle;
8181
append(str: string, options?: BundleOptions): Bundle;
8282
clone(): Bundle;
83-
generateMap(options?: SourceMapOptions): SourceMap;
84-
generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
83+
generateMap(options?: SourceMapOptions): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
84+
generateDecodedMap(options?: SourceMapOptions): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> };
8585
getIndentString(): string;
8686
indent(indentStr?: string): Bundle;
8787
indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;

0 commit comments

Comments
 (0)