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 85
85
"semver" : " 7.3.7" ,
86
86
"string-width" : " 5.0.1" ,
87
87
"strip-ansi" : " 7.0.1" ,
88
- "typescript" : " 4.8.2 " ,
88
+ "typescript" : " 4.9.3 " ,
89
89
"unicode-regex" : " 3.0.0" ,
90
90
"unified" : " 9.2.1" ,
91
91
"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");
4
4
const visitNode = require ( "./visit-node.js" ) ;
5
5
const throwSyntaxError = require ( "./throw-syntax-error.js" ) ;
6
6
7
+ // Taken from `typescript` package
8
+ const SyntaxKind = {
9
+ AbstractKeyword : 126 ,
10
+ SourceFile : 308 ,
11
+ PropertyDeclaration : 169 ,
12
+ } ;
13
+
7
14
// Copied from https://unpkg.com/typescript@4.8.2/lib/typescript.js
8
15
function getSourceFileOfNode ( node ) {
9
- while ( node && node . kind !== 305 /* SyntaxKind.SourceFile */ ) {
16
+ while ( node && node . kind !== SyntaxKind . SourceFile ) {
10
17
node = node . parent ;
11
18
}
12
19
return node ;
@@ -36,13 +43,11 @@ function throwErrorForInvalidDecorator(tsNode) {
36
43
// Values of abstract property is removed since `@typescript-eslint/typescript-estree` v5
37
44
// https://github.com/typescript-eslint/typescript-eslint/releases/tag/v5.0.0
38
45
function throwErrorForInvalidAbstractProperty ( tsNode , esTreeNode ) {
39
- const SYNTAX_KIND_PROPERTY_DEFINITION = 167 ;
40
- const SYNTAX_KIND_ABSTRACT_KEYWORD = 126 ;
41
46
if (
42
- tsNode . kind !== SYNTAX_KIND_PROPERTY_DEFINITION ||
47
+ tsNode . kind !== SyntaxKind . PropertyDeclaration ||
43
48
( tsNode . modifiers &&
44
49
! tsNode . modifiers . some (
45
- ( modifier ) => modifier . kind === SYNTAX_KIND_ABSTRACT_KEYWORD
50
+ ( modifier ) => modifier . kind === SyntaxKind . AbstractKeyword
46
51
) )
47
52
) {
48
53
return ;
Original file line number Diff line number Diff line change 1710
1710
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
1711
1711
1712
1712
" @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 ==
1716
1716
1717
1717
" @types/normalize-package-data@^2.4.0 " :
1718
1718
version "2.4.1"
@@ -6504,10 +6504,10 @@ typedarray-to-buffer@^3.1.5:
6504
6504
dependencies :
6505
6505
is-typedarray "^1.0.0"
6506
6506
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 ==
6511
6511
6512
6512
unbox-primitive@^1.0.1 :
6513
6513
version "1.0.1"
You can’t perform that action at this time.
0 commit comments