We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6e501b commit 6835cf1Copy full SHA for 6835cf1
lib/node/process.dart
@@ -3,7 +3,7 @@
3
// BSD-style license that can be found in the LICENSE file.
4
5
import 'dart:js_interop';
6
-import 'dart:js_util';
+import 'dart:js_interop_unsafe';
7
8
/// Provides information about, and control over, the current Node.js process.
9
/// Wraps https://nodejs.org/api/process.html
@@ -17,8 +17,9 @@ extension type Process(JSObject obj) {
17
external JSObject get _env;
18
19
/// 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);
+ String? env(String variable) {
+ return _env.getProperty<JSString?>(variable.toJS)?.toDart;
22
+ }
23
24
external int exitCode;
25
}
0 commit comments