[sprintf] enable strict null checks and linting

This commit is contained in:
Dimitri Benin
2017-08-28 09:39:14 +02:00
parent b84df2925f
commit c13fe968dc
4 changed files with 12 additions and 12 deletions

View File

@@ -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;

View File

@@ -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]);

View File

@@ -6,7 +6,7 @@
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
@@ -19,4 +19,4 @@
"index.d.ts",
"sprintf-tests.ts"
]
}
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }