mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Add type definitions for 'printf' (#14821)
* Add definitions for 'printf' * Add "lib" to tsconfig.json * Fix link
This commit is contained in:
committed by
Mohamed Hegazy
parent
a43da75444
commit
253d42273d
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// Type definitions for printf 0.2
|
||||
// Project: https://github.com/adaltas/node-printf
|
||||
// Definitions by: Aluísio Augusto Silva Gonçalves <https://github.com/AluisioASG>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
export = printf;
|
||||
declare function printf(format: string, ...args: any[]): string;
|
||||
declare function printf(writeStream: NodeJS.WritableStream, format: string, ...args: any[]): void;
|
||||
@@ -0,0 +1,9 @@
|
||||
import printf = require("printf");
|
||||
|
||||
printf('%c', 0x7f).charCodeAt(0);
|
||||
printf('%2$s: %1$O', {hello: 'Node'}, 'Test');
|
||||
printf('%(temperature)s %(crevace)ss', {
|
||||
temperature: 'Hot',
|
||||
crevace: 'Pocket',
|
||||
});
|
||||
printf(process.stdout, '%2$s: %1$O', {hello: 'Node'}, 'Test');
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"printf-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Reference in New Issue
Block a user