Skip to content

Commit

Permalink
Merge pull request #11964 from CesiumGS/rest-tuple
Browse files Browse the repository at this point in the history
Update TS definition to fix #10498
  • Loading branch information
ggetz committed May 1, 2024
2 parents c498a01 + 3a01635 commit 55ede3c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- Fixed leaked CSS styling from `I3SBuildingSceneLayerExplorer` widget. [#11959](https://github.com/CesiumGS/cesium/pull/11959)
- Fixed a bug where a data source was not automatically rendered after is was added in request render mode. [#11934](https://github.com/CesiumGS/cesium/pull/11934)
- Fixes Typescript definition for `Event.raiseEvent`. [#10498](https://github.com/CesiumGS/cesium/issues/10498)

### 1.116 - 2024-04-01

Expand Down
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 55ede3c

Please sign in to comment.