Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: simplify nock exports
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jun 1, 2018
1 parent 5ca4a63 commit 91dbb88
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/nock.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Nock = require('nock')

export function nock(host?: string, options?: nock.Callback | nock.Options, cb?: nock.Callback) {
export function nock(host?: string, options?: Callback | Options, cb?: Callback) {
if (host === undefined) throw new Error('host is undefined')
if (typeof options === 'function') {
cb = options
Expand Down Expand Up @@ -33,8 +33,6 @@ export function nock(host?: string, options?: nock.Callback | nock.Options, cb?:
}
}

export namespace nock {
export interface Scope extends Nock.Scope {}
export interface Options extends Nock.Options {}
export type Callback = (nock: Scope) => any
}
export interface Scope extends Nock.Scope {}
export interface Options extends Nock.Options {}
export type Callback = (nock: Scope) => any

0 comments on commit 91dbb88

Please sign in to comment.