diff --git a/javascript/extractor/lib/typescript/src/main.ts b/javascript/extractor/lib/typescript/src/main.ts index 3aa1d6f0f4e..59a1dd3bbff 100644 --- a/javascript/extractor/lib/typescript/src/main.ts +++ b/javascript/extractor/lib/typescript/src/main.ts @@ -134,7 +134,8 @@ function isBlacklistedProperty(k: string) { || k === "symbol" || k === "localSymbol" || k === "flowNode" || k === "returnFlowNode" || k === "endFlowNode" || k === "fallthroughFlowNode" || k === "nextContainer" || k === "locals" - || k === "bindDiagnostics" || k === "bindSuggestionDiagnostics"; + || k === "bindDiagnostics" || k === "bindSuggestionDiagnostics" + || k === "relatedInformation"; } /** diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/options b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/options new file mode 100644 index 00000000000..13f987b19ca --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/options @@ -0,0 +1 @@ +semmle-extractor-options: --tolerate-parse-errors diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.expected b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.expected new file mode 100644 index 00000000000..048feaa6c69 --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.expected @@ -0,0 +1,2 @@ +| tst.ts:1:1:1:1 | Error: '}' expected. | +| tst.ts:1:25:1:25 | Error: '{' expected. | diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.ql b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.ql new file mode 100644 index 00000000000..939784b52ea --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/test.ql @@ -0,0 +1,4 @@ +import javascript + +from JSParseError err +select err diff --git a/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/tst.ts b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/tst.ts new file mode 100644 index 00000000000..7b17791a655 --- /dev/null +++ b/javascript/ql/test/library-tests/TypeScript/RegressionTests/ArrowReturn/tst.ts @@ -0,0 +1 @@ +var fn = (x: number) => return x * 2;