import type { GenericId, Infer } from "convex/values"; import { expectTypeOf, test } from "vitest"; import type { ContextOptions, StorageOptions } from "./client/types.js"; import { vContextOptions, vMessageDoc, vStorageOptions } from "./validators.js"; import type { Doc } from "./component/_generated/dataModel.js"; expectTypeOf>().toExtend(); expectTypeOf().toExtend>(); expectTypeOf>().toExtend(); expectTypeOf().toExtend>(); type MessageBasedOnSchema = IdsToStrings< Omit, "files" | "stepId" | "parentMessageId"> >; expectTypeOf>().toEqualTypeOf(); expectTypeOf().toEqualTypeOf>(); test("noop", () => {}); type IdsToStrings = T extends GenericId ? string : T extends (infer U)[] ? IdsToStrings[] : T extends ArrayBuffer ? ArrayBuffer : T extends object ? { [K in keyof T]: IdsToStrings } : T;