diff --git a/types/make-dir/index.d.ts b/types/make-dir/index.d.ts index e23dfba939..905343c883 100644 --- a/types/make-dir/index.d.ts +++ b/types/make-dir/index.d.ts @@ -1,8 +1,12 @@ // Type definitions for make-dir 1.0 // Project: https://github.com/sindresorhus/make-dir // Definitions by: Ika +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// +import * as fs from 'fs'; + export = makeDir; /** @@ -33,6 +37,6 @@ declare namespace makeDir { * * Use a custom `fs` implementation. For example [`graceful-fs`](https://github.com/isaacs/node-graceful-fs). */ - fs?: any; + fs?: typeof fs; } } diff --git a/types/make-dir/make-dir-tests.ts b/types/make-dir/make-dir-tests.ts index 817d793b70..2767706bf6 100644 --- a/types/make-dir/make-dir-tests.ts +++ b/types/make-dir/make-dir-tests.ts @@ -1,7 +1,13 @@ import makeDir = require('make-dir'); +import * as fs from 'fs'; +import * as gfs from 'graceful-fs'; makeDir('path/to/somewhere').then(dirname => { // do something }); const dirname = makeDir.sync('path/to/somewhere'); + +makeDir('path/to/somewhere', {mode: parseInt('777', 8)}); +makeDir('path/to/somewhere', {fs}); +makeDir('path/to/somewhere', {fs: gfs});