puppeteer/src/common/LazyArg.ts

14 lines
190 B
TypeScript
Raw Normal View History

/**
* @internal
*/
export class LazyArg<T> {
#get: () => Promise<T>;
constructor(get: () => Promise<T>) {
this.#get = get;
}
get(): Promise<T> {
return this.#get();
}
}