diff --git a/.changeset/tiny-ladybugs-hang.md b/.changeset/tiny-ladybugs-hang.md new file mode 100644 index 000000000..e41d2dcad --- /dev/null +++ b/.changeset/tiny-ladybugs-hang.md @@ -0,0 +1,5 @@ +--- +"@hey-api/openapi-ts": patch +--- + +fix: throw error when typescript is missing diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index b25c2016d..b52bd6b30 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -181,6 +181,10 @@ export async function createClient(userConfig: UserConfig): Promise { {} ); + if (!dependencies.typescript) { + throw new Error('🚫 dependency missing - TypeScript must be installed'); + } + const config = await initConfig(userConfig, dependencies); const openApi =