File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed
src/language-js/parse/postprocess Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 8585 "semver" : " 7.3.7" ,
8686 "string-width" : " 5.0.1" ,
8787 "strip-ansi" : " 7.0.1" ,
88- "typescript" : " 4.8.2 " ,
88+ "typescript" : " 4.9.3 " ,
8989 "unicode-regex" : " 3.0.0" ,
9090 "unified" : " 9.2.1" ,
9191 "vnopts" : " 1.0.2" ,
Original file line number Diff line number Diff line change @@ -4,9 +4,16 @@ const isNonEmptyArray = require("../../../utils/is-non-empty-array.js");
44const visitNode = require ( "./visit-node.js" ) ;
55const throwSyntaxError = require ( "./throw-syntax-error.js" ) ;
66
7+ // Taken from `typescript` package
8+ const SyntaxKind = {
9+ AbstractKeyword : 126 ,
10+ SourceFile : 308 ,
11+ PropertyDeclaration : 169 ,
12+ } ;
13+
714// Copied from https://unpkg.com/[email protected] /lib/typescript.js 815function getSourceFileOfNode ( node ) {
9- while ( node && node . kind !== 305 /* SyntaxKind.SourceFile */ ) {
16+ while ( node && node . kind !== SyntaxKind . SourceFile ) {
1017 node = node . parent ;
1118 }
1219 return node ;
@@ -36,13 +43,11 @@ function throwErrorForInvalidDecorator(tsNode) {
3643// Values of abstract property is removed since `@typescript-eslint/typescript-estree` v5
3744// https://github.com/typescript-eslint/typescript-eslint/releases/tag/v5.0.0
3845function throwErrorForInvalidAbstractProperty ( tsNode , esTreeNode ) {
39- const SYNTAX_KIND_PROPERTY_DEFINITION = 167 ;
40- const SYNTAX_KIND_ABSTRACT_KEYWORD = 126 ;
4146 if (
42- tsNode . kind !== SYNTAX_KIND_PROPERTY_DEFINITION ||
47+ tsNode . kind !== SyntaxKind . PropertyDeclaration ||
4348 ( tsNode . modifiers &&
4449 ! tsNode . modifiers . some (
45- ( modifier ) => modifier . kind === SYNTAX_KIND_ABSTRACT_KEYWORD
50+ ( modifier ) => modifier . kind === SyntaxKind . AbstractKeyword
4651 ) )
4752 ) {
4853 return ;
Original file line number Diff line number Diff line change 17101710 integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
17111711
17121712" @types/node@* " :
1713- version "17.0.15 "
1714- resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.15 .tgz#97779282c09c09577120a2162e71d8380003590a "
1715- integrity sha512-zWt4SDDv1S9WRBNxLFxFRHxdD9tvH8f5/kg5/IaLFdnSNXsDY4eL3Q3XXN+VxUnWIhyVFDwcsmAprvwXoM/ClA ==
1713+ version "18.11.9 "
1714+ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9 .tgz#02d013de7058cea16d36168ef2fc653464cfbad4 "
1715+ integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg ==
17161716
17171717" @types/normalize-package-data@^2.4.0 " :
17181718 version "2.4.1"
@@ -6504,10 +6504,10 @@ typedarray-to-buffer@^3.1.5:
65046504 dependencies :
65056505 is-typedarray "^1.0.0"
65066506
6507- typescript@4.8.2 :
6508- version "4.8.2 "
6509- resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2 .tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790 "
6510- integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw ==
6507+ typescript@4.9.3 :
6508+ version "4.9.3 "
6509+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.3 .tgz#3aea307c1746b8c384435d8ac36b8a2e580d85db "
6510+ integrity sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA ==
65116511
65126512unbox-primitive@^1.0.1 :
65136513 version "1.0.1"
You can’t perform that action at this time.
0 commit comments