@types/nock
Advanced tools
Comparing version 0.54.22-alpha to 0.54.23-alpha
183
index.d.ts
@@ -8,119 +8,118 @@ // Type definitions for nock v0.54.0 | ||
declare module "nock" { | ||
export = nock; | ||
export = nock; | ||
function nock (host: string, options?: nock.Options): nock.Scope; | ||
declare function nock (host: string, options?: nock.Options): nock.Scope; | ||
namespace nock { | ||
export function cleanAll(): void; | ||
declare namespace nock { | ||
export function cleanAll(): void; | ||
export function disableNetConnect(): void; | ||
export function enableNetConnect(): void; | ||
export function enableNetConnect(regex: RegExp): void; | ||
export function enableNetConnect(domain: string): void; | ||
export function disableNetConnect(): void; | ||
export function enableNetConnect(): void; | ||
export function enableNetConnect(regex: RegExp): void; | ||
export function enableNetConnect(domain: string): void; | ||
export var recorder: Recorder; | ||
export var recorder: Recorder; | ||
export interface Scope { | ||
get(path: string, data?: string): Scope; | ||
get(path: RegExp, data?: string): Scope; | ||
export interface Scope { | ||
get(path: string, data?: string): Scope; | ||
get(path: RegExp, data?: string): Scope; | ||
post(path: string, data?: string): Scope; | ||
post(path: string, data?: Object): Scope; | ||
post(path: string, regex?: RegExp): Scope; | ||
post(path: RegExp, data?: string): Scope; | ||
post(path: RegExp, data?: Object): Scope; | ||
post(path: RegExp, regex?: RegExp): Scope; | ||
post(path: string, data?: string): Scope; | ||
post(path: string, data?: Object): Scope; | ||
post(path: string, regex?: RegExp): Scope; | ||
post(path: RegExp, data?: string): Scope; | ||
post(path: RegExp, data?: Object): Scope; | ||
post(path: RegExp, regex?: RegExp): Scope; | ||
patch(path: string, data?: string): Scope; | ||
patch(path: string, data?: Object): Scope; | ||
patch(path: string, regex?: RegExp): Scope; | ||
patch(path: RegExp, data?: string): Scope; | ||
patch(path: RegExp, data?: Object): Scope; | ||
patch(path: RegExp, regex?: RegExp): Scope; | ||
patch(path: string, data?: string): Scope; | ||
patch(path: string, data?: Object): Scope; | ||
patch(path: string, regex?: RegExp): Scope; | ||
patch(path: RegExp, data?: string): Scope; | ||
patch(path: RegExp, data?: Object): Scope; | ||
patch(path: RegExp, regex?: RegExp): Scope; | ||
put(path: string, data?: string): Scope; | ||
put(path: string, data?: Object): Scope; | ||
put(path: string, regex?: RegExp): Scope; | ||
put(path: RegExp, data?: string): Scope; | ||
put(path: RegExp, data?: Object): Scope; | ||
put(path: RegExp, regex?: RegExp): Scope; | ||
put(path: string, data?: string): Scope; | ||
put(path: string, data?: Object): Scope; | ||
put(path: string, regex?: RegExp): Scope; | ||
put(path: RegExp, data?: string): Scope; | ||
put(path: RegExp, data?: Object): Scope; | ||
put(path: RegExp, regex?: RegExp): Scope; | ||
head(path: string): Scope; | ||
head(path: RegExp): Scope; | ||
head(path: string): Scope; | ||
head(path: RegExp): Scope; | ||
delete(path: string, data?: string): Scope; | ||
delete(path: string, data?: Object): Scope; | ||
delete(path: string, regex?: RegExp): Scope; | ||
delete(path: RegExp, data?: string): Scope; | ||
delete(path: RegExp, data?: Object): Scope; | ||
delete(path: RegExp, regex?: RegExp): Scope; | ||
delete(path: string, data?: string): Scope; | ||
delete(path: string, data?: Object): Scope; | ||
delete(path: string, regex?: RegExp): Scope; | ||
delete(path: RegExp, data?: string): Scope; | ||
delete(path: RegExp, data?: Object): Scope; | ||
delete(path: RegExp, regex?: RegExp): Scope; | ||
merge(path: string, data?: string): Scope; | ||
merge(path: string, data?: Object): Scope; | ||
merge(path: string, regex?: RegExp): Scope; | ||
merge(path: RegExp, data?: string): Scope; | ||
merge(path: RegExp, data?: Object): Scope; | ||
merge(path: RegExp, regex?: RegExp): Scope; | ||
merge(path: string, data?: string): Scope; | ||
merge(path: string, data?: Object): Scope; | ||
merge(path: string, regex?: RegExp): Scope; | ||
merge(path: RegExp, data?: string): Scope; | ||
merge(path: RegExp, data?: Object): Scope; | ||
merge(path: RegExp, regex?: RegExp): Scope; | ||
query(params: any): Scope; | ||
query(acceptAnyParams: boolean): Scope; | ||
query(params: any): Scope; | ||
query(acceptAnyParams: boolean): Scope; | ||
intercept(path: string, verb: string, body?: string, options?: any): Scope; | ||
intercept(path: string, verb: string, body?: Object, options?: any): Scope; | ||
intercept(path: string, verb: string, body?: RegExp, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: string, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: Object, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: RegExp, options?: any): Scope; | ||
intercept(path: string, verb: string, body?: string, options?: any): Scope; | ||
intercept(path: string, verb: string, body?: Object, options?: any): Scope; | ||
intercept(path: string, verb: string, body?: RegExp, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: string, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: Object, options?: any): Scope; | ||
intercept(path: RegExp, verb: string, body?: RegExp, options?: any): Scope; | ||
reply(responseCode: number, body?: string, headers?: Object): Scope; | ||
reply(responseCode: number, body?: Object, headers?: Object): Scope; | ||
reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: Object): Scope; | ||
replyWithFile(responseCode: number, fileName: string): Scope; | ||
replyWithError(errorMessage: string): Scope; | ||
reply(responseCode: number, body?: string, headers?: Object): Scope; | ||
reply(responseCode: number, body?: Object, headers?: Object): Scope; | ||
reply(responseCode: number, callback: (uri: string, body: string) => string, headers?: Object): Scope; | ||
replyWithFile(responseCode: number, fileName: string): Scope; | ||
replyWithError(errorMessage: string): Scope; | ||
defaultReplyHeaders(headers: Object): Scope; | ||
defaultReplyHeaders(headers: Object): Scope; | ||
matchHeader(name: string, value: string): Scope; | ||
matchHeader(name: string, regex: RegExp): Scope; | ||
matchHeader(name: string, fn: (value: string) => boolean): Scope; | ||
matchHeader(name: string, value: string): Scope; | ||
matchHeader(name: string, regex: RegExp): Scope; | ||
matchHeader(name: string, fn: (value: string) => boolean): Scope; | ||
filteringPath(regex: RegExp, replace: string): Scope; | ||
filteringPath(fn: (path: string) => string): Scope; | ||
filteringRequestBody(regex: RegExp, replace: string): Scope; | ||
filteringRequestBody(fn: (path: string) => string): Scope; | ||
filteringPath(regex: RegExp, replace: string): Scope; | ||
filteringPath(fn: (path: string) => string): Scope; | ||
filteringRequestBody(regex: RegExp, replace: string): Scope; | ||
filteringRequestBody(fn: (path: string) => string): Scope; | ||
persist(): Scope; | ||
log(out: () => void): Scope; | ||
persist(): Scope; | ||
log(out: () => void): Scope; | ||
delay(timeMs: number): Scope; | ||
delayConnection(timeMs: number): Scope; | ||
delay(timeMs: number): Scope; | ||
delayConnection(timeMs: number): Scope; | ||
times(repeats: number): Scope; | ||
once(): Scope; | ||
twice(): Scope; | ||
thrice(): Scope; | ||
times(repeats: number): Scope; | ||
once(): Scope; | ||
twice(): Scope; | ||
thrice(): Scope; | ||
done(): void; | ||
isDone(): boolean; | ||
restore(): void; | ||
pendingMocks(): Object[]; | ||
} | ||
done(): void; | ||
isDone(): boolean; | ||
restore(): void; | ||
pendingMocks(): Object[]; | ||
} | ||
export interface Recorder { | ||
rec(capture?: boolean): void; | ||
rec(options?: RecorderOptions): void; | ||
play(): any[]; | ||
} | ||
export interface Recorder { | ||
rec(capture?: boolean): void; | ||
rec(options?: RecorderOptions): void; | ||
play(): any[]; | ||
} | ||
export interface Options { | ||
allowUnmocked?: boolean; | ||
} | ||
export interface Options { | ||
allowUnmocked?: boolean; | ||
} | ||
export interface RecorderOptions { | ||
dont_print?: boolean; | ||
output_objects?: boolean; | ||
enable_reqheaders_recording?: boolean; | ||
} | ||
export interface RecorderOptions { | ||
dont_print?: boolean; | ||
output_objects?: boolean; | ||
enable_reqheaders_recording?: boolean; | ||
} | ||
} | ||
{ | ||
"name": "@types/nock", | ||
"version": "0.54.22-alpha", | ||
"version": "0.54.23-alpha", | ||
"description": "TypeScript definitions for nock v0.54.0", | ||
@@ -8,2 +8,6 @@ "main": "", | ||
"author": "bonnici <https://github.com/bonnici>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
"license": "MIT", | ||
@@ -10,0 +14,0 @@ "typings": "index.d.ts", |
@@ -11,9 +11,9 @@ # Installation | ||
Additional Details | ||
* Last updated: Wed, 25 May 2016 04:20:27 GMT | ||
* File structure: DeclareModule | ||
* Last updated: Fri, 01 Jul 2016 18:42:29 GMT | ||
* File structure: ProperModule | ||
* Library Dependencies: none | ||
* Module Dependencies: none | ||
* Global values: none | ||
* Global values: nock | ||
# Credits | ||
These definitions were written by bonnici <https://github.com/bonnici>. |
@@ -13,4 +13,6 @@ { | ||
"sourceBranch": "types-2.0", | ||
"kind": "DeclareModule", | ||
"globals": [], | ||
"kind": "ProperModule", | ||
"globals": [ | ||
"nock" | ||
], | ||
"declaredModules": [ | ||
@@ -22,3 +24,3 @@ "nock" | ||
], | ||
"contentHash": "4ad95f54565f9ab0a548841066d0905c4329b6fa8c50035d21765d7fa56c346f" | ||
"contentHash": "1036c85ed8a4047926ae014f34c633f3d7aeceec88d7f889e934b1107a4bbd5c" | ||
} |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
5823