Skip to content
This repository was archived by the owner on Oct 12, 2021. It is now read-only.

Commit 07878c7

Browse files
committed
fix(typings): Remove an unknown type reference from cache API mocks, and properly export the type for BroccoliPlugin to allow type definition generation.
1 parent acdf6e4 commit 07878c7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

service-worker/worker/src/generator/cli-sw.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ const fse = require('fs-extra');
77
const path = require('path');
88
const MANIFEST_NAME = 'ngsw-manifest.json';
99
const WORKER_NAME = 'worker.js';
10-
export const BroccoliPlugin: BroccoliPluginConstructor = require('broccoli-caching-writer');
1110

1211
export interface BroccoliPluginConstructor {
1312
new(inputNodes: any[], options?: any): BroccoliPluginConstructor;
1413
inputPaths: string[];
1514
outputPath: string;
1615
}
1716

17+
export type BroccoliPlugin = BroccoliPluginConstructor;
18+
export const BroccoliPlugin: BroccoliPluginConstructor = require('broccoli-caching-writer');
19+
1820
class BroccoliSourceResolver implements SourceResolver {
1921
constructor(public inputPaths:string[]) {}
2022
resolve(sources:string[]): Promise<Object> {

service-worker/worker/src/testing/mock_cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class MockRequest extends MockBody implements Request {
166166
cache: RequestCache = "default";
167167

168168
headers: any;
169-
redirect: RequestRedirect;
169+
redirect: any;
170170
get body(): any {
171171
return this;
172172
}

0 commit comments

Comments
 (0)