diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-03-10 04:30:38 +1100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-09 12:30:38 -0500 |
commit | 034e2cc02829c9244b32232074c7a48af827a2fb (patch) | |
tree | bade01606a1ee076c1f753ce99c97ddb1e4edf30 /js/os.ts | |
parent | 8c7a12d1b258f0ef5ab27f49c424331d43e8d97f (diff) |
Migrate from tslint to eslint for linting (#1905)
Diffstat (limited to 'js/os.ts')
-rw-r--r-- | js/os.ts | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -97,6 +97,17 @@ export function fetchModuleMetaData( }; } +function setEnv(key: string, value: string): void { + const builder = flatbuffers.createBuilder(); + const _key = builder.createString(key); + const _value = builder.createString(value); + msg.SetEnv.startSetEnv(builder); + msg.SetEnv.addKey(builder, _key); + msg.SetEnv.addValue(builder, _value); + const inner = msg.SetEnv.endSetEnv(builder); + sendSync(builder, msg.Any.SetEnv, inner); +} + function createEnv(inner: msg.EnvironRes): { [index: string]: string } { const env: { [index: string]: string } = {}; @@ -113,17 +124,6 @@ function createEnv(inner: msg.EnvironRes): { [index: string]: string } { }); } -function setEnv(key: string, value: string): void { - const builder = flatbuffers.createBuilder(); - const _key = builder.createString(key); - const _value = builder.createString(value); - msg.SetEnv.startSetEnv(builder); - msg.SetEnv.addKey(builder, _key); - msg.SetEnv.addValue(builder, _value); - const inner = msg.SetEnv.endSetEnv(builder); - sendSync(builder, msg.Any.SetEnv, inner); -} - /** 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 |