-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Typescript declaration file (#44)
- Loading branch information
1 parent
2f0c54d
commit dc83503
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
declare module 'fetch-vcr' { | ||
function fetchVCR(url: string, args: object): Promise<any>; | ||
|
||
interface Config { | ||
mode?: 'playback' | 'cache' | 'record' | 'erase'; | ||
fixturePath?: string; | ||
ignoreUrls?: string[]; | ||
headerBlacklist?: string[] | ||
} | ||
namespace fetchVCR { | ||
function configure(config: Config): void; | ||
function loadFile(root: string, filename: string): Promise<string>; | ||
function saveFile(root: string, filename: string, buffer: string): Promise<'fetch-saved'>; | ||
function getCalled(): void; | ||
function clearCalled(): void; | ||
} | ||
export default fetchVCR; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters