From a93bc045be0111ef35f74fff5fce019a0cf5ca2d Mon Sep 17 00:00:00 2001 From: Tereza Tomcova Date: Tue, 12 Nov 2019 00:00:11 +0100 Subject: [PATCH] Add types for windows-foreground-love (#40267) --- types/windows-foreground-love/index.d.ts | 6 +++++ types/windows-foreground-love/tsconfig.json | 23 +++++++++++++++++++ types/windows-foreground-love/tslint.json | 1 + .../windows-foreground-love-tests.ts | 4 ++++ 4 files changed, 34 insertions(+) create mode 100644 types/windows-foreground-love/index.d.ts create mode 100644 types/windows-foreground-love/tsconfig.json create mode 100644 types/windows-foreground-love/tslint.json create mode 100644 types/windows-foreground-love/windows-foreground-love-tests.ts diff --git a/types/windows-foreground-love/index.d.ts b/types/windows-foreground-love/index.d.ts new file mode 100644 index 0000000000..dbe4f44834 --- /dev/null +++ b/types/windows-foreground-love/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for windows-foreground-love 0.3 +// Project: https://github.com/the-ress/node-windows-foreground-love#readme +// Definitions by: Tereza Tomcova +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function allowSetForegroundWindow(pid?: number): boolean; diff --git a/types/windows-foreground-love/tsconfig.json b/types/windows-foreground-love/tsconfig.json new file mode 100644 index 0000000000..166a80165b --- /dev/null +++ b/types/windows-foreground-love/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "windows-foreground-love-tests.ts" + ] +} diff --git a/types/windows-foreground-love/tslint.json b/types/windows-foreground-love/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/windows-foreground-love/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/windows-foreground-love/windows-foreground-love-tests.ts b/types/windows-foreground-love/windows-foreground-love-tests.ts new file mode 100644 index 0000000000..44b63b3a4d --- /dev/null +++ b/types/windows-foreground-love/windows-foreground-love-tests.ts @@ -0,0 +1,4 @@ +import * as wfl from "windows-foreground-love"; + +wfl.allowSetForegroundWindow(123); // $ExpectType boolean +wfl.allowSetForegroundWindow(); // $ExpectType boolean