diff --git a/types/read-pkg-up/index.d.ts b/types/read-pkg-up/index.d.ts index 974a9fa0cd..f1c7bd11ee 100644 --- a/types/read-pkg-up/index.d.ts +++ b/types/read-pkg-up/index.d.ts @@ -4,9 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace ReadPkgUp { - function sync(options?: Options): Package; + export function sync(options?: Options): Package; - interface Options { + export interface Options { /** * Directory to start looking for a package.json file. * @@ -21,7 +21,7 @@ declare namespace ReadPkgUp { normalize?: boolean; } - interface Package { + export interface Package { [key: string]: any; } } diff --git a/types/read-pkg-up/read-pkg-up-tests.ts b/types/read-pkg-up/read-pkg-up-tests.ts index 5e7d4bdccf..e01dd4e123 100644 --- a/types/read-pkg-up/read-pkg-up-tests.ts +++ b/types/read-pkg-up/read-pkg-up-tests.ts @@ -1,4 +1,4 @@ -import * as ReadPkgUp from 'read-pkg-up'; +import ReadPkgUp = require('read-pkg-up'); ReadPkgUp({cwd: '.', normalize: false}).then(pkg => typeof pkg === 'object'); typeof ReadPkgUp.sync({cwd: '.', normalize: false}) === 'object';