diff --git a/types/ps-tree/index.d.ts b/types/ps-tree/index.d.ts index 7dad700315..a915c9f547 100644 --- a/types/ps-tree/index.d.ts +++ b/types/ps-tree/index.d.ts @@ -10,7 +10,7 @@ declare namespace ps_tree { PID: string; STAT: string; } - + const prototype: { }; } diff --git a/types/ps-tree/ps-tree-tests.ts b/types/ps-tree/ps-tree-tests.ts index 308900e6e2..9af8b9f53c 100644 --- a/types/ps-tree/ps-tree-tests.ts +++ b/types/ps-tree/ps-tree-tests.ts @@ -1,8 +1,9 @@ import * as ps_tree from "ps-tree"; -ps_tree(1, (error: Error, children: ps_tree.PS[]) => { +ps_tree(1, () => {}); // $ExpectType void +ps_tree(1, (error: Error, children: ReadonlyArray) => { children[0].COMMAND; // $ExpectType string children[0].PID; // $ExpectType string children[0].PPID; // $ExpectType string children[0].STAT; // $ExpectType string -}); // $ExpectType void +}); diff --git a/types/ps-tree/tsconfig.json b/types/ps-tree/tsconfig.json index b8a7b33b11..4f3bd8dcfc 100644 --- a/types/ps-tree/tsconfig.json +++ b/types/ps-tree/tsconfig.json @@ -6,6 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, + "strictFunctionTypes": true, "strictNullChecks": true, "baseUrl": "../", "typeRoots": [