New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/nock

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/nock - npm Package Compare versions

Comparing version 10.0.0 to 10.0.1

64

nock/index.d.ts

@@ -20,24 +20,24 @@ // Type definitions for nock 10.0

declare namespace nock {
export function cleanAll(): void;
function cleanAll(): void;
export function activate(): void;
export function isActive(): boolean;
export function isDone(): boolean;
export function pendingMocks(): string[];
export function removeInterceptor(interceptor: Interceptor | RequestOptions): boolean;
export function disableNetConnect(): void;
export function enableNetConnect(matcher?: string | RegExp): void;
function activate(): void;
function isActive(): boolean;
function isDone(): boolean;
function pendingMocks(): string[];
function removeInterceptor(interceptor: Interceptor | RequestOptions): boolean;
function disableNetConnect(): void;
function enableNetConnect(matcher?: string | RegExp): void;
export function load(path: string): Scope[];
export function loadDefs(path: string): NockDefinition[];
export function define(defs: NockDefinition[]): Scope[];
function load(path: string): Scope[];
function loadDefs(path: string): NockDefinition[];
function define(defs: NockDefinition[]): Scope[];
export var emitter: NodeJS.EventEmitter;
let emitter: NodeJS.EventEmitter;
export var recorder: Recorder;
export function restore(): void;
let recorder: Recorder;
function restore(): void;
export var back: NockBack;
let back: NockBack;
type HttpHeaders = { [key: string]: string | string[] | { (req: any, res: any, body: string): any; }; };
interface HttpHeaders { [key: string]: string | string[] | { (req: any, res: any, body: string): any; }; }
type InterceptFunction = (

@@ -48,7 +48,6 @@ uri: string | RegExp | { (uri: string): boolean; },

) => Interceptor;
export type ReplyCallback = (err: any, result: ReplyCallbackResult) => void;
type ReplyCallback = (err: any, result: ReplyCallbackResult) => void;
type ReplyCallbackResult = string | [number, string | any] | [number, string | any, HttpHeaders] | any;
export interface Scope extends NodeJS.EventEmitter {
interface Scope extends NodeJS.EventEmitter {
get: InterceptFunction;

@@ -70,3 +69,2 @@ post: InterceptFunction;

defaultReplyHeaders(headers: HttpHeaders): this;

@@ -91,3 +89,3 @@ matchHeader(name: string, value: string | RegExp | { (value: string): boolean; }): this;

export interface Interceptor {
interface Interceptor {
query(params: boolean | { (queryObject: any): boolean; } | any): this;

@@ -117,3 +115,3 @@

export interface Options {
interface Options {
allowUnmocked?: boolean;

@@ -125,3 +123,3 @@ reqheaders?: { [key: string]: string | RegExp | { (headerValue: string): boolean; }; };

export interface RequestOptions {
interface RequestOptions {
proto?: string;

@@ -136,3 +134,3 @@ _https_?: boolean;

export interface Recorder {
interface Recorder {
rec(options?: boolean | RecorderOptions): void;

@@ -143,3 +141,3 @@ clear(): void;

export interface RecorderOptions {
interface RecorderOptions {
dont_print?: boolean;

@@ -152,3 +150,3 @@ output_objects?: boolean;

export interface NockDefinition {
interface NockDefinition {
scope: string;

@@ -166,5 +164,5 @@ port?: number | string;

export type NockBackMode = "wild" | "dryrun" | "record" | "lockdown";
type NockBackMode = "wild" | "dryrun" | "record" | "lockdown";
export interface NockBack {
interface NockBack {
fixtures: string;

@@ -178,9 +176,9 @@ setMode(mode: NockBackMode): void;

export interface NockBackContext {
scopes: Scope[];
assertScopesFinished(): void;
isLoaded: boolean;
interface NockBackContext {
scopes: Scope[];
assertScopesFinished(): void;
isLoaded: boolean;
}
export interface NockBackOptions {
interface NockBackOptions {
before?: (def: NockDefinition) => void;

@@ -187,0 +185,0 @@ after?: (scope: Scope) => void;

{
"name": "@types/nock",
"version": "10.0.0",
"version": "10.0.1",
"description": "TypeScript definitions for nock",

@@ -49,4 +49,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "2a5ba286aec3b973f9104dd367e43f35d9ee0d8dc93e6912d65e1581b3c9b9c9",
"typesPublisherContentHash": "b76c4d6c41f8bced9464c1b81acfc5fb3bd98ad010e59a68468e8f2190d9a316",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Fri, 26 Apr 2019 19:31:21 GMT
* Last updated: Mon, 29 Apr 2019 05:54:48 GMT
* Dependencies: @types/node

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc