Skip to content

Commit e9cbb25

Browse files
committed
PR feedback
1 parent 4495ed4 commit e9cbb25

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

apps/api-extractor/src/collector/SourceMapper.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ interface IOriginalFileInfo {
2525
}
2626

2727
export class SourceMapper {
28-
// Map from .d.ts file path --> ISourceMap if a source map was found, or false if not found
29-
private _sourceMapByFilePath: Map<string, ISourceMap | false>
30-
= new Map<string, ISourceMap | false>();
28+
// Map from .d.ts file path --> ISourceMap if a source map was found, or null if not found
29+
private _sourceMapByFilePath: Map<string, ISourceMap | null>
30+
= new Map<string, ISourceMap | null>();
3131

3232
// Cache the FileSystem.exists() result for mapped .ts files
3333
private _originalFileInfoByPath: Map<string, IOriginalFileInfo> = new Map<string, IOriginalFileInfo>();
@@ -46,7 +46,7 @@ export class SourceMapper {
4646
throw new InternalError('The referenced path was not found: ' + options.sourceFilePath);
4747
}
4848

49-
let sourceMap: ISourceMap | false | undefined = this._sourceMapByFilePath.get(options.sourceFilePath);
49+
let sourceMap: ISourceMap | null | undefined = this._sourceMapByFilePath.get(options.sourceFilePath);
5050

5151
if (sourceMap === undefined) {
5252
// Normalize the path and redo the lookup
@@ -84,7 +84,7 @@ export class SourceMapper {
8484
sourceMap = { sourceMapConsumer, mappingItems};
8585
} else {
8686
// No source map for this filename
87-
sourceMap = false;
87+
sourceMap = null; // tslint:disable-line:no-null-keyword
8888
}
8989

9090
this._sourceMapByFilePath.set(normalizedPath, sourceMap);
@@ -95,7 +95,7 @@ export class SourceMapper {
9595
}
9696
}
9797

98-
if (sourceMap === false) {
98+
if (sourceMap === null) {
9999
// No source map for this filename
100100
return;
101101
}

0 commit comments

Comments
 (0)