1 | declare module 'sw-precache' {
|
2 |
|
3 | export interface SWConfig {
|
4 | cacheId?: string;
|
5 | directoryIndex?: string;
|
6 | dynamicUrlToDependencies?: {
|
7 | [property: string]: string[]
|
8 | };
|
9 | handleFetch?: boolean;
|
10 | ignoreUrlParametersMatching?: RegExp[];
|
11 | importScripts?: string[];
|
12 | logger?: Function;
|
13 | maximumFileSizeToCacheInBytes?: number;
|
14 | navigateFallback?: string;
|
15 | navigateFallbackWhitelist?: RegExp[];
|
16 | replacePrefix?: string;
|
17 | runtimeCaching?: {
|
18 | urlPattern: RegExp;
|
19 | handler: string;
|
20 | options?: {
|
21 | cache: {
|
22 | maxEntries: number;
|
23 | name: string;
|
24 | };
|
25 | };
|
26 | }[];
|
27 | staticFileGlobs?: string[];
|
28 | stripPrefix?: string;
|
29 | templateFilePath?: string;
|
30 | verbose?: boolean;
|
31 | }
|
32 |
|
33 | export function generate(options: SWConfig, callback: (err?: Error, fileContents?: string) => void): void;
|
34 | export function write(filepath: string, options: SWConfig, callback: (err?: Error) => void): void;
|
35 | } |
\ | No newline at end of file |