From 762ba1f5811e2f40ad2d50d7685453a670f54b07 Mon Sep 17 00:00:00 2001 From: Devis Lucato Date: Tue, 1 Oct 2024 16:39:24 -0700 Subject: [PATCH] Fix typos and update README to link to .NET repo --- README.md | 2 +- typescript/src/ts/program.ts | 2 +- typescript/src/zod/validate.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc743c2d..4513aa59 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can also work with TypeChat from source for: * [Python](./python/README.md) * [TypeScript](./typescript/README.md) -* [C#/.NET](./dotnet/README.md) +* [C#/.NET](https://github.com/microsoft/TypeChat.net) To see TypeChat in action, we recommend exploring the [TypeChat example projects](./typescript/examples). You can try them on your local machine or in a GitHub Codespace. diff --git a/typescript/src/ts/program.ts b/typescript/src/ts/program.ts index 47c5343c..0621ed40 100644 --- a/typescript/src/ts/program.ts +++ b/typescript/src/ts/program.ts @@ -39,7 +39,7 @@ export type Program = { } /** - * A function call specifices a function name and a list of argument expressions. Arguments may contain + * A function call specifies a function name and a list of argument expressions. Arguments may contain * nested function calls and result references. */ export type FunctionCall = { diff --git a/typescript/src/zod/validate.ts b/typescript/src/zod/validate.ts index b9ad3160..4f4cfa26 100644 --- a/typescript/src/zod/validate.ts +++ b/typescript/src/zod/validate.ts @@ -51,7 +51,7 @@ const enum TypePrecedence { Object = 2 } -function getTypePrecendece(type: z.ZodType): TypePrecedence { +function getTypePrecedence(type: z.ZodType): TypePrecedence { switch (getTypeKind(type)) { case z.ZodFirstPartyTypeKind.ZodEnum: case z.ZodFirstPartyTypeKind.ZodUnion: @@ -121,7 +121,7 @@ export function getZodSchemaAsTypeScript(schema: Record): str append(name); } else { - const parenthesize = getTypePrecendece(type) < minPrecedence; + const parenthesize = getTypePrecedence(type) < minPrecedence; if (parenthesize) append("("); appendTypeDefinition(type); if (parenthesize) append(")");