Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 040c0d6

Browse files
committed
fix: add patch for service-worker-types
1 parent d419b65 commit 040c0d6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- node_modules/@types/service-worker-mock/index.d.ts 2021年02月18日 13:51:50.000000000 -0700
2+
+++ patches/service-workertypes.d.ts 2021年02月18日 16:30:01.000000000 -0700
3+
@@ -3,6 +3,11 @@
4+
// Definitions by: Remco Haszing <https://github.com/remcohaszing>
5+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6+
// TypeScript Version: 2.8
7+
+// https://gist.github.com/shqld/32df51a4a4ed429f2c76e4e2cfdf6f96#gistcomment-2793376
8+
+// excludes default libs such as 'dom' conflicting with 'webworker'
9+
+/// <reference no-default-lib="true"/>
10+
+/// <reference lib="esnext" />
11+
+/// <reference lib="webworker" />
12+
13+
export = makeServiceWorkerEnv;
14+
declare function makeServiceWorkerEnv(): WorkerGlobalScope;

‎test/scripts/patch.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ apply_service_worker_mock_patches() {
1010

1111
# This patch adds a missing import
1212
patch --forward node_modules/service-worker-mock/models/Response.js < patches/service-worker-mock-response.patch
13+
14+
# This patch fixes the types declaration file
15+
# See discussion:
16+
patch --forward node_modules/@types/service-worker-mock/index.d.ts < patches/service-worker-types.patch
1317
}
1418

1519
main() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /