Skip to content

Commit

Permalink
created the declaration files
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcodes committed Oct 14, 2022
1 parent d0dc93e commit f942e57
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
21 changes: 21 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
interface RequestParameter extends RequestInit {
url?: string | ((arg0: string) => string);
method?: string;
headers?: any | ((arg0: any) => any);
body?: any | ((arg0: any) => any);
}
interface Replayer {
pattern: RegExp | string;
}
declare module 'puppeteer' {
interface Page {
catchRequest: (replayer: Replayer, trigger: () => void) => Promise<HTTPRequest>;
}
}
declare module 'puppeteer' {
interface HTTPRequest {
replay: (params?: RequestParameter) => Promise<HTTPResponse>;
}
}
export {};
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */

/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
Expand Down

0 comments on commit f942e57

Please sign in to comment.