mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 03:16:35 +00:00
wip: desktop work
This commit is contained in:
parent
d03b79e61e
commit
fc115ea367
13 changed files with 854 additions and 297 deletions
|
|
@ -32,6 +32,9 @@ export namespace Tool {
|
|||
}>
|
||||
}
|
||||
|
||||
export type InferParameters<T extends Info> = T extends Info<infer P> ? z.infer<P> : never
|
||||
export type InferMetadata<T extends Info> = T extends Info<any, infer M> ? M : never
|
||||
|
||||
export function define<Parameters extends z.ZodType, Result extends Metadata>(
|
||||
id: string,
|
||||
init: Info<Parameters, Result>["init"] | Awaited<ReturnType<Info<Parameters, Result>["init"]>>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue