From 90125566bbaed8b5c6e55ca8dbc432e3433fb73c Mon Sep 17 00:00:00 2001 From: Maximilien Mellen Date: Wed, 19 Feb 2020 21:36:18 +0100 Subject: Enable TS strict mode by default (#3899) Fixes #3324 Co-authored-by: Kitson Kelly --- std/node/os.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/node/os.ts') diff --git a/std/node/os.ts b/std/node/os.ts index e4a00c450..3bff03a69 100644 --- a/std/node/os.ts +++ b/std/node/os.ts @@ -123,7 +123,7 @@ export function getPriority(pid = 0): number { } /** Returns the string path of the current user's home directory. */ -export function homedir(): string { +export function homedir(): string | null { return Deno.dir("home"); } @@ -157,7 +157,7 @@ export function release(): string { /** Not yet implemented */ export function setPriority(pid: number, priority?: number): void { - /* The node API has the 'pid' as the first parameter and as optional. + /* The node API has the 'pid' as the first parameter and as optional. This makes for a problematic implementation in Typescript. */ if (priority === undefined) { priority = pid; -- cgit v1.2.3