mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
[tempfile] add linting & enable strict null checks (#18852)
* [tempfile] add linting & enable strict null checks * [tempfile] reintroduce namespace to support import * syntax to avoid a breaking change for users
This commit is contained in:
committed by
Mohamed Hegazy
parent
2b74a91e5f
commit
e1513dee76
Vendored
+6
-6
@@ -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 <https://github.com/SamVerschueren>
|
||||
// BendingBender <https://github.com/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 {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import tempfile = require('tempfile');
|
||||
|
||||
tempfile();
|
||||
tempfile(); // $ExpectType string
|
||||
tempfile('.png');
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
@@ -19,4 +19,4 @@
|
||||
"index.d.ts",
|
||||
"tempfile-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user