From 0e2068d6cee9d53c7a242b95f56ea99be3248142 Mon Sep 17 00:00:00 2001 From: Dunqing Date: Thu, 12 Oct 2023 08:44:37 -0500 Subject: [PATCH] fix: update `sourcesContent` type (#263) --- src/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 20872aa..42c0ec2 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -37,7 +37,7 @@ export type SourceMapSegment = export interface DecodedSourceMap { file: string; sources: string[]; - sourcesContent: (string | null)[]; + sourcesContent?: string[]; names: string[]; mappings: SourceMapSegment[][]; x_google_ignoreList?: number[]; @@ -49,7 +49,7 @@ export class SourceMap { version: number; file: string; sources: string[]; - sourcesContent: (string | null)[]; + sourcesContent?: string[]; names: string[]; mappings: string; x_google_ignoreList?: number[]; @@ -80,8 +80,8 @@ export class Bundle { addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle; append(str: string, options?: BundleOptions): Bundle; clone(): Bundle; - generateMap(options?: SourceMapOptions): SourceMap; - generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; + generateMap(options?: SourceMapOptions): Omit & { sourcesContent: Array }; + generateDecodedMap(options?: SourceMapOptions): Omit & { sourcesContent: Array }; getIndentString(): string; indent(indentStr?: string): Bundle; indentExclusionRanges: ExclusionRange | Array;