refactor: type-safe module imports / requires (#41192)
This commit is contained in:
parent
3ec04fd449
commit
dac29f9949
4 changed files with 11 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
import * as util from 'util';
|
||||
import type * as stream from 'stream';
|
||||
|
||||
const timers = require('timers');
|
||||
import timers = require('timers');
|
||||
|
||||
type AnyFn = (...args: any[]) => any
|
||||
|
||||
|
@ -62,7 +63,7 @@ if (process.type === 'browser' ||
|
|||
|
||||
if (process.platform === 'win32') {
|
||||
// Always returns EOF for stdin stream.
|
||||
const { Readable } = require('stream');
|
||||
const { Readable } = require('stream') as typeof stream;
|
||||
const stdin = new Readable();
|
||||
stdin.push(null);
|
||||
Object.defineProperty(process, 'stdin', {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue