From 47b611b6485cf37ab186b09f995512e1d5ae979d Mon Sep 17 00:00:00 2001 From: Andrew Hoddinott Date: Mon, 18 May 2026 09:27:20 +0900 Subject: [PATCH 1/2] fix: drop keyword-end source map mapping The trailing mapping at `column + keyword.length` introduced in #116 lands on whitespace, causing downstream source-map consumers to resolve adjacent expression positions onto whitespace columns. --- .changeset/keyword-end-mapping.md | 5 ++++ src/languages/ts/index.js | 20 +++++++------- .../expected.js.map | 2 +- test/samples/await-precedence/expected.js.map | 2 +- test/samples/break-continue/expected.js.map | 2 +- test/samples/class-property/expected.js.map | 2 +- .../class-static-block/expected.js.map | 2 +- .../expected.js.map | 2 +- .../comment-before-import/expected.js.map | 2 +- .../comment-between-blocks/expected.js.map | 2 +- test/samples/comment-block/expected.js.map | 2 +- .../comment-inline-inserted/expected.js.map | 2 +- test/samples/comment-inline/expected.js.map | 2 +- .../comment-mixed-trailing/expected.js.map | 2 +- .../expected.js.map | 2 +- .../expected.js.map | 2 +- test/samples/computed-getter/expected.js.map | 2 +- test/samples/deconflict-let/expected.js.map | 2 +- .../destructured-declaration/expected.js.map | 2 +- test/samples/empty-block/expected.js.map | 2 +- test/samples/empty-body/expected.js.map | 2 +- test/samples/export-all-as/expected.js.map | 2 +- test/samples/export/expected.js.map | 2 +- .../function-declaration/expected.js.map | 2 +- .../function-expression/expected.js.map | 2 +- test/samples/import-as/expected.js.map | 2 +- .../samples/import-attributes/expected.js.map | 2 +- .../import-default-and-named/expected.js.map | 2 +- .../expected.js.map | 2 +- test/samples/import-many/expected.js.map | 2 +- test/samples/import/expected.js.map | 2 +- .../inserted-parameter/expected.js.map | 2 +- .../inserted-parameters/expected.js.map | 2 +- .../samples/jsdoc-indentation/expected.js.map | 2 +- test/samples/meta-property/expected.js.map | 2 +- test/samples/method/expected.js.map | 2 +- .../object-expressions/expected.js.map | 2 +- test/samples/object-format/expected.js.map | 2 +- test/samples/string-literal/expected.js.map | 2 +- test/samples/switch/expected.js.map | 2 +- test/samples/try-catch/expected.js.map | 2 +- .../samples/ts-abstract-class/expected.ts.map | 2 +- .../ts-accessor-properties/expected.ts.map | 2 +- .../ts-arrow-as-const-object/expected.ts.map | 2 +- .../ts-arrow-function-types/expected.ts.map | 2 +- test/samples/ts-as-expression/expected.ts.map | 2 +- .../ts-class-extends-generic/expected.ts.map | 2 +- .../ts-class-properties/expected.ts.map | 2 +- test/samples/ts-declare/expected.ts.map | 2 +- .../ts-decorators-class/expected.ts.map | 2 +- .../ts-decorators-expression/expected.ts.map | 2 +- test/samples/ts-decorators/expected.ts.map | 2 +- test/samples/ts-enums/expected.ts.map | 2 +- test/samples/ts-export/expected.ts.map | 2 +- test/samples/ts-generic-types/expected.ts.map | 2 +- test/samples/ts-implements/expected.ts.map | 2 +- test/samples/ts-import-type/expected.ts.map | 2 +- .../ts-index-access-type/expected.ts.map | 2 +- .../expected.ts.map | 2 +- test/samples/ts-interfaces/expected.ts.map | 2 +- test/samples/ts-keywords/expected.ts.map | 2 +- .../ts-module-declaration/expected.ts.map | 2 +- test/samples/ts-null-keyword/expected.ts.map | 2 +- .../ts-object-patterns/expected.ts.map | 2 +- test/samples/ts-return-type/expected.ts.map | 2 +- .../ts-satisfies-expression/expected.ts.map | 2 +- .../ts-simple-function-types/expected.ts.map | 2 +- .../expected.ts.map | 2 +- test/samples/ts-typed-imports/expected.ts.map | 2 +- .../ts-undefined-keyword/expected.ts.map | 2 +- test/samples/ts-utility-types/expected.ts.map | 2 +- test/samples/var-declaration/expected.js.map | 2 +- test/samples/yield/expected.js.map | 2 +- test/sourcemap-keywords.test.js | 27 +++++++++++++++++++ 74 files changed, 113 insertions(+), 81 deletions(-) create mode 100644 .changeset/keyword-end-mapping.md diff --git a/.changeset/keyword-end-mapping.md b/.changeset/keyword-end-mapping.md new file mode 100644 index 00000000..7b1ef8b4 --- /dev/null +++ b/.changeset/keyword-end-mapping.md @@ -0,0 +1,5 @@ +--- +'esrap': patch +--- + +fix: don't emit positive source map mapping at keyword-end whitespace diff --git a/src/languages/ts/index.js b/src/languages/ts/index.js index c13e6b28..a9197839 100644 --- a/src/languages/ts/index.js +++ b/src/languages/ts/index.js @@ -74,8 +74,9 @@ const OPERATOR_PRECEDENCE = { }; /** - * Writes `keyword` bounded by source map locations for the exact character span, - * so breakpoints line up on keywords (not only identifiers and braces). + * Writes `keyword` with a source map location at its start, so breakpoints + * line up on keywords (not only identifiers and braces). No end marker; the + * keyword's mapping naturally yields to the following expression. * * @param {import('esrap').Context} context * @param {number} line ESTree / acorn 1-based line @@ -85,7 +86,6 @@ const OPERATOR_PRECEDENCE = { function write_source_keyword(context, line, column, keyword) { context.location(line, column); context.write(keyword); - context.location(line, column + keyword.length); } /** @@ -492,7 +492,7 @@ export default (options = {}) => { context.write('['); sequence( context, - /** @type {TSESTree.Node[]} */ (node.elements), + /** @type {TSESTree.Node[]} */(node.elements), node.loc?.end ?? null, false ); @@ -959,8 +959,8 @@ export default (options = {}) => { node.parameters ?? node.params, // @ts-expect-error `acorn-typescript` and `@typescript-eslint/types` have slightly different type definitions node.typeAnnotation?.typeAnnotation?.loc?.start ?? - node.returnType?.typeAnnotation?.loc?.start ?? - null, + node.returnType?.typeAnnotation?.loc?.start ?? + null, false ); @@ -986,7 +986,7 @@ export default (options = {}) => { AccessorProperty: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], ArrayExpression: shared['ArrayExpression|ArrayPattern'], @@ -1547,7 +1547,7 @@ export default (options = {}) => { PropertyDefinition: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], RestElement: shared['RestElement|SpreadElement'], @@ -1770,12 +1770,12 @@ export default (options = {}) => { TSAbstractAccessorProperty: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], TSAbstractPropertyDefinition: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], TSDeclareFunction(node, context) { diff --git a/test/samples/arrow-function-needs-braces/expected.js.map b/test/samples/arrow-function-needs-braces/expected.js.map index c166dcd7..024e8b61 100644 --- a/test/samples/arrow-function-needs-braces/expected.js.map +++ b/test/samples/arrow-function-needs-braces/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "let a = () => ({ x } = { x: 42 });\nlet b = () => ({} || bar);\nlet c = () => ({} ? foo : bar);" ], - "mappings": "AAAA,IAAI,AAAA,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE;AAC9B,IAAI,AAAA,CAAC,gBAAgB,GAAG;AACxB,IAAI,AAAA,CAAC,eAAe,GAAG,GAAG,GAAG" + "mappings": "AAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE;AAC9B,IAAI,CAAC,gBAAgB,GAAG;AACxB,IAAI,CAAC,eAAe,GAAG,GAAG,GAAG" } \ No newline at end of file diff --git a/test/samples/await-precedence/expected.js.map b/test/samples/await-precedence/expected.js.map index 225b8f82..1d32c365 100644 --- a/test/samples/await-precedence/expected.js.map +++ b/test/samples/await-precedence/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "await (a || b);\nawait c;" ], - "mappings": "AAAA,KAAK,EAAE,CAAC,IAAI,CAAC;AACb,KAAK,CAAC,CAAC" + "mappings": "AAAA,OAAO,CAAC,IAAI,CAAC;AACb,MAAM,CAAC" } \ No newline at end of file diff --git a/test/samples/break-continue/expected.js.map b/test/samples/break-continue/expected.js.map index 9b156dc3..47bf4910 100644 --- a/test/samples/break-continue/expected.js.map +++ b/test/samples/break-continue/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "x: for (let i = 0; i < 10; i += 1) {\n\tif (should_break) {\n\t\tbreak;\n\t}\n\n\tif (should_break_with_label) {\n\t\tbreak x;\n\t}\n\n\tif (should_continue) {\n\t\tcontinue;\n\t}\n\n\tif (should_continue_with_label) {\n\t\tcontinue x;\n\t}\n}" ], - "mappings": "AAAA,CAAC,EAAE,GAAG,EAAE,IAAI,AAAA,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;CACnC,EAAE,EAAE,YAAY,EAAE,CAAC;EAClB,KAAK;CACN,CAAC;;CAED,EAAE,EAAE,uBAAuB,EAAE,CAAC;EAC7B,KAAK,CAAC,CAAC;CACR,CAAC;;CAED,EAAE,EAAE,eAAe,EAAE,CAAC;EACrB,QAAQ;CACT,CAAC;;CAED,EAAE,EAAE,0BAA0B,EAAE,CAAC;EAChC,QAAQ,CAAC,CAAC;CACX,CAAC;AACF,CAAC" + "mappings": "AAAA,CAAC,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;CACnC,IAAI,YAAY,EAAE,CAAC;EAClB;CACD,CAAC;;CAED,IAAI,uBAAuB,EAAE,CAAC;EAC7B,MAAM,CAAC;CACR,CAAC;;CAED,IAAI,eAAe,EAAE,CAAC;EACrB;CACD,CAAC;;CAED,IAAI,0BAA0B,EAAE,CAAC;EAChC,SAAS,CAAC;CACX,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/class-property/expected.js.map b/test/samples/class-property/expected.js.map index e7993881..b87a8de8 100644 --- a/test/samples/class-property/expected.js.map +++ b/test/samples/class-property/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Foo {\n\thi; // a\n\tstatic foo = 1; // b\n\t[KEY] = 2; // c\n}\n" ], - "mappings": "AAAA,MAAM,AAAA,GAAG,CAAC,CAAC;CACV,EAAE;CACF,OAAO,AAAA,GAAG,GAAG,CAAC;EACb,GAAG,IAAI,CAAC;AACV,CAAC" + "mappings": "AAAA,MAAM,GAAG,CAAC,CAAC;CACV,EAAE;CACF,OAAO,GAAG,GAAG,CAAC;EACb,GAAG,IAAI,CAAC;AACV,CAAC" } \ No newline at end of file diff --git a/test/samples/class-static-block/expected.js.map b/test/samples/class-static-block/expected.js.map index 3f5acc4a..f648ef9f 100644 --- a/test/samples/class-static-block/expected.js.map +++ b/test/samples/class-static-block/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Foo {\n\tstatic {\n\t\tthis.abc = 1;\n\t}\n}" ], - "mappings": "AAAA,MAAM,AAAA,GAAG,CAAC,CAAC;CACV,MAAM;EACL,IAAI,CAAC,GAAG,GAAG,CAAC;;AAEd,CAAC" + "mappings": "AAAA,MAAM,GAAG,CAAC,CAAC;CACV;EACC,IAAI,CAAC,GAAG,GAAG,CAAC;;AAEd,CAAC" } \ No newline at end of file diff --git a/test/samples/comment-after-function-argument/expected.js.map b/test/samples/comment-after-function-argument/expected.js.map index 62dca261..0163d85f 100644 --- a/test/samples/comment-after-function-argument/expected.js.map +++ b/test/samples/comment-after-function-argument/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "foo(function bar() {\n\t// logic goes here\n}, true); // trailing comment\n" ], - "mappings": "AAAA,GAAG;CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;;CAEpB,CAAC;CAAE,IAAI;" + "mappings": "AAAA,GAAG;CAAC,SAAS,GAAG,GAAG,CAAC;;CAEpB,CAAC;CAAE,IAAI;" } \ No newline at end of file diff --git a/test/samples/comment-before-import/expected.js.map b/test/samples/comment-before-import/expected.js.map index 91137dac..1a0f7507 100644 --- a/test/samples/comment-before-import/expected.js.map +++ b/test/samples/comment-before-import/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "/* hello */\nimport 'potato';\n" ], - "mappings": ";AACA,MAAM,CAAC,QAAQ" + "mappings": ";AACA,OAAO,QAAQ" } \ No newline at end of file diff --git a/test/samples/comment-between-blocks/expected.js.map b/test/samples/comment-between-blocks/expected.js.map index 1097d2c0..246cbadc 100644 --- a/test/samples/comment-between-blocks/expected.js.map +++ b/test/samples/comment-between-blocks/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "// if true, yep\nif (condition) {\n\tconsole.log('yep');\n} // otherwise nope\nelse {\n\tconsole.log('nope');\n}\n" ], - "mappings": ";AACA,EAAE,EAAE,SAAS,EAAE,CAAC;CACf,OAAO,CAAC,GAAG,CAAC,KAAK;AAClB,CAAC;AACI,CAAC;CACL,OAAO,CAAC,GAAG,CAAC,MAAM;AACnB,CAAC" + "mappings": ";AACA,IAAI,SAAS,EAAE,CAAC;CACf,OAAO,CAAC,GAAG,CAAC,KAAK;AAClB,CAAC;AACI,CAAC;CACL,OAAO,CAAC,GAAG,CAAC,MAAM;AACnB,CAAC" } \ No newline at end of file diff --git a/test/samples/comment-block/expected.js.map b/test/samples/comment-block/expected.js.map index 651799b2..fd902f2b 100644 --- a/test/samples/comment-block/expected.js.map +++ b/test/samples/comment-block/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "/* comment before a node\n * second line */\nconsole.log(1);\n\nconsole.log(2); /* comment on same line as node */\n\nconst obj = {\n\tfoo: 1, /* comment in middle of object */\n\tbar: 2\n};\n" ], - "mappings": ";;AAEA,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,MAAM,AAAA,GAAG,KACR,GAAG,EAAE,CAAC,oCACN,GAAG,EAAE,CAAC" + "mappings": ";;AAEA,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,MAAM,GAAG,KACR,GAAG,EAAE,CAAC,oCACN,GAAG,EAAE,CAAC" } \ No newline at end of file diff --git a/test/samples/comment-inline-inserted/expected.js.map b/test/samples/comment-inline-inserted/expected.js.map index 43fb0065..49368340 100644 --- a/test/samples/comment-inline-inserted/expected.js.map +++ b/test/samples/comment-inline-inserted/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "// comment before an inserted block\n\"use strict\";\n\n// comment before an inserted node\nimport { foo } from \"wherever\";" ], - "mappings": ";AACA,YAAY;;;AAGZ,OAAO,EAAE,GAAG,QAAQ,UAAU" + "mappings": ";AACA,YAAY;;;AAGZ,SAAS,GAAG,QAAQ,UAAU" } \ No newline at end of file diff --git a/test/samples/comment-inline/expected.js.map b/test/samples/comment-inline/expected.js.map index 0d67e8e2..2fb8ffdc 100644 --- a/test/samples/comment-inline/expected.js.map +++ b/test/samples/comment-inline/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "// comment before a node\n// second line\nconsole.log(1);\nconsole.log(2); // comment on same line as node\n\nconst obj = {\n\tfoo: 1, // comment in middle of object\n\tbar: 2 // comment in middle of object\n};\n\nfunction bar() {\n\treturn /*result*/ foo;\n}\n" ], - "mappings": ";;AAEA,OAAO,CAAC,GAAG,CAAC,CAAC;;AACb,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,MAAM,AAAA,GAAG;CACR,GAAG,EAAE,CAAC;CACN,GAAG,EAAE,CAAC;;;AAGP,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,MAAM,aAAY,GAAG;AACtB,CAAC" + "mappings": ";;AAEA,OAAO,CAAC,GAAG,CAAC,CAAC;;AACb,OAAO,CAAC,GAAG,CAAC,CAAC;;AAEb,MAAM,GAAG;CACR,GAAG,EAAE,CAAC;CACN,GAAG,EAAE,CAAC;;;AAGP,SAAS,GAAG,GAAG,CAAC;CACf,mBAAkB,GAAG;AACtB,CAAC" } \ No newline at end of file diff --git a/test/samples/comment-mixed-trailing/expected.js.map b/test/samples/comment-mixed-trailing/expected.js.map index cc5114d4..7e2e876a 100644 --- a/test/samples/comment-mixed-trailing/expected.js.map +++ b/test/samples/comment-mixed-trailing/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo() {\n\t// hey1\n\t/*\n\they2\n\t*/\n}\n" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,GAAG,CAAC;;;;;AAKhB,CAAC" + "mappings": "AAAA,SAAS,GAAG,GAAG,CAAC;;;;;AAKhB,CAAC" } \ No newline at end of file diff --git a/test/samples/comment-within-call-expression/expected.js.map b/test/samples/comment-within-call-expression/expected.js.map index fc7e926f..3ae595b2 100644 --- a/test/samples/comment-within-call-expression/expected.js.map +++ b/test/samples/comment-within-call-expression/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "console.log(null, /* xxx */ new Date(), /** zzz */ a.b.c()); // www\n\nconsole.log(\n\tnull, // foo\n\tnew Date()\n);\n\nconsole.log(\n\tnull, // foo\n\tnew Date()\n);\n\nconsole.log(null, /* xxx */ function (a, b) {\n\t// yyy\n\treturn a + b;\n});\n\nconsole.log(\"1\");\n" ], - "mappings": "AAAA,OAAO,CAAC,GAAG,CAAC,IAAI,YAAY,GAAG,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;;AAExD,OAAO,CAAC,GAAG;CACV,IAAI;CACJ,GAAG,CAAC,IAAI;;;AAGT,OAAO,CAAC,GAAG;CACV,IAAI;CACJ,GAAG,CAAC,IAAI;;;AAGT,OAAO,CAAC,GAAG,CAAC,IAAI,YAAY,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;;CAE5C,MAAM,CAAC,CAAC,GAAG,CAAC;AACb,CAAC;;AAED,OAAO,CAAC,GAAG,CAAC,GAAG" + "mappings": "AAAA,OAAO,CAAC,GAAG,CAAC,IAAI,YAAY,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;;AAExD,OAAO,CAAC,GAAG;CACV,IAAI;CACJ,IAAI,IAAI;;;AAGT,OAAO,CAAC,GAAG;CACV,IAAI;CACJ,IAAI,IAAI;;;AAGT,OAAO,CAAC,GAAG,CAAC,IAAI,YAAY,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;;CAE5C,OAAO,CAAC,GAAG,CAAC;AACb,CAAC;;AAED,OAAO,CAAC,GAAG,CAAC,GAAG" } \ No newline at end of file diff --git a/test/samples/comment-within-parentheses/expected.js.map b/test/samples/comment-within-parentheses/expected.js.map index 3218bc8f..34a3a1a0 100644 --- a/test/samples/comment-within-parentheses/expected.js.map +++ b/test/samples/comment-within-parentheses/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo() {\n\treturn (// hey\n\tabc);\n}\n\nfunction bar() {\n\treturn (/* hey */\n\tabc);\n}" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,MAAM;CACN,GAAG;AACJ,CAAC;;AAED,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,MAAM;CACN,GAAG;AACJ,CAAC" + "mappings": "AAAA,SAAS,GAAG,GAAG,CAAC;CACf;CACA,GAAG;AACJ,CAAC;;AAED,SAAS,GAAG,GAAG,CAAC;CACf;CACA,GAAG;AACJ,CAAC" } \ No newline at end of file diff --git a/test/samples/computed-getter/expected.js.map b/test/samples/computed-getter/expected.js.map index 448458d3..2a53e9c7 100644 --- a/test/samples/computed-getter/expected.js.map +++ b/test/samples/computed-getter/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "obj = {\n\tget [foo]() {\n\t\treturn bar;\n\t}\n}\n" ], - "mappings": "AAAA,GAAG;CACF,IAAI,CAAC,GAAG,IAAI,CAAC;EACZ,MAAM,CAAC,GAAG;CACX,CAAC;" + "mappings": "AAAA,GAAG;CACF,KAAK,GAAG,IAAI,CAAC;EACZ,OAAO,GAAG;CACX,CAAC;" } \ No newline at end of file diff --git a/test/samples/deconflict-let/expected.js.map b/test/samples/deconflict-let/expected.js.map index a5303bc2..be189b51 100644 --- a/test/samples/deconflict-let/expected.js.map +++ b/test/samples/deconflict-let/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo() {\n\tlet i = 2;\n\n\tfor (var i$1 = 0; i$1 < 10; i$1 += 1) {\n\t\tconsole.log(i$1 * i);\n\t}\n}" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,IAAI,AAAA,CAAC,GAAG,CAAC;;CAET,GAAG,EAAE,IAAI,AAAA,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;EACtC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpB,CAAC;AACF,CAAC" + "mappings": "AAAA,SAAS,GAAG,GAAG,CAAC;CACf,IAAI,CAAC,GAAG,CAAC;;CAET,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;EACtC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpB,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/destructured-declaration/expected.js.map b/test/samples/destructured-declaration/expected.js.map index 2030a2ad..50a1f201 100644 --- a/test/samples/destructured-declaration/expected.js.map +++ b/test/samples/destructured-declaration/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const { answer = 42 } = life_the_universe_and_everything;" ], - "mappings": "AAAA,MAAM,EAAE,MAAM,GAAG,EAAE,KAAK,gCAAgC" + "mappings": "AAAA,QAAQ,MAAM,GAAG,EAAE,KAAK,gCAAgC" } \ No newline at end of file diff --git a/test/samples/empty-block/expected.js.map b/test/samples/empty-block/expected.js.map index 2c6e0de2..b95d55e2 100644 --- a/test/samples/empty-block/expected.js.map +++ b/test/samples/empty-block/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "if (false) {\n\n}\n\nfunction x() {\n\n}\n" ], - "mappings": "AAAA,EAAE,EAAE,KAAK,EAAE,CAAC,AAEZ,CAAC;;AAED,QAAQ,CAAC,CAAC,GAAG,CAAC,AAEd,CAAC" + "mappings": "AAAA,IAAI,KAAK,EAAE,CAAC,AAEZ,CAAC;;AAED,SAAS,CAAC,GAAG,CAAC,AAEd,CAAC" } \ No newline at end of file diff --git a/test/samples/empty-body/expected.js.map b/test/samples/empty-body/expected.js.map index 85dadeb0..57096021 100644 --- a/test/samples/empty-body/expected.js.map +++ b/test/samples/empty-body/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "while (a) ;\ndo ; while (a);\nfor (; ; ) ;\nif (a) ;\nif (a) ; else ;\nif (a) ; else if (b) ; else ;" ], - "mappings": "AAAA,KAAK,EAAE,CAAC;;AACR,EAAE,GAAG,KAAK,EAAE,CAAC;;AACb,GAAG;;AACH,EAAE,EAAE,CAAC;AACL,EAAE,EAAE,CAAC,IAAI,IAAI;AACb,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI" + "mappings": "AAAA,OAAO,CAAC;;AACR,KAAK,OAAO,CAAC;;AACb;;AACA,IAAI,CAAC;AACL,IAAI,CAAC,IAAI;AACT,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI" } \ No newline at end of file diff --git a/test/samples/export-all-as/expected.js.map b/test/samples/export-all-as/expected.js.map index 739ed4e4..bb2bb38e 100644 --- a/test/samples/export-all-as/expected.js.map +++ b/test/samples/export-all-as/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "export * as direct from './direct.js';\nimport * as indirect from './indirect.js';\nexport { indirect };\n" ], - "mappings": "YAAY,MAAM,MAAM,aAAa;;AACrC,OAAO,AAAA,aAAa,MAAM,eAAe;;AACzC,OAAO,EAAE,QAAQ" + "mappings": "YAAY,MAAM,MAAM,aAAa;;AACrC,OAAO,aAAa,MAAM,eAAe;;AACzC,SAAS,QAAQ" } \ No newline at end of file diff --git a/test/samples/export/expected.js.map b/test/samples/export/expected.js.map index 2a451548..1e2d77b6 100644 --- a/test/samples/export/expected.js.map +++ b/test/samples/export/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const foo = 42;\nexport { foo };" ], - "mappings": "AAAA,MAAM,AAAA,GAAG,GAAG,EAAE;;AACd,OAAO,EAAE,GAAG" + "mappings": "AAAA,MAAM,GAAG,GAAG,EAAE;;AACd,SAAS,GAAG" } \ No newline at end of file diff --git a/test/samples/function-declaration/expected.js.map b/test/samples/function-declaration/expected.js.map index 7a2e6f12..fdfe6cd9 100644 --- a/test/samples/function-declaration/expected.js.map +++ b/test/samples/function-declaration/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo() {\n\tbar;\n}\n" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,GAAG;AACJ,CAAC" + "mappings": "AAAA,SAAS,GAAG,GAAG,CAAC;CACf,GAAG;AACJ,CAAC" } \ No newline at end of file diff --git a/test/samples/function-expression/expected.js.map b/test/samples/function-expression/expected.js.map index 301d7422..4c1cfd1d 100644 --- a/test/samples/function-expression/expected.js.map +++ b/test/samples/function-expression/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "(function(){\n\n})\nlet object = {\n foo() {\n \n }\n}" ], - "mappings": "CAAC,QAAQ,IAAE,CAAC,AAEZ,CAAC;;AACD,IAAI,AAAA,MAAM,KACN,GAAG,GAAG,CAAC,AAEP,CAAC" + "mappings": "CAAC,YAAU,CAAC,AAEZ,CAAC;;AACD,IAAI,MAAM,KACN,GAAG,GAAG,CAAC,AAEP,CAAC" } \ No newline at end of file diff --git a/test/samples/import-as/expected.js.map b/test/samples/import-as/expected.js.map index 80f35c4e..17e80b78 100644 --- a/test/samples/import-as/expected.js.map +++ b/test/samples/import-as/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import { foo as bar } from 'x';" ], - "mappings": "AAAA,OAAO,EAAE,GAAG,IAAI,GAAG,QAAQ,GAAG" + "mappings": "AAAA,SAAS,GAAG,IAAI,GAAG,QAAQ,GAAG" } \ No newline at end of file diff --git a/test/samples/import-attributes/expected.js.map b/test/samples/import-attributes/expected.js.map index 09041d35..ffef80b5 100644 --- a/test/samples/import-attributes/expected.js.map +++ b/test/samples/import-attributes/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import { foo } from 'x' with {type: 'json'};\nimport { bar } from 'y' with { \"blah\": \"true\", baz: \"false\" };\nimport('baz', { with: { stuff: true }}).then(blah);" ], - "mappings": "AAAA,OAAO,EAAE,GAAG,QAAQ,GAAG,QAAO,IAAI,EAAE,MAAM;AAC1C,OAAO,EAAE,GAAG,QAAQ,GAAG,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO;;AAC3D,MAAM,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,MAAK,IAAI,CAAC,IAAI" + "mappings": "AAAA,SAAS,GAAG,QAAQ,GAAG,QAAO,IAAI,EAAE,MAAM;AAC1C,SAAS,GAAG,QAAQ,GAAG,QAAQ,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO;;AAC3D,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,MAAK,IAAI,CAAC,IAAI" } \ No newline at end of file diff --git a/test/samples/import-default-and-named/expected.js.map b/test/samples/import-default-and-named/expected.js.map index 8ad4d8af..2ff307a6 100644 --- a/test/samples/import-default-and-named/expected.js.map +++ b/test/samples/import-default-and-named/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import a, { b, c as d } from 'x';" ], - "mappings": "AAAA,OAAO,AAAA,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG" + "mappings": "AAAA,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG" } \ No newline at end of file diff --git a/test/samples/import-default-and-namespace/expected.js.map b/test/samples/import-default-and-namespace/expected.js.map index 085067ab..e43e733d 100644 --- a/test/samples/import-default-and-namespace/expected.js.map +++ b/test/samples/import-default-and-namespace/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import a, * as b from 'x';\n" ], - "mappings": "AAAA,OAAO,AAAA,CAAC,EAAE,MAAM,MAAM,GAAG" + "mappings": "AAAA,OAAO,CAAC,EAAE,MAAM,MAAM,GAAG" } \ No newline at end of file diff --git a/test/samples/import-many/expected.js.map b/test/samples/import-many/expected.js.map index e65a88ab..4c05bb77 100644 --- a/test/samples/import-many/expected.js.map +++ b/test/samples/import-many/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import {\n\tabc,\n\tbcd,\n\tcde,\n\tdef,\n\tefg,\n\tfgh,\n\tghi,\n\thij,\n\tijk,\n\tjkl,\n\tklm,\n\tlmn,\n\tmno,\n\tnop,\n\topq\n} from 'x';" ], - "mappings": "AAAA,OAAO;CACN,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;OACG,GAAG" + "mappings": "AAAA;CACC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;OACG,GAAG" } \ No newline at end of file diff --git a/test/samples/import/expected.js.map b/test/samples/import/expected.js.map index 98b9d1a7..4515409d 100644 --- a/test/samples/import/expected.js.map +++ b/test/samples/import/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import { foo } from 'x';\nimport { bar } from 'y';\nimport('baz').then(blah);" ], - "mappings": "AAAA,OAAO,EAAE,GAAG,QAAQ,GAAG;AACvB,OAAO,EAAE,GAAG,QAAQ,GAAG;;AACvB,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI" + "mappings": "AAAA,SAAS,GAAG,QAAQ,GAAG;AACvB,SAAS,GAAG,QAAQ,GAAG;;AACvB,OAAO,KAAK,EAAE,IAAI,CAAC,IAAI" } \ No newline at end of file diff --git a/test/samples/inserted-parameter/expected.js.map b/test/samples/inserted-parameter/expected.js.map index 5ca7679c..7895c3b8 100644 --- a/test/samples/inserted-parameter/expected.js.map +++ b/test/samples/inserted-parameter/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo(bar) {\n\treturn bar * 2;\n}" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;CAClB,MAAM,CAAC,GAAG,GAAG,CAAC;AACf,CAAC" + "mappings": "AAAA,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC;CAClB,OAAO,GAAG,GAAG,CAAC;AACf,CAAC" } \ No newline at end of file diff --git a/test/samples/inserted-parameters/expected.js.map b/test/samples/inserted-parameters/expected.js.map index 2edb5b61..a8fa5051 100644 --- a/test/samples/inserted-parameters/expected.js.map +++ b/test/samples/inserted-parameters/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo(bar, baz) {\n\treturn bar * baz;\n}" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;CACvB,MAAM,CAAC,GAAG,GAAG,GAAG;AACjB,CAAC" + "mappings": "AAAA,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;CACvB,OAAO,GAAG,GAAG,GAAG;AACjB,CAAC" } \ No newline at end of file diff --git a/test/samples/jsdoc-indentation/expected.js.map b/test/samples/jsdoc-indentation/expected.js.map index 36f05826..ec269303 100644 --- a/test/samples/jsdoc-indentation/expected.js.map +++ b/test/samples/jsdoc-indentation/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Foo {\n\t/**\n\t * @param {number} a\n\t * @param {number} b\n\t */\n\tadd(a, b) {\n\t\treturn a + b;\n\t}\n}\n" ], - "mappings": "AAAA,MAAM,AAAA,GAAG,CAAC,CAAC;;;;;CAKV,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;EACV,MAAM,CAAC,CAAC,GAAG,CAAC;CACb,CAAC;AACF,CAAC" + "mappings": "AAAA,MAAM,GAAG,CAAC,CAAC;;;;;CAKV,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;EACV,OAAO,CAAC,GAAG,CAAC;CACb,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/meta-property/expected.js.map b/test/samples/meta-property/expected.js.map index 2b743efb..29e1a314 100644 --- a/test/samples/meta-property/expected.js.map +++ b/test/samples/meta-property/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo() {\n\tconsole.log(new.target);\n}" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,GAAG,CAAC;CACf,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM;AACvB,CAAC" + "mappings": "AAAA,SAAS,GAAG,GAAG,CAAC;CACf,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM;AACvB,CAAC" } \ No newline at end of file diff --git a/test/samples/method/expected.js.map b/test/samples/method/expected.js.map index 158f8f97..c95fd75b 100644 --- a/test/samples/method/expected.js.map +++ b/test/samples/method/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "obj = {\n\tfoo() {\n\t\tconsole.log('foo');\n\t},\n\tasync bar() {\n\t\tconsole.log('bar');\n\t},\n\t*baz() {\n\t\tconsole.log('baz');\n\t}\n};" ], - "mappings": "AAAA,GAAG;CACF,GAAG,GAAG,CAAC;EACN,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;;CACD,MAAM,AAAA,GAAG,GAAG,CAAC;EACZ,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;;EACA,GAAG,GAAG,CAAC;EACP,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;" + "mappings": "AAAA,GAAG;CACF,GAAG,GAAG,CAAC;EACN,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;;CACD,MAAM,GAAG,GAAG,CAAC;EACZ,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;;EACA,GAAG,GAAG,CAAC;EACP,OAAO,CAAC,GAAG,CAAC,KAAK;CAClB,CAAC;" } \ No newline at end of file diff --git a/test/samples/object-expressions/expected.js.map b/test/samples/object-expressions/expected.js.map index bce06671..854d861f 100644 --- a/test/samples/object-expressions/expected.js.map +++ b/test/samples/object-expressions/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "obj = { foo, bar, baz: qux };\nobj = { \"1\": \"1\" };\nobj = { true: true };\nobj = { foo };\nobj = { [foo]: foo };\nobj = { [foo]: \"foo\" };\nlet blah;\nobj = { blah };\nobj = { blah };\nobj = { a: b };\n({ a: 1, b: 1 });\n\nobj = {\n\tmethod() {\n\t\tconsole.log('hello');\n\t}\n};\n\nempty = {};\nopts = opts || {};\n\nobj = {\n\tget foo() {\n\t\treturn _foo;\n\t},\n\tset foo(value) {\n\t\t_foo = value;\n\t},\n\tget [foo]() {\n\t\treturn _foo;\n\t},\n\tset [foo](value) {\n\t\t_foo = value;\n\t}\n};" ], - "mappings": "AAAA,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;AAC1B,GAAG,KAAK,GAAG,EAAE,GAAG;AAChB,GAAG,KAAK,IAAI,EAAE,IAAI;AAClB,GAAG,KAAK,GAAG;AACX,GAAG,MAAM,GAAG,GAAG,GAAG;AAClB,GAAG,MAAM,GAAG,GAAG,KAAK;;AACpB,IAAI,AAAA,IAAI;;AACR,GAAG,KAAK,IAAI;AACZ,GAAG,KAAK,IAAI;AACZ,GAAG,KAAK,CAAC,EAAE,CAAC;GACT,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;;AAEb,GAAG;CACF,MAAM,GAAG,CAAC;EACT,OAAO,CAAC,GAAG,CAAC,OAAO;CACpB,CAAC;;;AAGF,KAAK;AACL,IAAI,GAAG,IAAI;;AAEX,GAAG;CACF,IAAI,AAAA,GAAG,GAAG,CAAC;EACV,MAAM,CAAC,IAAI;CACZ,CAAC;;CACD,IAAI,AAAA,GAAG,CAAC,KAAK,EAAE,CAAC;EACf,IAAI,GAAG,KAAK;CACb,CAAC;;CACD,IAAI,CAAC,GAAG,IAAI,CAAC;EACZ,MAAM,CAAC,IAAI;CACZ,CAAC;;CACD,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC;EACjB,IAAI,GAAG,KAAK;CACb,CAAC;" + "mappings": "AAAA,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;AAC1B,GAAG,KAAK,GAAG,EAAE,GAAG;AAChB,GAAG,KAAK,IAAI,EAAE,IAAI;AAClB,GAAG,KAAK,GAAG;AACX,GAAG,MAAM,GAAG,GAAG,GAAG;AAClB,GAAG,MAAM,GAAG,GAAG,KAAK;;AACpB,IAAI,IAAI;;AACR,GAAG,KAAK,IAAI;AACZ,GAAG,KAAK,IAAI;AACZ,GAAG,KAAK,CAAC,EAAE,CAAC;GACT,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;;AAEb,GAAG;CACF,MAAM,GAAG,CAAC;EACT,OAAO,CAAC,GAAG,CAAC,OAAO;CACpB,CAAC;;;AAGF,KAAK;AACL,IAAI,GAAG,IAAI;;AAEX,GAAG;CACF,IAAI,GAAG,GAAG,CAAC;EACV,OAAO,IAAI;CACZ,CAAC;;CACD,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;EACf,IAAI,GAAG,KAAK;CACb,CAAC;;CACD,KAAK,GAAG,IAAI,CAAC;EACZ,OAAO,IAAI;CACZ,CAAC;;CACD,KAAK,GAAG,EAAE,KAAK,EAAE,CAAC;EACjB,IAAI,GAAG,KAAK;CACb,CAAC;" } \ No newline at end of file diff --git a/test/samples/object-format/expected.js.map b/test/samples/object-format/expected.js.map index a2899e3e..17ec5604 100644 --- a/test/samples/object-format/expected.js.map +++ b/test/samples/object-format/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const obj1 = {\n\tfoo: 'bar',\n\tlevel11: { level12: { hello: 'world' } },\n\tlevel21: { level22: { world: 'hello' } },\n\thello: 'world',\n\tlevel31: { level32: { world: 'hello' } }\n};\n\nconst obj2 = {\n\tbefore: 1,\n\tobject: {\n\t\ta: 'lorem ipsum dolor sit amet',\n\t\tb: 'lorem ipsum dolor sit amet',\n\t\tc: 'lorem ipsum dolor sit amet',\n\t\td: 'lorem ipsum dolor sit amet'\n\t},\n\tarray: [\n\t\t'lorem ipsum dolor sit amet',\n\t\t'lorem ipsum dolor sit amet',\n\t\t'lorem ipsum dolor sit amet',\n\t\t'lorem ipsum dolor sit amet'\n\t],\n\tafter: 2\n};\n" ], - "mappings": "AAAA,MAAM,AAAA,IAAI;CACT,GAAG,EAAE,KAAK;CACV,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;CACpC,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;CACpC,KAAK,EAAE,OAAO;CACd,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;;;AAGrC,MAAM,AAAA,IAAI;CACT,MAAM,EAAE,CAAC;CACT,MAAM;EACL,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;;CAEhC,KAAK;EACJ,4BAA4B;EAC5B,4BAA4B;EAC5B,4BAA4B;EAC5B,4BAA4B;;CAE7B,KAAK,EAAE,CAAC;" + "mappings": "AAAA,MAAM,IAAI;CACT,GAAG,EAAE,KAAK;CACV,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;CACpC,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;CACpC,KAAK,EAAE,OAAO;CACd,OAAO,IAAI,OAAO,IAAI,KAAK,EAAE,OAAO;;;AAGrC,MAAM,IAAI;CACT,MAAM,EAAE,CAAC;CACT,MAAM;EACL,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;EAC/B,CAAC,EAAE,4BAA4B;;CAEhC,KAAK;EACJ,4BAA4B;EAC5B,4BAA4B;EAC5B,4BAA4B;EAC5B,4BAA4B;;CAE7B,KAAK,EAAE,CAAC;" } \ No newline at end of file diff --git a/test/samples/string-literal/expected.js.map b/test/samples/string-literal/expected.js.map index 1a6a2014..d8b5e4b0 100644 --- a/test/samples/string-literal/expected.js.map +++ b/test/samples/string-literal/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "let a = 'foo';\nlet b = \"foo\";\nlet c = `foo`;\nlet d = '\\n\\t\\ta\\n\\t\\tb\\n\\t\\tc\\n\\t';\nlet e = \"\\n\\t\\ta\\n\\t\\tb\\n\\t\\tc\\n\\t\";\n\nlet f = `\n\t\ta\n\t\tb\n\t\tc\n\t`;" ], - "mappings": "AAAA,IAAI,AAAA,CAAC,GAAG,KAAK;AACb,IAAI,AAAA,CAAC,GAAG,KAAK;AACb,IAAI,AAAA,CAAC;AACL,IAAI,AAAA,CAAC,GAAG,2BAA2B;AACnC,IAAI,AAAA,CAAC,GAAG,2BAA2B;;AAEnC,IAAI,AAAA,CAAC;;;;" + "mappings": "AAAA,IAAI,CAAC,GAAG,KAAK;AACb,IAAI,CAAC,GAAG,KAAK;AACb,IAAI,CAAC;AACL,IAAI,CAAC,GAAG,2BAA2B;AACnC,IAAI,CAAC,GAAG,2BAA2B;;AAEnC,IAAI,CAAC;;;;" } \ No newline at end of file diff --git a/test/samples/switch/expected.js.map b/test/samples/switch/expected.js.map index 7896dc67..8f702e94 100644 --- a/test/samples/switch/expected.js.map +++ b/test/samples/switch/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "switch (foo) {\n\tcase 1:\n\t\tblah();\n\t\tbreak;\n\tcase 2:\n\t\tblah();\n\tdefault:\n\t\tblah();\n}" ], - "mappings": "AAAA,MAAM,EAAE,GAAG;CACV,IAAI,CAAC,CAAC;EACL,IAAI;EACJ,KAAK;;CACN,IAAI,CAAC,CAAC;EACL,IAAI;;CACL,OAAO;EACN,IAAI;" + "mappings": "AAAA,QAAQ,GAAG;CACV,KAAK,CAAC;EACL,IAAI;EACJ;;CACD,KAAK,CAAC;EACL,IAAI;;CACL;EACC,IAAI;" } \ No newline at end of file diff --git a/test/samples/try-catch/expected.js.map b/test/samples/try-catch/expected.js.map index b03737cc..f93d3359 100644 --- a/test/samples/try-catch/expected.js.map +++ b/test/samples/try-catch/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "try {\n\tfoo();\n} catch {\n\tbar();\n}\n\ntry {\n\tfoo();\n} catch(e) {\n\tbar(e);\n} finally {\n\tbaz();\n}" ], - "mappings": "AAAA,GAAG,CAAC,CAAC;CACJ,GAAG;AACJ,CAAC,CAAC,KAAK,CAAC,CAAC;CACR,GAAG;AACJ,CAAC;;AAED,GAAG,CAAC,CAAC;CACJ,GAAG;AACJ,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;CACX,GAAG,CAAC,CAAC;AACN,CAAC,CAAC,OAAO,CAAC,CAAC;CACV,GAAG;AACJ,CAAC" + "mappings": "AAAA,IAAI,CAAC;CACJ,GAAG;AACJ,CAAC,CAAC,MAAM,CAAC;CACR,GAAG;AACJ,CAAC;;AAED,IAAI,CAAC;CACJ,GAAG;AACJ,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;CACX,GAAG,CAAC,CAAC;AACN,CAAC,CAAC,QAAQ,CAAC;CACV,GAAG;AACJ,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-abstract-class/expected.ts.map b/test/samples/ts-abstract-class/expected.ts.map index 49c762ec..e02e4216 100644 --- a/test/samples/ts-abstract-class/expected.ts.map +++ b/test/samples/ts-abstract-class/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "abstract class A {\n\tabstract foo: string;\n\tabstract bar: string;\n\n\tabstract get a();\n\tabstract set b(x: string);\n}\n\nclass B extends A {\n\toverride a() {\n\t\treturn this.foo;\n\t}\n}\n" ], - "mappings": "AAAA,SAAS,AAAA,MAAM,AAAA,CAAC,CAAC,CAAC;CACjB,SAAS,AAAA,GAAG,EAAE,MAAM;CACpB,SAAS,AAAA,GAAG,EAAE,MAAM;;CAEpB,SAAS,AAAA,IAAI,AAAA,CAAC;CACd,SAAS,AAAA,IAAI,AAAA,CAAC,CAAC,CAAS,EAAN,MAAM;AACzB,CAAC;;AAED,MAAM,AAAA,CAAC,SAAS,CAAC,CAAC,CAAC;CAClB,SAAS,AAAA,CAAC,GAAG,CAAC;EACb,MAAM,CAAC,IAAI,CAAC,GAAG;CAChB,CAAC;AACF,CAAC" + "mappings": "AAAA,SAAS,MAAM,CAAC,CAAC,CAAC;CACjB,SAAS,GAAG,EAAE,MAAM;CACpB,SAAS,GAAG,EAAE,MAAM;;CAEpB,SAAS,IAAI,CAAC;CACd,SAAS,IAAI,CAAC,CAAC,CAAS,EAAN,MAAM;AACzB,CAAC;;AAED,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAClB,SAAS,CAAC,GAAG,CAAC;EACb,OAAO,IAAI,CAAC,GAAG;CAChB,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-accessor-properties/expected.ts.map b/test/samples/ts-accessor-properties/expected.ts.map index 84119d7c..c4b045de 100644 --- a/test/samples/ts-accessor-properties/expected.ts.map +++ b/test/samples/ts-accessor-properties/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Example {\n\taccessor count: number = 0;\n\tprivate accessor privateCount: number;\n\tpublic accessor publicCount: number = 5;\n\tprotected accessor protectedCount: number;\n}\n\nabstract class AbstractExample {\n\tabstract accessor abstractCount: number;\n\tprotected abstract accessor protectedAbstractCount: number;\n}\n\nclass MyClass {\n\tconstructor(\n\t\tprotected x: number,\n\t\tprivate y: string\n\t) {}\n}\n" ], - "mappings": "AAAA,MAAM,AAAA,OAAO,CAAC,CAAC;CACd,SAAS,AAAA,KAAK,EAAE,MAAM,GAAG,CAAC;CAC1B,QAAQ,AAAA,SAAS,AAAA,YAAY,EAAE,MAAM;CACrC,OAAO,AAAA,SAAS,AAAA,WAAW,EAAE,MAAM,GAAG,CAAC;CACvC,UAAU,AAAA,SAAS,AAAA,cAAc,EAAE,MAAM;AAC1C,CAAC;;AAED,SAAS,AAAA,MAAM,AAAA,eAAe,CAAC,CAAC;CAC/B,SAAS,AAAA,SAAS,AAAA,aAAa,EAAE,MAAM;CACvC,UAAU,AAAA,SAAS,AAAA,SAAS,AAAA,sBAAsB,EAAE,MAAM;AAC3D,CAAC;;AAED,MAAM,AAAA,OAAO,CAAC,CAAC;CACd,WAAW,WACA,CAAS,EAAN,MAAM,UACX,CAAS,EAAN,MAAM,EAChB,CAAC,AAAA,CAAC;AACL,CAAC" + "mappings": "AAAA,MAAM,OAAO,CAAC,CAAC;CACd,SAAS,KAAK,EAAE,MAAM,GAAG,CAAC;CAC1B,QAAQ,SAAS,YAAY,EAAE,MAAM;CACrC,OAAO,SAAS,WAAW,EAAE,MAAM,GAAG,CAAC;CACvC,UAAU,SAAS,cAAc,EAAE,MAAM;AAC1C,CAAC;;AAED,SAAS,MAAM,eAAe,CAAC,CAAC;CAC/B,SAAS,SAAS,aAAa,EAAE,MAAM;CACvC,UAAU,SAAS,SAAS,sBAAsB,EAAE,MAAM;AAC3D,CAAC;;AAED,MAAM,OAAO,CAAC,CAAC;CACd,WAAW,WACA,CAAS,EAAN,MAAM,UACX,CAAS,EAAN,MAAM,EAChB,CAAC,AAAA,CAAC;AACL,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-arrow-as-const-object/expected.ts.map b/test/samples/ts-arrow-as-const-object/expected.ts.map index 072a6adb..8aa1d09f 100644 --- a/test/samples/ts-arrow-as-const-object/expected.ts.map +++ b/test/samples/ts-arrow-as-const-object/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const as_const = [].map(() => ({ baz }) as const);\nconst non_null = [].map(() => ({ baz: 1 })!);\nconst satisfies = [].map(() => ({ x: 1 }) satisfies { x: number });\n" ], - "mappings": "AAAA,MAAM,AAAA,QAAQ,MAAM,GAAG,UAAU,GAAG,MAAO,KAAK;AAChD,MAAM,AAAA,QAAQ,MAAM,GAAG,UAAU,GAAG,EAAE,CAAC;AACvC,MAAM,AAAA,SAAS,MAAM,GAAG,WAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM" + "mappings": "AAAA,MAAM,QAAQ,MAAM,GAAG,UAAU,GAAG,MAAO,KAAK;AAChD,MAAM,QAAQ,MAAM,GAAG,UAAU,GAAG,EAAE,CAAC;AACvC,MAAM,SAAS,MAAM,GAAG,WAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,MAAM" } \ No newline at end of file diff --git a/test/samples/ts-arrow-function-types/expected.ts.map b/test/samples/ts-arrow-function-types/expected.ts.map index 49c4099f..994ddcc4 100644 --- a/test/samples/ts-arrow-function-types/expected.ts.map +++ b/test/samples/ts-arrow-function-types/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const identity = (x: T): T => x;\n\nconst pair = (key: K, value: V): [K, V] => [key, value];\n\nconst noTypeParams = (x: number): number => x + 1;\n\nconst onlyTypeParams = (x: T) => x;\n\nconst onlyReturnType = (x: number): string => String(x);\n\nconst constrained = (x: T): T => x;\n\nconst withDefault = (x: T): T => x;\n\nconst constrainedWithDefault = (x: T): T => x;\n" ], - "mappings": "AAAA,MAAM,AAAA,QAAQ,IAAI,CAAC,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAElC,MAAM,AAAA,IAAI,IAAI,CAAC,EAAE,CAAC,EAAE,GAAM,EAAD,CAAC,EAAE,KAAQ,EAAD,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,KAAK;AAE5D,MAAM,AAAA,YAAY,IAAI,CAAS,EAAN,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC;AAEjD,MAAM,AAAA,cAAc,IAAI,CAAC,EAAE,CAAI,EAAD,CAAC,KAAK,CAAC;AAErC,MAAM,AAAA,cAAc,IAAI,CAAS,EAAN,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC;AAEtD,MAAM,AAAA,WAAW,IAAI,CAAgB,SAAN,MAAM,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAEpD,MAAM,AAAA,WAAW,IAAI,CAAU,GAAN,MAAM,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAE9C,MAAM,AAAA,sBAAsB,IAAI,CAAwB,SAAd,MAAM,GAAG,KAAK,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC" + "mappings": "AAAA,MAAM,QAAQ,IAAI,CAAC,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAElC,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC,EAAE,GAAM,EAAD,CAAC,EAAE,KAAQ,EAAD,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,KAAK;AAE5D,MAAM,YAAY,IAAI,CAAS,EAAN,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC;AAEjD,MAAM,cAAc,IAAI,CAAC,EAAE,CAAI,EAAD,CAAC,KAAK,CAAC;AAErC,MAAM,cAAc,IAAI,CAAS,EAAN,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,IAAI,CAAgB,SAAN,MAAM,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAEpD,MAAM,WAAW,IAAI,CAAU,GAAN,MAAM,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC;AAE9C,MAAM,sBAAsB,IAAI,CAAwB,SAAd,MAAM,GAAG,KAAK,EAAE,CAAI,EAAD,CAAC,GAAG,CAAC,IAAI,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-as-expression/expected.ts.map b/test/samples/ts-as-expression/expected.ts.map index 4b61aca8..b1e02132 100644 --- a/test/samples/ts-as-expression/expected.ts.map +++ b/test/samples/ts-as-expression/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const a: number = 42;\nconst b = a as unknown as string;\n\ntype C = {\n\tname: string;\n};\n\ntype D = {\n\tfirstName: string;\n};\n\nconst e: C = {\n\tname: 'foo'\n} as unknown as D;\n\nconst f = (Math.random() > 0.5 ? { firstName: 'name1' } : { firstName: 'name2' }) as unknown as D;\n\nconst g = h(e['name']) as (scope: ng.IScope) => b;\n" ], - "mappings": "AAAA,MAAM,AAAA,CAAS,EAAN,MAAM,GAAG,EAAE;AACpB,MAAM,AAAA,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,MAAM;;KAE3B,CAAC,KACL,IAAI,EAAE,MAAM;KAGR,CAAC,KACL,SAAS,EAAE,MAAM;;AAGlB,MAAM,AAAA,CAAI,EAAD,CAAC,KACT,IAAI,EAAE,KAAK,MACP,OAAO,IAAI,CAAC;AAEjB,MAAM,AAAA,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,KAAK,SAAS,EAAE,OAAO,OAAO,SAAS,EAAE,OAAO,OAAO,OAAO,IAAI,CAAC;AAEjG,MAAM,AAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,KAAgB,EAAT,EAAE,CAAC,MAAM,KAAK,CAAC" + "mappings": "AAAA,MAAM,CAAS,EAAN,MAAM,GAAG,EAAE;AACpB,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,MAAM;;KAE3B,CAAC,KACL,IAAI,EAAE,MAAM;KAGR,CAAC,KACL,SAAS,EAAE,MAAM;;AAGlB,MAAM,CAAI,EAAD,CAAC,KACT,IAAI,EAAE,KAAK,MACP,OAAO,IAAI,CAAC;AAEjB,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,KAAK,SAAS,EAAE,OAAO,OAAO,SAAS,EAAE,OAAO,OAAO,OAAO,IAAI,CAAC;AAEjG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,OAAO,KAAgB,EAAT,EAAE,CAAC,MAAM,KAAK,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-class-extends-generic/expected.ts.map b/test/samples/ts-class-extends-generic/expected.ts.map index 82820470..0a952c21 100644 --- a/test/samples/ts-class-extends-generic/expected.ts.map +++ b/test/samples/ts-class-extends-generic/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Foo extends Bar {}\n" ], - "mappings": "AAAA,MAAM,AAAA,GAAG,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC,AAAA,CAAC" + "mappings": "AAAA,MAAM,GAAG,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC,AAAA,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-class-properties/expected.ts.map b/test/samples/ts-class-properties/expected.ts.map index ad735449..9344f80e 100644 --- a/test/samples/ts-class-properties/expected.ts.map +++ b/test/samples/ts-class-properties/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class A {\n\tprivate name: string;\n\tpublic firstName: string;\n\tpublic lastName: string;\n\tpublic static foo: string;\n\n\tprivate x() {\n\t\treturn 1;\n\t}\n\tpublic y() {\n\t\treturn 2;\n\t}\n\tprotected z() {\n\t\treturn 3;\n\t}\n}\n" ], - "mappings": "AAAA,MAAM,AAAA,CAAC,CAAC,CAAC;CACR,QAAQ,AAAA,IAAI,EAAE,MAAM;CACpB,OAAO,AAAA,SAAS,EAAE,MAAM;CACxB,OAAO,AAAA,QAAQ,EAAE,MAAM;CACvB,OAAO,AAAA,OAAO,AAAA,GAAG,EAAE,MAAM;;CAEzB,QAAQ,AAAA,CAAC,GAAG,CAAC;EACZ,MAAM,CAAC,CAAC;CACT,CAAC;;CACD,OAAO,AAAA,CAAC,GAAG,CAAC;EACX,MAAM,CAAC,CAAC;CACT,CAAC;;CACD,UAAU,AAAA,CAAC,GAAG,CAAC;EACd,MAAM,CAAC,CAAC;CACT,CAAC;AACF,CAAC" + "mappings": "AAAA,MAAM,CAAC,CAAC,CAAC;CACR,QAAQ,IAAI,EAAE,MAAM;CACpB,OAAO,SAAS,EAAE,MAAM;CACxB,OAAO,QAAQ,EAAE,MAAM;CACvB,OAAO,OAAO,GAAG,EAAE,MAAM;;CAEzB,QAAQ,CAAC,GAAG,CAAC;EACZ,OAAO,CAAC;CACT,CAAC;;CACD,OAAO,CAAC,GAAG,CAAC;EACX,OAAO,CAAC;CACT,CAAC;;CACD,UAAU,CAAC,GAAG,CAAC;EACd,OAAO,CAAC;CACT,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-declare/expected.ts.map b/test/samples/ts-declare/expected.ts.map index b8124dbd..dc623393 100644 --- a/test/samples/ts-declare/expected.ts.map +++ b/test/samples/ts-declare/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "declare function a(): void;\ndeclare const b: number;\ndeclare class c {}\n\nexport {};\n" ], - "mappings": "AAAA,QAAQ,AAAA,QAAQ,CAAC,CAAC,IAAI,IAAI;;AAC1B,QAAQ,AAAA,MAAM,AAAA,CAAS,EAAN,MAAM;;AACvB,QAAQ,AAAA,MAAM,AAAA,CAAC,CAAC,CAAC,AAAA,CAAC;;AAElB,OAAO" + "mappings": "AAAA,QAAQ,SAAS,CAAC,IAAI,IAAI;;AAC1B,QAAQ,MAAM,CAAS,EAAN,MAAM;;AACvB,QAAQ,MAAM,CAAC,CAAC,CAAC,AAAA,CAAC;;AAElB" } \ No newline at end of file diff --git a/test/samples/ts-decorators-class/expected.ts.map b/test/samples/ts-decorators-class/expected.ts.map index 261cf0bf..2dbc16bd 100644 --- a/test/samples/ts-decorators-class/expected.ts.map +++ b/test/samples/ts-decorators-class/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "export class Entity {\n\tconstructor(\n\t\tprivate readonly name: string,\n\t\tprivate readonly info: boolean\n\t) {}\n}\n\n@Entity('users', { info: true })\nexport class User {}\n\n@Entity('categories', { info: false })\nclass Category {}\n\n@Entity('tasks', { info: true })\nexport class Task {}\n\nconst u = new User();\nconst c = new Category();\nconst t = new Task();\n" ], - "mappings": "AAAA,MAAM,CAAC,MAAM,AAAA,MAAM,CAAC,CAAC;CACpB,WAAW;mBACO,IAAY,EAAN,MAAM;mBACZ,IAAa,EAAP,OAAO;GAC7B,CAAC,AAAA,CAAC;AACL,CAAC;;CAEA,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI;AAC7B,MAAM,OAAO,IAAI,CAAC,CAAC,AAAA,CAAC;;CAEnB,MAAM,CAAC,YAAY,IAAI,IAAI,EAAE,KAAK;MAC7B,QAAQ,CAAC,CAAC,AAAA,CAAC;;CAEhB,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI;AAC7B,MAAM,OAAO,IAAI,CAAC,CAAC,AAAA,CAAC;;AAEpB,MAAM,AAAA,CAAC,GAAG,GAAG,CAAC,IAAI;AAClB,MAAM,AAAA,CAAC,GAAG,GAAG,CAAC,QAAQ;AACtB,MAAM,AAAA,CAAC,GAAG,GAAG,CAAC,IAAI" + "mappings": "AAAA,OAAO,MAAM,MAAM,CAAC,CAAC;CACpB,WAAW;mBACO,IAAY,EAAN,MAAM;mBACZ,IAAa,EAAP,OAAO;GAC7B,CAAC,AAAA,CAAC;AACL,CAAC;;CAEA,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI;AAC7B,aAAa,IAAI,CAAC,CAAC,AAAA,CAAC;;CAEnB,MAAM,CAAC,YAAY,IAAI,IAAI,EAAE,KAAK;MAC7B,QAAQ,CAAC,CAAC,AAAA,CAAC;;CAEhB,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI;AAC7B,aAAa,IAAI,CAAC,CAAC,AAAA,CAAC;;AAEpB,MAAM,CAAC,GAAG,IAAI,IAAI;AAClB,MAAM,CAAC,GAAG,IAAI,QAAQ;AACtB,MAAM,CAAC,GAAG,IAAI,IAAI" } \ No newline at end of file diff --git a/test/samples/ts-decorators-expression/expected.ts.map b/test/samples/ts-decorators-expression/expected.ts.map index 065eae78..71a2a136 100644 --- a/test/samples/ts-decorators-expression/expected.ts.map +++ b/test/samples/ts-decorators-expression/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Fields {\n\tstatic uuid() {\n\t\treturn function (target: any, propertyKey: string | symbol) {\n\t\t\tObject.defineProperty(target, propertyKey, { value: 'random uuid...', writable: true });\n\t\t};\n\t}\n}\n\nclass User {\n\t@Fields.uuid()\n\tid: string;\n}\n\nconst u = new User();\nconsole.log(u.id); // will print \"random uuid...\"\n" ], - "mappings": "AAAA,MAAM,AAAA,MAAM,CAAC,CAAC;CACb,OAAO,AAAA,IAAI,GAAG,CAAC;EACd,MAAM,CAAC,QAAQ,EAAE,MAAW,EAAH,GAAG,EAAE,WAA4B,EAAf,MAAM,GAAG,MAAM,EAAE,CAAC;GAC5D,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,IAAI,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI;EACrF,CAAC;CACF,CAAC;AACF,CAAC;;AAED,MAAM,AAAA,IAAI,CAAC,CAAC;EACV,MAAM,CAAC,IAAI;CACZ,EAAE,EAAE,MAAM;AACX,CAAC;;AAED,MAAM,AAAA,CAAC,GAAG,GAAG,CAAC,IAAI;;AAClB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE" + "mappings": "AAAA,MAAM,MAAM,CAAC,CAAC;CACb,OAAO,IAAI,GAAG,CAAC;EACd,OAAO,UAAU,MAAW,EAAH,GAAG,EAAE,WAA4B,EAAf,MAAM,GAAG,MAAM,EAAE,CAAC;GAC5D,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,IAAI,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI;EACrF,CAAC;CACF,CAAC;AACF,CAAC;;AAED,MAAM,IAAI,CAAC,CAAC;EACV,MAAM,CAAC,IAAI;CACZ,EAAE,EAAE,MAAM;AACX,CAAC;;AAED,MAAM,CAAC,GAAG,IAAI,IAAI;;AAClB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE" } \ No newline at end of file diff --git a/test/samples/ts-decorators/expected.ts.map b/test/samples/ts-decorators/expected.ts.map index af67321c..fbd02f2e 100644 --- a/test/samples/ts-decorators/expected.ts.map +++ b/test/samples/ts-decorators/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function loggedMethod(headMessage = 'LOG:') {\n\treturn function actualDecorator(originalMethod: any, context: ClassMethodDecoratorContext) {\n\t\tconst methodName = String(context.name);\n\n\t\tfunction replacementMethod(this: any, ...args: any[]) {\n\t\t\tconsole.log(`${headMessage} Entering method '${methodName}'.`);\n\t\t\tconst result = originalMethod.call(this, ...args);\n\t\t\tconsole.log(`${headMessage} Exiting method '${methodName}'.`);\n\t\t\treturn result;\n\t\t}\n\n\t\treturn replacementMethod;\n\t};\n}\n\nclass Person {\n\tname: string;\n\tconstructor(name: string) {\n\t\tthis.name = name;\n\t}\n\n\t@loggedMethod('⚠️')\n\tgreet() {\n\t\tconsole.log(`Hello, my name is ${this.name}.`);\n\t}\n}\n\nconst p = new Person('Ron');\np.greet();\n" ], - "mappings": "AAAA,QAAQ,CAAC,YAAY,CAAC,WAAW,GAAG,MAAM,EAAE,CAAC;CAC5C,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,cAAmB,EAAH,GAAG,EAAE,OAAoC,EAA3B,2BAA2B,EAAE,CAAC;EAC3F,MAAM,AAAA,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI;;EAEtC,QAAQ,CAAC,iBAAiB,CAAC,IAAS,EAAH,GAAG,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC;GACtD,OAAO,CAAC,GAAG,IAAI,WAAW,qBAAqB,UAAU;;GACzD,MAAM,AAAA,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI;;GAChD,OAAO,CAAC,GAAG,IAAI,WAAW,oBAAoB,UAAU;;GACxD,MAAM,CAAC,MAAM;EACd,CAAC;;EAED,MAAM,CAAC,iBAAiB;CACzB,CAAC;AACF,CAAC;;AAED,MAAM,AAAA,MAAM,CAAC,CAAC;CACb,IAAI,EAAE,MAAM;;CACZ,WAAW,CAAC,IAAY,EAAN,MAAM,EAAE,CAAC;EAC1B,IAAI,CAAC,IAAI,GAAG,IAAI;CACjB,CAAC;;EAEA,YAAY,CAAC,IAAI;CAClB,KAAK,GAAG,CAAC;EACR,OAAO,CAAC,GAAG,sBAAsB,IAAI,CAAC,IAAI;CAC3C,CAAC;AACF,CAAC;;AAED,MAAM,AAAA,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK;;AAC1B,CAAC,CAAC,KAAK" + "mappings": "AAAA,SAAS,YAAY,CAAC,WAAW,GAAG,MAAM,EAAE,CAAC;CAC5C,OAAO,SAAS,eAAe,CAAC,cAAmB,EAAH,GAAG,EAAE,OAAoC,EAA3B,2BAA2B,EAAE,CAAC;EAC3F,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI;;EAEtC,SAAS,iBAAiB,CAAC,IAAS,EAAH,GAAG,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC;GACtD,OAAO,CAAC,GAAG,IAAI,WAAW,qBAAqB,UAAU;;GACzD,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI;;GAChD,OAAO,CAAC,GAAG,IAAI,WAAW,oBAAoB,UAAU;;GACxD,OAAO,MAAM;EACd,CAAC;;EAED,OAAO,iBAAiB;CACzB,CAAC;AACF,CAAC;;AAED,MAAM,MAAM,CAAC,CAAC;CACb,IAAI,EAAE,MAAM;;CACZ,WAAW,CAAC,IAAY,EAAN,MAAM,EAAE,CAAC;EAC1B,IAAI,CAAC,IAAI,GAAG,IAAI;CACjB,CAAC;;EAEA,YAAY,CAAC,IAAI;CAClB,KAAK,GAAG,CAAC;EACR,OAAO,CAAC,GAAG,sBAAsB,IAAI,CAAC,IAAI;CAC3C,CAAC;AACF,CAAC;;AAED,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK;;AAC1B,CAAC,CAAC,KAAK" } \ No newline at end of file diff --git a/test/samples/ts-enums/expected.ts.map b/test/samples/ts-enums/expected.ts.map index faa93fdf..e571788b 100644 --- a/test/samples/ts-enums/expected.ts.map +++ b/test/samples/ts-enums/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "enum UserResponse {\n\tNo = 0,\n\tYes = 1\n}\n\nfunction respond(recipient: string, message: UserResponse): void {\n\t// ...\n}\n\nrespond('Princess Caroline', UserResponse.Yes);\n" ], - "mappings": "KAAK,YAAY;CAChB,EAAE,GAAG,CAAC,EACN,GAAG,GAAG,CAAC;;;AAGR,QAAQ,CAAC,OAAO,CAAC,SAAiB,EAAN,MAAM,EAAE,OAAqB,EAAZ,YAAY,GAAG,IAAI,CAAC,CAAC;;AAElE,CAAC;;AAED,OAAO,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAAG" + "mappings": "KAAK,YAAY;CAChB,EAAE,GAAG,CAAC,EACN,GAAG,GAAG,CAAC;;;AAGR,SAAS,OAAO,CAAC,SAAiB,EAAN,MAAM,EAAE,OAAqB,EAAZ,YAAY,GAAG,IAAI,CAAC,CAAC;;AAElE,CAAC;;AAED,OAAO,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAAG" } \ No newline at end of file diff --git a/test/samples/ts-export/expected.ts.map b/test/samples/ts-export/expected.ts.map index 45aaf8db..aa009ad0 100644 --- a/test/samples/ts-export/expected.ts.map +++ b/test/samples/ts-export/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "export type X = number;\n\ntype Y = number;\ntype Z = number;\nexport type { Y };\nexport { type Z };\n\n// TODO: commented because acorn doesn't support export = syntax but oxc does\n// declare module 'hello' {\n// export = Y;\n// }\n\nexport as namespace MyNamespace;\n\n// export type * from './elsewhere';\n" ], - "mappings": "AAAA,MAAM,MAAM,CAAC,GAAG,MAAM;;KAEjB,CAAC,GAAG,MAAM;KACV,CAAC,GAAG,MAAM;;AACf,OAAO,AAAA,KAAK,EAAE,CAAC;AACf,OAAO,OAAO,CAAC;;;;;;oBAOK,WAAW;;" + "mappings": "AAAA,YAAY,CAAC,GAAG,MAAM;;KAEjB,CAAC,GAAG,MAAM;KACV,CAAC,GAAG,MAAM;;AACf,OAAO,OAAO,CAAC;AACf,cAAc,CAAC;;;;;;oBAOK,WAAW;;" } \ No newline at end of file diff --git a/test/samples/ts-generic-types/expected.ts.map b/test/samples/ts-generic-types/expected.ts.map index 3ae788aa..12833681 100644 --- a/test/samples/ts-generic-types/expected.ts.map +++ b/test/samples/ts-generic-types/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "type Generic = {\n\tdata: T;\n};\n\nconst n: Generic = { data: 1 };\nconst s: Generic = { data: 'foo' };\nconst b: Generic = { data: true };\n\nfunction foo(np: Generic) {\n\tconsole.log(np.data);\n}\n\nfunction bar(np: Generic): Generic {\n\treturn { data: true };\n}\n\nfunction barTypeof(np: Generic): Generic {\n\treturn { data: true };\n}\n\ntype DoubleGeneric = {\n\tkey: K;\n\tvalue: V;\n};\n\nfunction foobar(np: DoubleGeneric): DoubleGeneric {\n\treturn { key: true, value: 'foo' };\n}\n" ], - "mappings": "KAAK,OAAO,CAAC,CAAC,MACb,IAAI,EAAE,CAAC;;AAGR,MAAM,AAAA,CAAkB,EAAf,OAAO,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC;AACpC,MAAM,AAAA,CAAkB,EAAf,OAAO,CAAC,MAAM,MAAM,IAAI,EAAE,KAAK;AACxC,MAAM,AAAA,CAAmB,EAAhB,OAAO,CAAC,OAAO,MAAM,IAAI,EAAE,IAAI;;AAExC,QAAQ,CAAC,GAAG,CAAC,EAAmB,EAAf,OAAO,CAAC,MAAM,GAAG,CAAC;CAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI;AACpB,CAAC;;AAED,QAAQ,CAAC,GAAG,CAAC,EAAmB,EAAf,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CACpD,MAAM,GAAG,IAAI,EAAE,IAAI;AACpB,CAAC;;AAED,QAAQ,CAAC,SAAS,CAAC,EAAqB,EAAjB,OAAO,QAAQ,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAC5D,MAAM,GAAG,IAAI,EAAE,IAAI;AACpB,CAAC;;KAEI,aAAa,CAAC,CAAC,EAAE,CAAC,MACtB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC;;AAGT,QAAQ,CAAC,MAAM,CAAC,EAAiC,EAA7B,aAAa,CAAC,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnF,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;AACjC,CAAC" + "mappings": "KAAK,OAAO,CAAC,CAAC,MACb,IAAI,EAAE,CAAC;;AAGR,MAAM,CAAkB,EAAf,OAAO,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC;AACpC,MAAM,CAAkB,EAAf,OAAO,CAAC,MAAM,MAAM,IAAI,EAAE,KAAK;AACxC,MAAM,CAAmB,EAAhB,OAAO,CAAC,OAAO,MAAM,IAAI,EAAE,IAAI;;AAExC,SAAS,GAAG,CAAC,EAAmB,EAAf,OAAO,CAAC,MAAM,GAAG,CAAC;CAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI;AACpB,CAAC;;AAED,SAAS,GAAG,CAAC,EAAmB,EAAf,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CACpD,SAAS,IAAI,EAAE,IAAI;AACpB,CAAC;;AAED,SAAS,SAAS,CAAC,EAAqB,EAAjB,OAAO,QAAQ,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAC5D,SAAS,IAAI,EAAE,IAAI;AACpB,CAAC;;KAEI,aAAa,CAAC,CAAC,EAAE,CAAC,MACtB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC;;AAGT,SAAS,MAAM,CAAC,EAAiC,EAA7B,aAAa,CAAC,MAAM,EAAE,MAAM,IAAI,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnF,SAAS,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;AACjC,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-implements/expected.ts.map b/test/samples/ts-implements/expected.ts.map index f16ade6f..8f7da4cb 100644 --- a/test/samples/ts-implements/expected.ts.map +++ b/test/samples/ts-implements/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "interface SelectableControl {\n\tselect(): void;\n}\n\ninterface Scrollable {\n\tscroll(): void;\n}\n\nclass Button implements SelectableControl, Scrollable {\n\tselect() {}\n}\n" ], - "mappings": "UAAU,iBAAiB,GAC1B,MAAM,IAAI,IAAI;UAGL,UAAU,GACnB,MAAM,IAAI,IAAI;;AAGf,MAAM,AAAA,MAAM,YAAY,iBAAiB,EAAE,UAAU,CAAC,CAAC;CACtD,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC" + "mappings": "UAAU,iBAAiB,GAC1B,MAAM,IAAI,IAAI;UAGL,UAAU,GACnB,MAAM,IAAI,IAAI;;AAGf,MAAM,MAAM,YAAY,iBAAiB,EAAE,UAAU,CAAC,CAAC;CACtD,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-import-type/expected.ts.map b/test/samples/ts-import-type/expected.ts.map index 205a40ab..d5c0bfa1 100644 --- a/test/samples/ts-import-type/expected.ts.map +++ b/test/samples/ts-import-type/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import baz = require('baz');\n\nconst foo: import('foo/bar') = 123;\nconst bar: import('foo/bar').baz = 234;\n" ], - "mappings": "OAAO,GAAG,WAAW,KAAK;;AAE1B,MAAM,AAAA,GAAsB,SAAV,SAAS,IAAI,GAAG;AAClC,MAAM,AAAA,GAA0B,SAAd,SAAS,EAAE,GAAG,GAAG,GAAG" + "mappings": "OAAO,GAAG,WAAW,KAAK;;AAE1B,MAAM,GAAsB,SAAV,SAAS,IAAI,GAAG;AAClC,MAAM,GAA0B,SAAd,SAAS,EAAE,GAAG,GAAG,GAAG" } \ No newline at end of file diff --git a/test/samples/ts-index-access-type/expected.ts.map b/test/samples/ts-index-access-type/expected.ts.map index 259d406c..ac7e6a03 100644 --- a/test/samples/ts-index-access-type/expected.ts.map +++ b/test/samples/ts-index-access-type/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "type A = { a: string; b: number };\ntype B = A['b'];\n\nconst c: A['b'] = 1;\n" ], - "mappings": "KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;KAC1B,CAAC,GAAG,CAAC,CAAC,GAAG;;AAEd,MAAM,AAAA,CAAS,EAAN,CAAC,CAAC,GAAG,IAAI,CAAC" + "mappings": "KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;KAC1B,CAAC,GAAG,CAAC,CAAC,GAAG;;AAEd,MAAM,CAAS,EAAN,CAAC,CAAC,GAAG,IAAI,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-instantiation-expression/expected.ts.map b/test/samples/ts-instantiation-expression/expected.ts.map index 190c6d5f..1cde506b 100644 --- a/test/samples/ts-instantiation-expression/expected.ts.map +++ b/test/samples/ts-instantiation-expression/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "// basic\nconst foo = bar;\n" ], - "mappings": ";AACA,MAAM,AAAA,GAAG,GAAG,GAAG,CAAC,CAAC" + "mappings": ";AACA,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-interfaces/expected.ts.map b/test/samples/ts-interfaces/expected.ts.map index 4d59518a..213e5330 100644 --- a/test/samples/ts-interfaces/expected.ts.map +++ b/test/samples/ts-interfaces/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "interface Test {\n\tfunc: (a: string) => Promise;\n\tfunc2: () => Promise;\n\ta: number;\n\tb: boolean;\n}\n\ninterface IndexSignature {\n\t[key: string]: string;\n}\n\nclass Control {\n\tprivate state: any;\n}\n\ninterface SelectableControl extends Control {\n\tselect(): void;\n\tbar();\n}\n\nclass Button extends Control implements SelectableControl {\n\tselect() {}\n}\n\nclass TextBox extends Control {\n\tselect() {}\n}\n" ], - "mappings": "UAAU,IAAI;CACb,IAAI,GAAG,CAAS,EAAN,MAAM,KAAK,OAAO,CAAC,IAAI;CACjC,KAAK,QAAQ,OAAO,CAAC,IAAI;CACzB,CAAC,EAAE,MAAM;CACT,CAAC,EAAE,OAAO;;;UAGD,cAAc,IACtB,GAAW,EAAN,MAAM,GAAG,MAAM;;AAGtB,MAAM,AAAA,OAAO,CAAC,CAAC;CACd,QAAQ,AAAA,KAAK,EAAE,GAAG;AACnB,CAAC;;UAES,iBAAiB,SAAS,OAAO,GAC1C,MAAM,IAAI,IAAI,EACd,GAAG;;AAGJ,MAAM,AAAA,MAAM,SAAS,OAAO,YAAY,iBAAiB,CAAC,CAAC;CAC1D,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC;;AAED,MAAM,AAAA,OAAO,SAAS,OAAO,CAAC,CAAC;CAC9B,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC" + "mappings": "UAAU,IAAI;CACb,IAAI,GAAG,CAAS,EAAN,MAAM,KAAK,OAAO,CAAC,IAAI;CACjC,KAAK,QAAQ,OAAO,CAAC,IAAI;CACzB,CAAC,EAAE,MAAM;CACT,CAAC,EAAE,OAAO;;;UAGD,cAAc,IACtB,GAAW,EAAN,MAAM,GAAG,MAAM;;AAGtB,MAAM,OAAO,CAAC,CAAC;CACd,QAAQ,KAAK,EAAE,GAAG;AACnB,CAAC;;UAES,iBAAiB,SAAS,OAAO,GAC1C,MAAM,IAAI,IAAI,EACd,GAAG;;AAGJ,MAAM,MAAM,SAAS,OAAO,YAAY,iBAAiB,CAAC,CAAC;CAC1D,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC;;AAED,MAAM,OAAO,SAAS,OAAO,CAAC,CAAC;CAC9B,MAAM,GAAG,CAAC,AAAA,CAAC;AACZ,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-keywords/expected.ts.map b/test/samples/ts-keywords/expected.ts.map index 94dcf670..b6643a27 100644 --- a/test/samples/ts-keywords/expected.ts.map +++ b/test/samples/ts-keywords/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "let n: number = 42;\nlet s: string = 'Hello, TypeScript!';\nlet b: boolean = true;\nlet u: unknown = 'whatever';\nlet un: undefined = undefined;\nlet o: object = { name: 'Object' };\nlet bi: bigint = 1234567890123456789012345678901234567890n;\nlet ne: never;\nlet sy: symbol = Symbol('unique');\nlet a: any = { key: 'value' };\nlet v: () => void = () => {};\nlet arr: number[] = [1, 2, 3];\nlet snu: string | null = null;\nlet nun: number | undefined = undefined;\n\n// TODO: commented because acorn doesn't support type assertions but oxc does\n// let ta = true;\n" ], - "mappings": "AAAA,IAAI,AAAA,CAAS,EAAN,MAAM,GAAG,EAAE;AAClB,IAAI,AAAA,CAAS,EAAN,MAAM,GAAG,oBAAoB;AACpC,IAAI,AAAA,CAAU,EAAP,OAAO,GAAG,IAAI;AACrB,IAAI,AAAA,CAAU,EAAP,OAAO,GAAG,UAAU;AAC3B,IAAI,AAAA,EAAa,EAAT,SAAS,GAAG,SAAS;AAC7B,IAAI,AAAA,CAAS,EAAN,MAAM,KAAK,IAAI,EAAE,QAAQ;AAChC,IAAI,AAAA,EAAU,EAAN,MAAM,GAAG,yCAAyC;AAC1D,IAAI,AAAA,EAAS,EAAL,KAAK;AACb,IAAI,AAAA,EAAU,EAAN,MAAM,GAAG,MAAM,CAAC,QAAQ;AAChC,IAAI,AAAA,CAAM,EAAH,GAAG,KAAK,GAAG,EAAE,OAAO;AAC3B,IAAI,AAAA,CAAa,QAAJ,IAAI,SAAS,CAAC,AAAA,CAAC;AAC5B,IAAI,AAAA,GAAa,EAAR,MAAM,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;AAC5B,IAAI,AAAA,GAAkB,EAAb,MAAM,GAAG,IAAI,GAAG,IAAI;AAC7B,IAAI,AAAA,GAAuB,EAAlB,MAAM,GAAG,SAAS,GAAG,SAAS;;;" + "mappings": "AAAA,IAAI,CAAS,EAAN,MAAM,GAAG,EAAE;AAClB,IAAI,CAAS,EAAN,MAAM,GAAG,oBAAoB;AACpC,IAAI,CAAU,EAAP,OAAO,GAAG,IAAI;AACrB,IAAI,CAAU,EAAP,OAAO,GAAG,UAAU;AAC3B,IAAI,EAAa,EAAT,SAAS,GAAG,SAAS;AAC7B,IAAI,CAAS,EAAN,MAAM,KAAK,IAAI,EAAE,QAAQ;AAChC,IAAI,EAAU,EAAN,MAAM,GAAG,yCAAyC;AAC1D,IAAI,EAAS,EAAL,KAAK;AACb,IAAI,EAAU,EAAN,MAAM,GAAG,MAAM,CAAC,QAAQ;AAChC,IAAI,CAAM,EAAH,GAAG,KAAK,GAAG,EAAE,OAAO;AAC3B,IAAI,CAAa,QAAJ,IAAI,SAAS,CAAC,AAAA,CAAC;AAC5B,IAAI,GAAa,EAAR,MAAM,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;AAC5B,IAAI,GAAkB,EAAb,MAAM,GAAG,IAAI,GAAG,IAAI;AAC7B,IAAI,GAAuB,EAAlB,MAAM,GAAG,SAAS,GAAG,SAAS;;;" } \ No newline at end of file diff --git a/test/samples/ts-module-declaration/expected.ts.map b/test/samples/ts-module-declaration/expected.ts.map index 21d97396..8027c20a 100644 --- a/test/samples/ts-module-declaration/expected.ts.map +++ b/test/samples/ts-module-declaration/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "declare global {\n\tnamespace App {\n\t\tinterface Error {\n\t\t\tfoo: string;\n\t\t}\n\t}\n}\n\nexport {};\n" ], - "mappings": "QAAQ,MAAM;WACH,GAAG;YACF,KAAK,GACd,GAAG,EAAE,MAAM;;;;AAKd,OAAO" + "mappings": "QAAQ,MAAM;WACH,GAAG;YACF,KAAK,GACd,GAAG,EAAE,MAAM;;;;AAKd" } \ No newline at end of file diff --git a/test/samples/ts-null-keyword/expected.ts.map b/test/samples/ts-null-keyword/expected.ts.map index b461ce55..5049ae23 100644 --- a/test/samples/ts-null-keyword/expected.ts.map +++ b/test/samples/ts-null-keyword/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "let a: string | null = null;\n" ], - "mappings": "AAAA,IAAI,AAAA,CAAgB,EAAb,MAAM,GAAG,IAAI,GAAG,IAAI" + "mappings": "AAAA,IAAI,CAAgB,EAAb,MAAM,GAAG,IAAI,GAAG,IAAI" } \ No newline at end of file diff --git a/test/samples/ts-object-patterns/expected.ts.map b/test/samples/ts-object-patterns/expected.ts.map index 7ec95c97..94b9fccc 100644 --- a/test/samples/ts-object-patterns/expected.ts.map +++ b/test/samples/ts-object-patterns/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "type User = {\n\tfirstName: string;\n\tlastName: string;\n};\n\nfunction a({ firstName, lastName }: User) {\n\tconsole.log(firstName, lastName);\n}\n" ], - "mappings": "KAAK,IAAI,KACR,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM;;AAGjB,QAAQ,CAAC,CAAC,GAAG,SAAS,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAC;CAC1C,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ;AAChC,CAAC" + "mappings": "KAAK,IAAI,KACR,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM;;AAGjB,SAAS,CAAC,GAAG,SAAS,EAAE,QAAQ,IAAI,IAAI,EAAE,CAAC;CAC1C,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ;AAChC,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-return-type/expected.ts.map b/test/samples/ts-return-type/expected.ts.map index 02389f63..abd1d4b2 100644 --- a/test/samples/ts-return-type/expected.ts.map +++ b/test/samples/ts-return-type/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "class Fields {\n\tstatic cuid(): string {\n\t\treturn 'random cuid...';\n\t}\n}\n" ], - "mappings": "AAAA,MAAM,AAAA,MAAM,CAAC,CAAC;CACb,OAAO,AAAA,IAAI,IAAI,MAAM,CAAC,CAAC;EACtB,MAAM,CAAC,gBAAgB;CACxB,CAAC;AACF,CAAC" + "mappings": "AAAA,MAAM,MAAM,CAAC,CAAC;CACb,OAAO,IAAI,IAAI,MAAM,CAAC,CAAC;EACtB,OAAO,gBAAgB;CACxB,CAAC;AACF,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-satisfies-expression/expected.ts.map b/test/samples/ts-satisfies-expression/expected.ts.map index d7146c7a..52f7c45c 100644 --- a/test/samples/ts-satisfies-expression/expected.ts.map +++ b/test/samples/ts-satisfies-expression/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "type A = string;\nconst b: number = 42 satisfies A;\n\ntype C = {\n\tname: string;\n};\n\ntype D = {\n\tname: string;\n\tdescription: string;\n};\n\nconst e: D = {\n\tname: 'foo',\n\tdesciption: 'bar'\n};\n\nconst f = e satisfies D;\n\nconst g = (\n\tMath.random() > 0.5\n\t\t? { name: 'name1', description: 'desc1' }\n\t\t: { name: 'name2', description: 'desc2' }\n) satisfies D;\n" ], - "mappings": "KAAK,CAAC,GAAG,MAAM;;AACf,MAAM,AAAA,CAAS,EAAN,MAAM,GAAG,EAAE,WAAW,CAAC;;KAE3B,CAAC,KACL,IAAI,EAAE,MAAM;KAGR,CAAC,KACL,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM;;AAGpB,MAAM,AAAA,CAAI,EAAD,CAAC,KACT,IAAI,EAAE,KAAK,EACX,UAAU,EAAE,KAAK;AAGlB,MAAM,AAAA,CAAC,GAAG,CAAC,WAAW,CAAC;;AAEvB,MAAM,AAAA,CAAC,IACN,IAAI,CAAC,MAAM,KAAK,GAAG;KACd,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO;KACnC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,cAC7B,CAAC" + "mappings": "KAAK,CAAC,GAAG,MAAM;;AACf,MAAM,CAAS,EAAN,MAAM,GAAG,EAAE,WAAW,CAAC;;KAE3B,CAAC,KACL,IAAI,EAAE,MAAM;KAGR,CAAC,KACL,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM;;AAGpB,MAAM,CAAI,EAAD,CAAC,KACT,IAAI,EAAE,KAAK,EACX,UAAU,EAAE,KAAK;AAGlB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;;AAEvB,MAAM,CAAC,IACN,IAAI,CAAC,MAAM,KAAK,GAAG;KACd,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO;KACnC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,cAC7B,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-simple-function-types/expected.ts.map b/test/samples/ts-simple-function-types/expected.ts.map index 45f00544..30672071 100644 --- a/test/samples/ts-simple-function-types/expected.ts.map +++ b/test/samples/ts-simple-function-types/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function foo(n: number, s: string, a: any): number {\n\treturn 1;\n}\n" ], - "mappings": "AAAA,QAAQ,CAAC,GAAG,CAAC,CAAS,EAAN,MAAM,EAAE,CAAS,EAAN,MAAM,EAAE,CAAM,EAAH,GAAG,GAAG,MAAM,CAAC,CAAC;CACnD,MAAM,CAAC,CAAC;AACT,CAAC" + "mappings": "AAAA,SAAS,GAAG,CAAC,CAAS,EAAN,MAAM,EAAE,CAAS,EAAN,MAAM,EAAE,CAAM,EAAH,GAAG,GAAG,MAAM,CAAC,CAAC;CACnD,OAAO,CAAC;AACT,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-simple-identifier-types/expected.ts.map b/test/samples/ts-simple-identifier-types/expected.ts.map index 6cb77d83..e47fae68 100644 --- a/test/samples/ts-simple-identifier-types/expected.ts.map +++ b/test/samples/ts-simple-identifier-types/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const n: number = 1;\nconst s: string = 'foo';\nconst b: boolean = true;\nconst a: any = {};\nconst na: number[] = [];\nconst sa: string[] = [];\nconst ba: boolean[] = [];\nconst aa: any[] = [];\n" ], - "mappings": "AAAA,MAAM,AAAA,CAAS,EAAN,MAAM,GAAG,CAAC;AACnB,MAAM,AAAA,CAAS,EAAN,MAAM,GAAG,KAAK;AACvB,MAAM,AAAA,CAAU,EAAP,OAAO,GAAG,IAAI;AACvB,MAAM,AAAA,CAAM,EAAH,GAAG;AACZ,MAAM,AAAA,EAAY,EAAR,MAAM;AAChB,MAAM,AAAA,EAAY,EAAR,MAAM;AAChB,MAAM,AAAA,EAAa,EAAT,OAAO;AACjB,MAAM,AAAA,EAAS,EAAL,GAAG" + "mappings": "AAAA,MAAM,CAAS,EAAN,MAAM,GAAG,CAAC;AACnB,MAAM,CAAS,EAAN,MAAM,GAAG,KAAK;AACvB,MAAM,CAAU,EAAP,OAAO,GAAG,IAAI;AACvB,MAAM,CAAM,EAAH,GAAG;AACZ,MAAM,EAAY,EAAR,MAAM;AAChB,MAAM,EAAY,EAAR,MAAM;AAChB,MAAM,EAAa,EAAT,OAAO;AACjB,MAAM,EAAS,EAAL,GAAG" } \ No newline at end of file diff --git a/test/samples/ts-typed-imports/expected.ts.map b/test/samples/ts-typed-imports/expected.ts.map index c5a9750a..1fbaa8d1 100644 --- a/test/samples/ts-typed-imports/expected.ts.map +++ b/test/samples/ts-typed-imports/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "import type A from 'foo';\nimport type { B } from 'foo';\nimport { C, type D, type E as F } from 'foo';\n" ], - "mappings": "AAAA,OAAO,AAAA,KAAK,AAAA,CAAC,MAAM,KAAK;AACxB,OAAO,AAAA,KAAK,EAAE,CAAC,QAAQ,KAAK;AAC5B,OAAO,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,KAAK" + "mappings": "AAAA,OAAO,KAAK,CAAC,MAAM,KAAK;AACxB,OAAO,OAAO,CAAC,QAAQ,KAAK;AAC5B,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,KAAK" } \ No newline at end of file diff --git a/test/samples/ts-undefined-keyword/expected.ts.map b/test/samples/ts-undefined-keyword/expected.ts.map index 335994f9..6de70f71 100644 --- a/test/samples/ts-undefined-keyword/expected.ts.map +++ b/test/samples/ts-undefined-keyword/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "let a: number | undefined;\na = 2;\n" ], - "mappings": "AAAA,IAAI,AAAA,CAAqB,EAAlB,MAAM,GAAG,SAAS;;AACzB,CAAC,GAAG,CAAC" + "mappings": "AAAA,IAAI,CAAqB,EAAlB,MAAM,GAAG,SAAS;;AACzB,CAAC,GAAG,CAAC" } \ No newline at end of file diff --git a/test/samples/ts-utility-types/expected.ts.map b/test/samples/ts-utility-types/expected.ts.map index d2c36dfe..7d42767e 100644 --- a/test/samples/ts-utility-types/expected.ts.map +++ b/test/samples/ts-utility-types/expected.ts.map @@ -7,5 +7,5 @@ "sourcesContent": [ "type A = Awaited>;\n\ntype Todo = {\n\ttitle: string;\n\tdescription: string;\n};\n\nfunction updateTodo(todo: Todo, fieldsToUpdate: Partial) {\n\treturn { ...todo, ...fieldsToUpdate };\n}\n\nconst todo2: Readonly = {\n\ttitle: 'Delete inactive users',\n\tdescription: 'foo'\n};\n\ntype CatInfo = {\n\tage: number;\n\tbreed: string;\n};\n\nconst cats: Record = {\n\tmiffy: { age: 10, breed: 'Persian' },\n\tboris: { age: 5, breed: 'Maine Coon' },\n\tmordred: { age: 16, breed: 'British Shorthair' }\n};\n" ], - "mappings": "KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM;KAE1B,IAAI,KACR,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM;;AAGpB,QAAQ,CAAC,UAAU,CAAC,IAAU,EAAJ,IAAI,EAAE,cAA6B,EAAb,OAAO,CAAC,IAAI,GAAG,CAAC;CAC/D,MAAM,MAAM,IAAI,KAAK,cAAc;AACpC,CAAC;;AAED,MAAM,AAAA,KAAqB,EAAd,QAAQ,CAAC,IAAI,MACzB,KAAK,EAAE,uBAAuB,EAC9B,WAAW,EAAE,KAAK;;KAGd,OAAO,KACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM;;AAGd,MAAM,AAAA,IAA6B,EAAvB,MAAM,CAAC,MAAM,EAAE,OAAO;CACjC,KAAK,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS;CAClC,KAAK,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY;CACpC,OAAO,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAmB;" + "mappings": "KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM;KAE1B,IAAI,KACR,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM;;AAGpB,SAAS,UAAU,CAAC,IAAU,EAAJ,IAAI,EAAE,cAA6B,EAAb,OAAO,CAAC,IAAI,GAAG,CAAC;CAC/D,YAAY,IAAI,KAAK,cAAc;AACpC,CAAC;;AAED,MAAM,KAAqB,EAAd,QAAQ,CAAC,IAAI,MACzB,KAAK,EAAE,uBAAuB,EAC9B,WAAW,EAAE,KAAK;;KAGd,OAAO,KACX,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM;;AAGd,MAAM,IAA6B,EAAvB,MAAM,CAAC,MAAM,EAAE,OAAO;CACjC,KAAK,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS;CAClC,KAAK,IAAI,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY;CACpC,OAAO,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,mBAAmB;" } \ No newline at end of file diff --git a/test/samples/var-declaration/expected.js.map b/test/samples/var-declaration/expected.js.map index 52be6d11..820a6ec7 100644 --- a/test/samples/var-declaration/expected.js.map +++ b/test/samples/var-declaration/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "const obj = {\n\ta,\n\tb,\n\tc,\n\td,\n\te,\n\tf,\n\tg,\n\th,\n\ti,\n\tj,\n\tk,\n\tl,\n\tm,\n\tn,\n\to,\n\tp,\n\tq,\n\tr,\n\ts,\n\tt,\n\tu,\n\tv,\n\tw,\n\tx,\n\ty,\n\tz\n};\n\nconst obj2 = {\n\t\ta,\n\t\tb,\n\t\tc,\n\t\td,\n\t\te,\n\t\tf,\n\t\tg,\n\t\th,\n\t\ti,\n\t\tj,\n\t\tk,\n\t\tl,\n\t\tm,\n\t\tn,\n\t\to,\n\t\tp,\n\t\tq,\n\t\tr,\n\t\ts,\n\t\tt,\n\t\tu,\n\t\tv,\n\t\tw,\n\t\tx,\n\t\ty,\n\t\tz\n\t},\n\ta = 1,\n\tb = 2;" ], - "mappings": "AAAA,MAAM,AAAA,GAAG;CACR,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;;;AAGF,MAAM,AAAA,IAAI;EACR,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;;CAEF,CAAC,GAAG,CAAC;CACL,CAAC,GAAG,CAAC" + "mappings": "AAAA,MAAM,GAAG;CACR,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;CACD,CAAC;;;AAGF,MAAM,IAAI;EACR,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;EACD,CAAC;;CAEF,CAAC,GAAG,CAAC;CACL,CAAC,GAAG,CAAC" } \ No newline at end of file diff --git a/test/samples/yield/expected.js.map b/test/samples/yield/expected.js.map index 077b03f4..78f68f9d 100644 --- a/test/samples/yield/expected.js.map +++ b/test/samples/yield/expected.js.map @@ -7,5 +7,5 @@ "sourcesContent": [ "function* foo() {\n\tyield;\n}\n\nfunction* bar() {\n\tyield* 1;\n}" ], - "mappings": "AAAA,QAAQ,EAAE,GAAG,GAAG,CAAC;CAChB,KAAK;AACN,CAAC;;AAED,QAAQ,EAAE,GAAG,GAAG,CAAC;CAChB,MAAM,CAAC,CAAC;AACT,CAAC" + "mappings": "AAAA,UAAU,GAAG,GAAG,CAAC;CAChB;AACD,CAAC;;AAED,UAAU,GAAG,GAAG,CAAC;CAChB,OAAO,CAAC;AACT,CAAC" } \ No newline at end of file diff --git a/test/sourcemap-keywords.test.js b/test/sourcemap-keywords.test.js index 5e164078..d1a74da3 100644 --- a/test/sourcemap-keywords.test.js +++ b/test/sourcemap-keywords.test.js @@ -193,3 +193,30 @@ test('decorator-prefixed class falls back gracefully', () => { expect(code).toContain('class'); expect(mappings.length).toBeGreaterThan(0); }); + +test('no positive whitespace mapping directly after keyword', () => { + // Positive source-map segment at gen_col == keyword_end (e.g. space after + // keyword) causes downstream source-map consumers to treat whitespace columns + // as adjacent expression positions. + for (const source of [ + `function f() {\n\treturn x ?? 1;\n}`, + `function g() {\n\treturn a || b;\n}`, + `async function h() {\n\tawait p();\n}`, + `const k = 1;`, + `let m = 1;` + ]) { + const { code, mappings } = mapped(source); + for (const keyword of ['return', 'await', 'const', 'let', 'function']) { + const idx = code.indexOf(keyword); + if (idx < 0) continue; + const end_idx = idx + keyword.length; + const { gen_line, gen_col } = generatedLineColumn(code, end_idx); + const line_segments = mappings[gen_line] || []; + const offender = line_segments.find((s) => s[0] === gen_col && s.length >= 4); + expect( + offender, + `expected no positive mapping at gen ${gen_line + 1}:${gen_col} (just after \`${keyword}\` in ${JSON.stringify(source)}), got ${JSON.stringify(offender)}` + ).toBeUndefined(); + } + } +}); From 02b115e0befc5396a38d130d8be9ede7cdf5c64f Mon Sep 17 00:00:00 2001 From: Andrew Hoddinott Date: Thu, 4 Jun 2026 15:56:48 +0900 Subject: [PATCH 2/2] style: revert whitespace changes --- src/languages/ts/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/languages/ts/index.js b/src/languages/ts/index.js index 01fa02e4..63287430 100644 --- a/src/languages/ts/index.js +++ b/src/languages/ts/index.js @@ -493,7 +493,7 @@ export default (options = {}) => { context.write('['); sequence( context, - /** @type {TSESTree.Node[]} */(node.elements), + /** @type {TSESTree.Node[]} */ (node.elements), node.loc?.end ?? null, false ); @@ -960,8 +960,8 @@ export default (options = {}) => { node.parameters ?? node.params, // @ts-expect-error `acorn-typescript` and `@typescript-eslint/types` have slightly different type definitions node.typeAnnotation?.typeAnnotation?.loc?.start ?? - node.returnType?.typeAnnotation?.loc?.start ?? - null, + node.returnType?.typeAnnotation?.loc?.start ?? + null, false ); @@ -987,7 +987,7 @@ export default (options = {}) => { AccessorProperty: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], ArrayExpression: shared['ArrayExpression|ArrayPattern'], @@ -1548,7 +1548,7 @@ export default (options = {}) => { PropertyDefinition: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], RestElement: shared['RestElement|SpreadElement'], @@ -1771,12 +1771,12 @@ export default (options = {}) => { TSAbstractAccessorProperty: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], TSAbstractPropertyDefinition: shared[ - 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' + 'PropertyDefinition|TSAbstractPropertyDefinition|AccessorProperty|TSAbstractAccessorProperty' ], TSDeclareFunction(node, context) {