diff --git a/types/tempfile/index.d.ts b/types/tempfile/index.d.ts index 25544e4fd9..5d59f5d7d8 100644 --- a/types/tempfile/index.d.ts +++ b/types/tempfile/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for tempfile v1.1.0 +// Type definitions for tempfile 2.0 // Project: https://github.com/sindresorhus/tempfile // Definitions by: Sam Verschueren +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare module "tempfile" { - function tempfile(extension?: string): string; - module tempfile {} - export = tempfile; -} +export = tempfile; + +declare function tempfile(extension?: string): string; +declare namespace tempfile {} diff --git a/types/tempfile/tempfile-tests.ts b/types/tempfile/tempfile-tests.ts index 8e32021f3d..b614a4a283 100644 --- a/types/tempfile/tempfile-tests.ts +++ b/types/tempfile/tempfile-tests.ts @@ -1,4 +1,4 @@ import tempfile = require('tempfile'); -tempfile(); +tempfile(); // $ExpectType string tempfile('.png'); diff --git a/types/tempfile/tsconfig.json b/types/tempfile/tsconfig.json index a39b2cdcb1..0a2e750fbb 100644 --- a/types/tempfile/tsconfig.json +++ b/types/tempfile/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +19,4 @@ "index.d.ts", "tempfile-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/tempfile/tslint.json b/types/tempfile/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/tempfile/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }