@b9g/platform 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/globals.d.ts +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b9g/platform",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "The portable meta-framework built on web standards.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"service-worker",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
],
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/bikeshaving/shovel.git",
|
|
22
|
+
"url": "git+https://github.com/bikeshaving/shovel.git",
|
|
23
23
|
"directory": "packages/platform"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@b9g/async-context": "^0.2.1",
|
|
27
27
|
"@b9g/cache": "^0.2.2",
|
|
28
|
-
"@b9g/filesystem": "^0.
|
|
29
|
-
"@logtape/logtape": "^
|
|
28
|
+
"@b9g/filesystem": "^0.2.0",
|
|
29
|
+
"@logtape/logtape": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@b9g/libuild": "^0.1.20",
|
|
33
33
|
"@b9g/node-webworker": "^0.2.1",
|
|
34
|
-
"@b9g/platform-bun": "^0.1.
|
|
34
|
+
"@b9g/platform-bun": "^0.1.16",
|
|
35
35
|
"@b9g/platform-node": "^0.1.17"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
package/src/globals.d.ts
CHANGED
|
@@ -114,6 +114,23 @@ declare global {
|
|
|
114
114
|
message: ExtendableMessageEvent;
|
|
115
115
|
messageerror: MessageEvent;
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* When both DOM and WebWorker libs are included (universal/isomorphic code),
|
|
120
|
+
* the DOM lib's addEventListener overload on Window takes priority and infers
|
|
121
|
+
* events as `Event` instead of `FetchEvent`/`ExtendableEvent`. This augmentation
|
|
122
|
+
* adds a ServiceWorker-aware overload to Window so inference works in both contexts.
|
|
123
|
+
*/
|
|
124
|
+
interface Window {
|
|
125
|
+
addEventListener<K extends keyof WorkerGlobalScopeEventMap>(
|
|
126
|
+
type: K,
|
|
127
|
+
listener: (
|
|
128
|
+
this: Window,
|
|
129
|
+
ev: WorkerGlobalScopeEventMap[K],
|
|
130
|
+
) => any,
|
|
131
|
+
options?: boolean | AddEventListenerOptions,
|
|
132
|
+
): void;
|
|
133
|
+
}
|
|
117
134
|
}
|
|
118
135
|
|
|
119
136
|
export {};
|