Skip to content

Commit 2e999d1

Browse files
Jayson ChenDevtools-frontend LUCI CQ
authored andcommitted
Add wicg scheduling API definition
window.scheduler.postTask and .yield are originally not available in the devtools-frontend codebase. This CL added the type definition so Typescript recognizes the API Bug: 383240467 Change-Id: I4a395aca4e3956ceaa08053dcded5017f0ed10b1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6081857 Reviewed-by: Robert Paveza <[email protected]> Commit-Queue: Jayson Chen <[email protected]> Reviewed-by: Jack Franklin <[email protected]>
1 parent eb03ef2 commit 2e999d1

File tree

7 files changed

+84
-1
lines changed

7 files changed

+84
-1
lines changed

node_modules/@types/wicg-task-scheduling/LICENSE

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/wicg-task-scheduling/index.d.ts

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/wicg-task-scheduling/package.json

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@types/rimraf": "3.0.2",
5757
"@types/sinon": "17.0.3",
5858
"@types/webidl2": "23.13.6",
59+
"@types/wicg-task-scheduling": "2024.1.0",
5960
"@typescript-eslint/eslint-plugin": "7.18.0",
6061
"@typescript-eslint/parser": "7.18.0",
6162
"@web/rollup-plugin-import-meta-assets": "2.2.1",

scripts/build/typescript/ts_library.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
'global_defs.d.ts'),
4444
# Types for W3C FileSystem API
4545
path.join(NODE_MODULES_DIRECTORY, '@types', 'filesystem', 'index.d.ts'),
46+
# Types for wicg task scheduling API
47+
path.join(NODE_MODULES_DIRECTORY, '@types', 'wicg-task-scheduling',
48+
'index.d.ts'),
4649
]
4750

4851
logging.basicConfig(

scripts/build/typescript/typescript.gni

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ assert(!devtools_skip_typecheck || !is_official_build,
5050
#
5151
template("ts_library") {
5252
action(target_name) {
53-
script = devtools_location_prepend + "scripts/build/typescript/ts_library.py"
53+
script =
54+
devtools_location_prepend + "scripts/build/typescript/ts_library.py"
5455

5556
forward_variables_from(invoker,
5657
[
@@ -70,6 +71,8 @@ template("ts_library") {
7071
devtools_location_prepend + "front_end/legacy/legacy-defs.d.ts",
7172
devtools_location_prepend + "front_end/global_typings/global_defs.d.ts",
7273
devtools_location_prepend + "node_modules/@types/filesystem/index.d.ts",
74+
devtools_location_prepend +
75+
"node_modules/@types/wicg-task-scheduling/index.d.ts",
7376
]
7477

7578
# When use_remoteexec=true, node actions run on remote Linux worker.

0 commit comments

Comments
 (0)