Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

server.ts

17 lines698 Bytes

1import { z } from "zod";
2import { keybindingRuleSchema, resolvedKeybindingsConfigSchema } from "./keybindings";
3​
4export const serverConfigSchema = z.object({
5 cwd: z.string().min(1),
6 keybindings: resolvedKeybindingsConfigSchema.default([]),
7});
8​
9export const serverUpsertKeybindingInputSchema = keybindingRuleSchema;
10​
11export const serverUpsertKeybindingResultSchema = z.object({
12 keybindings: resolvedKeybindingsConfigSchema.default([]),
13});
14​
15export type ServerConfig = z.infer<typeof serverConfigSchema>;
16export type ServerUpsertKeybindingInput = z.infer<typeof serverUpsertKeybindingInputSchema>;
17export type ServerUpsertKeybindingResult = z.infer<typeof serverUpsertKeybindingResultSchema>;