Skip to content

Commit d47659b

Browse files
committed
upgrade to TypeScript 5.0 beta, and unbreak things that broke
1 parent a9e5b34 commit d47659b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

javascript/extractor/lib/typescript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript-parser-wrapper",
33
"private": true,
44
"dependencies": {
5-
"typescript": "4.9.3"
5+
"typescript": "5.0.0-beta"
66
},
77
"scripts": {
88
"build": "tsc --project tsconfig.json",
@@ -12,6 +12,6 @@
1212
"watch": "tsc -p . -w --sourceMap"
1313
},
1414
"devDependencies": {
15-
"@types/node": "12.7.11"
15+
"@types/node": "18.11.18"
1616
}
1717
}

javascript/extractor/lib/typescript/src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ const astProperties: string[] = [
242242
"constructor",
243243
"declarationList",
244244
"declarations",
245-
"illegalDecorators",
246245
"default",
247246
"delete",
248247
"dotDotDotToken",

javascript/extractor/lib/typescript/src/type_table.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ export class TypeTable {
947947
* Returns a unique string for the given call/constructor signature.
948948
*/
949949
private getSignatureString(kind: ts.SignatureKind, signature: AugmentedSignature): string {
950-
let modifiers = signature.getDeclaration()?.modifiers;
950+
let modifiers = signature.getDeclaration() ? ts.getModifiers(signature.getDeclaration() as ts.MethodSignature) : [];
951951
let isAbstract = modifiers && modifiers.filter(modifier => modifier.kind == ts.SyntaxKind.AbstractKeyword).length > 0
952952

953953
let parameters = signature.getParameters();

javascript/extractor/lib/typescript/yarn.lock

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# yarn lockfile v1
33

44

5-
6-
version "12.7.11"
7-
resolved node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446
5+
6+
version "18.11.18"
7+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f"
8+
integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==
89

9-
typescript@4.9.3:
10-
version "4.9.3"
11-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3.tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db"
12-
integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==
10+
typescript@5.0.0-beta:
11+
version "5.0.0-beta"
12+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.0-beta.tgz#791fa95411d6ff64ee77d677ed1e6f32a2eaabaf"
13+
integrity sha512-+SSabbSXG5mtF+QGdV9uXXt9Saq1cSyI6hSG7znhaLoquleJpnmfkwSxFngK9c2fWWi1W/263TuzXQOsIcdjjA==

javascript/extractor/src/com/semmle/ts/extractor/TypeScriptASTConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ private Node convertEnumDeclaration(JsonObject node, SourceLocation loc) throws
11591159
loc,
11601160
hasModifier(node, "ConstKeyword"),
11611161
hasModifier(node, "DeclareKeyword"),
1162-
convertChildrenNotNull(node, "illegalDecorators"), // as of https://github.com/microsoft/TypeScript/pull/50343/ the property is called `illegalDecorators` instead of `decorators`
1162+
getDecorators(node),
11631163
convertChild(node, "name"),
11641164
convertChildren(node, "members"));
11651165
attachSymbolInformation(enumDeclaration, node);

0 commit comments

Comments
 (0)