Skip to content

Commit

Permalink
Added @internal, cleaned up type-only imports
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Jul 29, 2024
1 parent 46bc36d commit 90200ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/backends/port/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { File } from '../../file.js';
import { Async, FileSystem, type FileSystemMetadata } from '../../filesystem.js';
import { Stats, type FileType } from '../../stats.js';
import { InMemory } from '../memory.js';
import { type Backend, type FilesystemOf } from '../backend.js';
import type { Backend, FilesystemOf } from '../backend.js';
import * as RPC from './rpc.js';
import { type MountConfiguration, resolveMountConfig } from '../../config.js';

Expand Down Expand Up @@ -224,8 +224,14 @@ let nextFd = 0;

const descriptors: Map<number, File> = new Map();

/**
* @internal
*/
export type FileOrFSRequest = FSRequest | FileRequest;

/**
* @internal
*/
export async function handleRequest(port: RPC.Port, fs: FileSystem, request: FileOrFSRequest): Promise<void> {
if (!RPC.isMessage(request)) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/backends/port/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Errno, ErrnoError, type ErrnoErrorJSON } from '../../error.js';
import { type Backend, type FilesystemOf } from '../backend.js';
import type { Backend, FilesystemOf } from '../backend.js';
import { handleRequest, PortFile, type PortFS } from './fs.js';
import { type FileOrFSRequest } from './fs.js';
import type { FileOrFSRequest } from './fs.js';

type _MessageEvent<T = any> = T | { data: T };

Expand Down

0 comments on commit 90200ed

Please sign in to comment.