Add types for windows-foreground-love (#40267)

This commit is contained in:
Tereza Tomcova 2019-11-12 00:00:11 +01:00 committed by Pranav Senthilnathan
parent 8e09215e25
commit a93bc045be
4 changed files with 34 additions and 0 deletions

View File

@ -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 <https://github.com/the-ress>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function allowSetForegroundWindow(pid?: number): boolean;

View File

@ -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"
]
}

View File

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

View File

@ -0,0 +1,4 @@
import * as wfl from "windows-foreground-love";
wfl.allowSetForegroundWindow(123); // $ExpectType boolean
wfl.allowSetForegroundWindow(); // $ExpectType boolean