From 9c873fda2aa8e9c3716ca5dd9c29b0a9ae6d961f Mon Sep 17 00:00:00 2001 From: jonambas Date: Wed, 10 Apr 2024 20:14:12 -0400 Subject: [PATCH] fix(codegen): fix missing initializer error --- src/__tests__/codegen.test.ts | 2 +- src/codegen.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/codegen.test.ts b/src/__tests__/codegen.test.ts index 8e1401a..0f51436 100644 --- a/src/__tests__/codegen.test.ts +++ b/src/__tests__/codegen.test.ts @@ -42,7 +42,7 @@ describe('codegen', () => { 'foo.200': {"base":"#000","lg":"#111"}; 'bar.100': 'red'; 'bar.200': 'blue';}; - export const ct: (alias: T) => PluginCtMapType[T];", + export declare const ct: (alias: T) => PluginCtMapType[T];", "file": "ct.d.ts", }, ], diff --git a/src/codegen.ts b/src/codegen.ts index 014ba82..e3c418a 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -35,7 +35,7 @@ export const codegen = ( const ctDtsFile: ArtifactContent = { file: `ct.d.${dtsExt}`, code: `type PluginCtMapType = {${serializeMapTypes(map)}}; - export const ct: (alias: T) => PluginCtMapType[T];`, + export declare const ct: (alias: T) => PluginCtMapType[T];`, }; cssFn.files.push(ctFile, ctDtsFile);