Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Feb 14, 2024
1 parent 055e9c7 commit 3197973
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion src/emulation/callbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,11 @@ export function readlink(path: PathLike, callback: TwoArgCallback<string> & any)
export function readlink(path: PathLike, options: BufferEncodingOption, callback: TwoArgCallback<Uint8Array>): void;
export function readlink(path: PathLike, options: BaseEncodingOptions | string, callback: TwoArgCallback<string | Uint8Array>): void;
export function readlink(path: PathLike, options: BaseEncodingOptions | BufferEncoding, callback: TwoArgCallback<string>): void;
export function readlink(path: PathLike, options: BufferEncodingOption | BaseEncodingOptions | string | TwoArgCallback<string>, callback: TwoArgCallback<string> | TwoArgCallback<Uint8Array> = nop): void {
export function readlink(
path: PathLike,
options: BufferEncodingOption | BaseEncodingOptions | string | TwoArgCallback<string>,
callback: TwoArgCallback<string> | TwoArgCallback<Uint8Array> = nop
): void {
callback = typeof options == 'function' ? options : callback;
promises
.readlink(path)
Expand Down
2 changes: 1 addition & 1 deletion src/emulation/promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ export async function lutimes(path: PathLike, atime: number | Date, mtime: numbe
* @param path
* @param options
* @return resolved path
*
*
* Note: This *Can not* use doOp since doOp depends on it
*/
export async function realpath(path: PathLike, options?: BaseEncodingOptions): Promise<string> {
Expand Down
5 changes: 2 additions & 3 deletions src/emulation/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ export function initialize(mountMapping: MountMapping): void {

/**
* Types supports as path parameters.
*
*
* In the future, maybe support URL?
*/
export type PathLike = string;

/**
* @internal
*
*
* Converts any Buffer in T to Uint8Array
*/
export type BufferToUint8Array<T> = T extends Buffer
Expand All @@ -240,4 +240,3 @@ export type BufferToUint8Array<T> = T extends Buffer
: T extends object
? { [K in keyof T]: BufferToUint8Array<T[K]> }
: T;

0 comments on commit 3197973

Please sign in to comment.