diff --git a/src/index.ts b/src/index.ts index 58596ae..4a91fa6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import base from './base' import _catch from './catch' import {expect} from './chai' import env from './env' -import {nock} from './nock' +import {nock, NockScope} from './nock' import {stderr, stdout} from './stdmock' import stub from './stub' @@ -21,5 +21,6 @@ export type Fancy = typeof fancy export { expect, FancyTypes, + NockScope, } export default fancy diff --git a/src/nock.ts b/src/nock.ts index 6d57ea7..acefe75 100644 --- a/src/nock.ts +++ b/src/nock.ts @@ -1,7 +1,7 @@ import * as _ from 'lodash' import * as Nock from 'nock' -export function nock(host?: string, cb?: (nock: nock.Scope) => any) { +export function nock(host?: string, cb?: (nock: NockScope) => any) { if (_.isUndefined(host)) throw new Error('host is undefined') if (_.isUndefined(cb)) throw new Error('callback is undefined') @@ -21,6 +21,4 @@ export function nock(host?: string, cb?: (nock: nock.Scope) => any) { } } -export namespace nock { - export interface Scope extends Nock.Scope {} -} +export interface NockScope extends Nock.Scope {}