mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-05 05:04:26 +00:00
[sprintf] enable strict null checks and linting
This commit is contained in:
10
types/sprintf/index.d.ts
vendored
10
types/sprintf/index.d.ts
vendored
@@ -1,10 +1,10 @@
|
||||
// Type definitions for sprintff
|
||||
// Project: https://github.com/maritz/node-sprintff
|
||||
// Type definitions for sprintf 0.1
|
||||
// Project: https://github.com/maritz/node-sprintf
|
||||
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// Imported from: https://github.com/soywiz/typescript-node-definitions/sprintff.d.ts
|
||||
|
||||
|
||||
export declare function sprintf(fmt: string, ...args: any[]): string;
|
||||
export declare function vsprintf(fmt: string, args: any[]): string;
|
||||
export function sprintf(fmt: string, ...args: any[]): string;
|
||||
export function vsprintf(fmt: string, args: any[]): string;
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
|
||||
import sprintf = require('sprintf');
|
||||
|
||||
var str: string;
|
||||
var num: number;
|
||||
declare const str: string;
|
||||
declare const num: number;
|
||||
|
||||
sprintf.sprintf(str, str);
|
||||
sprintf.sprintf(str, str); // $ExpectType string
|
||||
sprintf.sprintf(str, str, num);
|
||||
sprintf.sprintf(str, num, str);
|
||||
|
||||
sprintf.vsprintf(str, [str]);
|
||||
sprintf.vsprintf(str, [str]); // $ExpectType string
|
||||
sprintf.vsprintf(str, [str, num]);
|
||||
sprintf.vsprintf(str, [num, str]);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
@@ -19,4 +19,4 @@
|
||||
"index.d.ts",
|
||||
"sprintf-tests.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
1
types/sprintf/tslint.json
Normal file
1
types/sprintf/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user