From 5ec307bea5da1c0c2e327be1c3f9051d54b6978b Mon Sep 17 00:00:00 2001 From: Mokshit06 <50412128+Mokshit06@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:26:50 +0530 Subject: [PATCH] chore: show error msg instead of unknown type --- packages/typewind/src/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/typewind/src/index.ts b/packages/typewind/src/index.ts index 68537a6..e628754 100644 --- a/packages/typewind/src/index.ts +++ b/packages/typewind/src/index.ts @@ -1 +1,6 @@ -export declare const tw: unknown; +declare const typewind: unique symbol; + +// make brand/opaque type so that typescript lsp shows error as TypewindError and not Message +type TypewindError = { [typewind]: T }; + +export declare const tw: TypewindError<"Typewind's types haven't been generated. Run `npx typewind generate` or follow the docs at https://typewind.vercel.app/docs/installation">;