Skip to content

Conversation

@jelly
Copy link
Member

@jelly jelly commented Apr 25, 2025

This seems to be promising except we can't generalize the creation of the Channel class...

         const channel = new Channel<ReadReturnType<T>>({ ...global_options, ...options, payload: 'fsread1', binary: this.#binary });

So that is slightly uncool, but maybe there is some magical way?

the error:

not ok 10 /static-code/test-typescript
# src/path.ts(53,75): error TS2345: Argument of type '{ payload: string; binary: boolean; max_read_size?: number; path: string; command?: never; channel?: never; host?: string; superuser?: "try" | "require"; }' is not assignable to parameter of type 'ChannelOpenOptions<T extends true ? Uint8Array<ArrayBufferLike> : string>'.
#   Type '{ payload: string; binary: boolean; max_read_size?: number; path: string; command?: never; channel?: never; host?: string; superuser?: "try" | "require"; }' is not assignable to type 'ChannelOptions<T extends true ? Uint8Array<ArrayBufferLike> : string>'.

@jelly jelly added the no-test label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant