From d2ff8e17ea83e5e4fd31d78a2128e2b463e20ba9 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Wed, 24 Jul 2019 21:05:52 +0100 Subject: [PATCH] Adding @types/clear (#37102) * WIP updating oracledb typings to 3.1.2 * WIP * SODA WIP * .d.ts done. Needs tests writing * Finished * Added pool stats methods. Fixed bug with BindParameter being string or number * Making _enableStats optional * Allow parameters to be nulled * Capitalise namespace * Update contribution URL * Revert "Update contribution URL" This reverts commit f329d293dceaf44832ae3424753c1ccb98378df2. * Update contribution URL * Change poolAlias to string. SODA not in preview. Add BindParameters interface * getRows should not return void * Added pino-std-serializers * Adding @types/clear --- types/clear/clear-tests.ts | 21 +++++++++++++++++++++ types/clear/index.d.ts | 23 +++++++++++++++++++++++ types/clear/tsconfig.json | 24 ++++++++++++++++++++++++ types/clear/tslint.json | 1 + 4 files changed, 69 insertions(+) create mode 100644 types/clear/clear-tests.ts create mode 100644 types/clear/index.d.ts create mode 100644 types/clear/tsconfig.json create mode 100644 types/clear/tslint.json diff --git a/types/clear/clear-tests.ts b/types/clear/clear-tests.ts new file mode 100644 index 0000000000..55da4fc890 --- /dev/null +++ b/types/clear/clear-tests.ts @@ -0,0 +1,21 @@ +// ------------------------------- NODE MODULES ------------------------------- + +import clear from 'clear'; + +// ------------------------------ CUSTOM MODULES ------------------------------ + +// -------------------------------- VARIABLES --------------------------------- + +// ----------------------------- FILE DEFINITION ------------------------------ + +clear(); + +clear({}); + +clear({ + fullClear: true, +}); + +clear({ + fullClear: false, +}); diff --git a/types/clear/index.d.ts b/types/clear/index.d.ts new file mode 100644 index 0000000000..b28b14d2ba --- /dev/null +++ b/types/clear/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for clear 0.1 +// Project: https://github.com/bahamas10/node-clear#readme +// Definitions by: Connor Fitzgerald +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +interface ClearOptions { + /** + * Setting this to false will prevent this module from clearing the screen. + * This will not remove anything from the screen, but instead move your cursor + * to position 0,0. Much like printing a \r instead of a \n to reset the current line of output. + * + * @default true + */ + fullClear?: boolean; +} + +/** + * Clear the terminal screen if possible. + */ +declare function clear(opts?: ClearOptions): void; + +export = clear; diff --git a/types/clear/tsconfig.json b/types/clear/tsconfig.json new file mode 100644 index 0000000000..a505869884 --- /dev/null +++ b/types/clear/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "clear-tests.ts" + ] +} diff --git a/types/clear/tslint.json b/types/clear/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/clear/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }