Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Oct 13, 2023
1 parent 192ce1d commit f229597
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/rollup/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface ExistingDecodedSourceMap {
names: string[];
sourceRoot?: string;
sources: string[];
sourcesContent?: (string | null)[];
sourcesContent?: string[];
version: number;
x_google_ignoreList?: number[];
}
Expand All @@ -65,7 +65,7 @@ export interface ExistingRawSourceMap {
names: string[];
sourceRoot?: string;
sources: string[];
sourcesContent?: (string | null)[];
sourcesContent?: string[];
version: number;
x_google_ignoreList?: number[];
}
Expand All @@ -82,7 +82,7 @@ export interface SourceMap {
mappings: string;
names: string[];
sources: string[];
sourcesContent: (string | null)[];
sourcesContent?: string[];
version: number;
toString(): string;
toUrl(): string;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/collapseSourcemaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { error, logConflictingSourcemapSources, logSourcemapBroken } from './log
import { basename, dirname, relative, resolve } from './path';

class Source {
readonly content: string | null;
readonly content: string;
readonly filename: string;
isOriginal = true;

constructor(filename: string, content: string | null) {
constructor(filename: string, content: string) {
this.filename = filename;
this.content = content;
}
Expand Down Expand Up @@ -50,7 +50,7 @@ class Link {
traceMappings() {
const sources: string[] = [];
const sourceIndexMap = new Map<string, number>();
const sourcesContent: (string | null)[] = [];
const sourcesContent: string[] = [];
const names: string[] = [];
const nameIndexMap = new Map<string, number>();

Expand Down Expand Up @@ -194,7 +194,7 @@ function getCollapsedSourcemap(

export function collapseSourcemaps(
file: string,
map: DecodedSourceMap,
map: Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> },
modules: readonly Module[],
bundleSourcemapChain: readonly DecodedSourceMapOrMissing[],
excludeContent: boolean | undefined,
Expand Down

0 comments on commit f229597

Please sign in to comment.