@@ -19,14 +19,12 @@ import { EnrichedSourceMap, RelativeFunctionDesc } from "./types.js";
19
19
20
20
import * as vlq from "vlq" ;
21
21
22
- const _functionDescs = Symbol ( "functionDescs" ) ;
23
-
24
22
/**
25
23
* Provides a utility to decode a coordinate in a source file
26
24
* into the enclosing function name.
27
25
*/
28
26
export class SourceMapDecoder {
29
- private [ _functionDescs ] : Map < string , FunctionDesc [ ] > ;
27
+ #functionDescs : Map < string , FunctionDesc [ ] > ;
30
28
31
29
/**
32
30
* Initializes the `SourceMapDecoder`
@@ -36,7 +34,7 @@ export class SourceMapDecoder {
36
34
*/
37
35
constructor ( sourceMap : EnrichedSourceMap ) {
38
36
validateSourceMap ( sourceMap ) ;
39
- this [ _functionDescs ] = decodeSources ( sourceMap ) ;
37
+ this . #functionDescs = decodeSources ( sourceMap ) ;
40
38
}
41
39
42
40
/**
@@ -54,8 +52,8 @@ export class SourceMapDecoder {
54
52
line : number ,
55
53
column : number
56
54
) : string | null {
57
- const descs = this [ _functionDescs ] . get ( source ) ;
58
- // `null` entries in the source map become empty arrays in `[_functionDescs] `
55
+ const descs = this . #functionDescs . get ( source ) ;
56
+ // `null` entries in the source map become empty arrays in `#functionDescs `
59
57
// so `descs === undefined` means `source` is not present in the source map
60
58
if ( ! descs ) {
61
59
throw Error ( `source ${ source } not found in source map` ) ;
0 commit comments