Skip to content

Commit

Permalink
Made setImmediate and mkdirpSync hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Mar 20, 2024
1 parent 7277ee3 commit c1292a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FileSystem } from './filesystem.js';
import { ApiError, ErrorCode } from './ApiError.js';
import * as path from './emulation/path.js';
import { dirname } from './emulation/path.js';
import { Cred } from './cred.js';
import type { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'node:util';

Expand All @@ -17,11 +17,11 @@ declare const globalThis: {

/**
* Synchronous recursive makedir.
* @internal
* @hidden
*/
export function mkdirpSync(p: string, mode: number, cred: Cred, fs: FileSystem): void {
if (!fs.existsSync(p, cred)) {
mkdirpSync(path.dirname(p), mode, cred, fs);
mkdirpSync(dirname(p), mode, cred, fs);
fs.mkdirSync(p, mode, cred);
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ export function wait(ms: number): Promise<void> {
}

/**
* @internal
* @hidden
*/
export const setImmediate = typeof globalThis.setImmediate == 'function' ? globalThis.setImmediate : cb => setTimeout(cb, 0);

Expand Down

0 comments on commit c1292a9

Please sign in to comment.