Credits
Acknowledgments for projects that influenced Anzen’s types and APIs.
StandardSchemaDictionary
Thanks to @t3-oss/env-core for the implementation path behind StandardSchemaDictionary — the dictionary-of-Standard Schema fields pattern Anzen uses for things like segments, search params, and form data.
export type StandardSchemaDictionary<
Input = Record<string, unknown>,
Output extends Record<keyof Input, unknown> = Input,
> =
K in keyof Input-?: StandardSchemaV1<InputKOutputK
}
export namespace StandardSchemaDictionary
export type InferInput<T extends StandardSchemaDictionary> =
K in keyof T: StandardSchemaV1.InferInput<TK
export type InferOutput<T extends StandardSchemaDictionary> =
K in keyof T: StandardSchemaV1.InferOutput<TK
}Their prior work in packages/core/src/standard.ts informed how that type is modeled in the library. 🙏🏻
Last updated on