Skip to content

Commit

Permalink
Update TS definition to fix #10498
Browse files Browse the repository at this point in the history
  • Loading branch information
angrycat9000 committed Apr 30, 2024
1 parent 1207d26 commit 1725ce5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,11 @@ function generateTypeScriptDefinitions(
.replace(
/\/\*\*[\*\s\w]*?\*\/\nexport const Check: any;/m,
`\n${readFileSync("./packages/engine/Source/Core/Check.d.ts").toString()}`
)
// Fix https://github.com/CesiumGS/cesium/issues/10498 so we can use the rest parameter expand tuple
.replace(
"raiseEvent(...arguments: Parameters<Listener>[]): void;",
"raiseEvent(...arguments: Parameters<Listener>): void;"
);

// Wrap the source to actually be inside of a declared cesium module
Expand Down Expand Up @@ -1399,6 +1404,11 @@ function createTypeScriptDefinitions() {
.replace(
/\/\*\*[\*\s\w]*?\*\/\nexport const Check: any;/m,
`\n${readFileSync("./packages/engine/Source/Core/Check.d.ts").toString()}`
)
// Fix https://github.com/CesiumGS/cesium/issues/10498 to have rest parameter expand tuple
.replace(
"raiseEvent(...arguments: Parameters<Listener>[]): void;",
"raiseEvent(...arguments: Parameters<Listener>): void;"
);

// Wrap the source to actually be inside of a declared cesium module
Expand Down

0 comments on commit 1725ce5

Please sign in to comment.