[generated] sandpack files from: codesandbox-client

This commit is contained in:
Will Chen
2025-04-12 00:09:50 -07:00
parent 4b641a3303
commit a618ec3f56
442 changed files with 393342 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
/// <reference types="node" />
import { FileFlag } from "../core/file_flag";
import { BFSCallback, FileSystem, FileSystemOptions, SynchronousFileSystem } from "../core/file_system";
import Stats from '../core/node_fs_stats';
export interface Socket {
emit: (data: any, cb: (answer: any) => void) => void;
dispose: () => void;
}
export interface WebsocketFSOptions {
socket: Socket;
}
export default class WebsocketFS extends SynchronousFileSystem implements FileSystem {
static readonly Name = "WebsocketFS";
static readonly Options: FileSystemOptions;
static Create(options: WebsocketFSOptions, cb: BFSCallback<WebsocketFS>): void;
static isAvailable(): boolean;
private socket;
constructor(options: WebsocketFSOptions);
getName(): string;
isReadOnly(): boolean;
supportsProps(): boolean;
supportsSynch(): boolean;
readFile(fname: string, encoding: string | null, flag: FileFlag, cb: BFSCallback<string | Buffer>): void;
stat(p: string, isLstat: boolean | null, cb: BFSCallback<Stats>): void;
}