From 2547f0296fc77357b9c11f3bdc7414a68243e775 Mon Sep 17 00:00:00 2001 From: jingweicai <285025525@qq.com> Date: Thu, 24 Jan 2019 09:29:18 +0800 Subject: [PATCH] fix: set env,key for string and value for string (#1567) --- js/os.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/os.ts b/js/os.ts index 8932873ccc..bbb4d0569b 100644 --- a/js/os.ts +++ b/js/os.ts @@ -95,8 +95,8 @@ function createEnv(inner: msg.EnvironRes): { [index: string]: string } { } return new Proxy(env, { - set(obj, prop: string, value: string | number) { - setEnv(prop, value.toString()); + set(obj, prop: string, value: string) { + setEnv(prop, value); return Reflect.set(obj, prop, value); } }); @@ -115,7 +115,7 @@ function setEnv(key: string, value: string): void { /** Returns a snapshot of the environment variables at invocation. Mutating a * property in the object will set that variable in the environment for - * the process. The environment object will only accept `string`s or `number`s + * the process. The environment object will only accept `string`s * as values. * * import { env } from "deno";