-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add support for TypeScript 4.8 (#3548)
Closes #3547
- Loading branch information
1 parent
ecb6377
commit d558ce1
Showing
36 changed files
with
180 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
modules/component-store/schematics-core/utility/decorators.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
modules/router-store/schematics-core/utility/decorators.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as ts from 'typescript'; | ||
|
||
/** | ||
* In TS 4.8 the `decorators` are combined with the `modifiers` array. | ||
* Once we drop support for older versions, we can remove this function | ||
* and use `ts.getDecorators`. | ||
*/ | ||
export function getNodeDecorators(node: ts.Node): ts.Decorator[] | undefined { | ||
return (ts as any).getDecorators?.(node) || node.decorators; | ||
} |
Oops, something went wrong.