Joey Perrott 15f8afa4bf ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to
goldens/public-api.

Additionally, provides a README in the goldens directory and a script
assist in testing the current state of the repo against the goldens as
well as a command for accepting all changes to the goldens in a single
command.

PR Close #35768
2020-03-10 20:58:39 -04:00

47 lines
1.1 KiB
TypeScript

export declare interface AssetGroup {
installMode?: 'prefetch' | 'lazy';
name: string;
resources: {
files?: Glob[];
urls?: Glob[];
};
updateMode?: 'prefetch' | 'lazy';
}
export declare interface Config {
appData?: {};
assetGroups?: AssetGroup[];
dataGroups?: DataGroup[];
index: string;
navigationUrls?: string[];
}
export declare interface DataGroup {
cacheConfig: {
maxSize: number;
maxAge: Duration;
timeout?: Duration;
strategy?: 'freshness' | 'performance';
};
name: string;
urls: Glob[];
version?: number;
}
export declare type Duration = string;
export declare interface Filesystem {
hash(file: string): Promise<string>;
list(dir: string): Promise<string[]>;
read(file: string): Promise<string>;
write(file: string, contents: string): Promise<void>;
}
export declare class Generator {
readonly fs: Filesystem;
constructor(fs: Filesystem, baseHref: string);
process(config: Config): Promise<Object>;
}
export declare type Glob = string;