mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
[log-update] introduce typings (#18263)
This commit is contained in:
committed by
Wesley Wigham
parent
7ac090dcfc
commit
0fefe6de39
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// Type definitions for log-update 2.0
|
||||
// Project: https://github.com/sindresorhus/log-update#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node"/>
|
||||
|
||||
export = logUpdate;
|
||||
|
||||
declare function logUpdate(...text: string[]): void;
|
||||
|
||||
declare namespace logUpdate {
|
||||
function clear(): void;
|
||||
function done(): void;
|
||||
const stderr: typeof logUpdate;
|
||||
function create(stream: NodeJS.WritableStream): typeof logUpdate;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import logUpdate = require('log-update');
|
||||
|
||||
logUpdate(`
|
||||
♥♥
|
||||
unicorns
|
||||
♥♥
|
||||
`);
|
||||
|
||||
logUpdate.clear();
|
||||
logUpdate.done();
|
||||
|
||||
logUpdate.stderr('oh', 'my', 'oh', 'my');
|
||||
logUpdate.stderr.clear();
|
||||
logUpdate.stderr.done();
|
||||
|
||||
const logStdOut = logUpdate.create(process.stdout);
|
||||
logStdOut('oh', 'my', 'oh', 'my');
|
||||
logStdOut.clear();
|
||||
logStdOut.done();
|
||||
@@ -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",
|
||||
"log-update-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user