-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
types: use
satisfies
to replace as
in src/router/modules
- Loading branch information
1 parent
9bbfb8b
commit b4fd313
Showing
18 changed files
with
18 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,4 +183,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -18,4 +18,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -171,4 +171,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -36,4 +36,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -22,4 +22,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -24,4 +24,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -79,4 +79,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -21,4 +21,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -39,4 +39,4 @@ export default [ | |
rank: 103 | ||
} | ||
} | ||
] as Array<RouteConfigsTable>; | ||
] satisfies Array<RouteConfigsTable>; |
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 |
---|---|---|
|
@@ -27,4 +27,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ export default { | |
} | ||
} | ||
] | ||
} as RouteConfigsTable; | ||
} satisfies RouteConfigsTable; |
b4fd313
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
satisfies
是TypeScript 4.9
新增的一个操作符,具体看 https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/修改前(使用
as
):修改后(使用
satisfies
):总结:
as
用于类型转换,satisfies
用于自定义类型检查和过滤