Skip to content

Commit 6835cf1

Browse files
committed
remove todo
1 parent e6e501b commit 6835cf1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/node/process.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:js_interop';
6-
import 'dart:js_util';
6+
import 'dart:js_interop_unsafe';
77

88
/// Provides information about, and control over, the current Node.js process.
99
/// Wraps https://nodejs.org/api/process.html
@@ -17,8 +17,9 @@ extension type Process(JSObject obj) {
1717
external JSObject get _env;
1818

1919
/// Read the environment variable [variable].
20-
// TODO(devoncarew): move away from using dart:js_util `getProperty`.
21-
String? env(String variable) => getProperty<String?>(_env, variable);
20+
String? env(String variable) {
21+
return _env.getProperty<JSString?>(variable.toJS)?.toDart;
22+
}
2223

2324
external int exitCode;
2425
}

0 commit comments

Comments
 (0)