diff --git a/src/__tests__/codegen.test.ts b/src/__tests__/codegen.test.ts index 8e1401a..8e07add 100644 --- a/src/__tests__/codegen.test.ts +++ b/src/__tests__/codegen.test.ts @@ -37,12 +37,13 @@ describe('codegen', () => { "file": "ct.mjs", }, { - "code": "type PluginCtMapType = { + "code": "/* eslint-disable */ + type PluginCtMapType = { 'foo.100': '#fff'; '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..c974e46 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -34,8 +34,8 @@ export const codegen = ( const ctDtsFile: ArtifactContent = { file: `ct.d.${dtsExt}`, - code: `type PluginCtMapType = {${serializeMapTypes(map)}}; - export const ct: (alias: T) => PluginCtMapType[T];`, + code: `/* eslint-disable */\ntype PluginCtMapType = {${serializeMapTypes(map)}}; + export declare const ct: (alias: T) => PluginCtMapType[T];`, }; cssFn.files.push(ctFile, ctDtsFile);