From 6360f474fb8cecaf4fe27e9184058b57da1df72a Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 28 Jun 2022 14:49:08 +0200 Subject: [PATCH] Fix Tailwind integration Typescript warning (#3732) * Make options optional * chore: add changeset Co-authored-by: Tony Sullivan --- .changeset/khaki-ligers-glow.md | 5 +++++ packages/integrations/tailwind/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/khaki-ligers-glow.md diff --git a/.changeset/khaki-ligers-glow.md b/.changeset/khaki-ligers-glow.md new file mode 100644 index 000000000..1022514da --- /dev/null +++ b/.changeset/khaki-ligers-glow.md @@ -0,0 +1,5 @@ +--- +'@astrojs/tailwind': patch +--- + +Marks the Tailwind integration config as optional to fix TypeScript validation warnings diff --git a/packages/integrations/tailwind/src/index.ts b/packages/integrations/tailwind/src/index.ts index 4051b93ee..9aaccce7d 100644 --- a/packages/integrations/tailwind/src/index.ts +++ b/packages/integrations/tailwind/src/index.ts @@ -50,7 +50,7 @@ type TailwindOptions = } | undefined; -export default function tailwindIntegration(options: TailwindOptions): AstroIntegration { +export default function tailwindIntegration(options?: TailwindOptions): AstroIntegration { const applyBaseStyles = options?.config?.applyBaseStyles ?? true; const customConfigPath = options?.config?.path; return {