Skip to content

Commit

Permalink
fix(types): style/lang types should use declare const (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Dec 28, 2023
1 parent 784ff06 commit bd956d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/build-languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function buildLanguages() {
if (/-/.test(name)) moduleName = toCamelCase(name);

base += `export { default as ${moduleName} } from './${name}';\n`;
baseTs += `export const ${moduleName}: LanguageType<"${name}">;\n`;
baseTs += `export declare const ${moduleName}: LanguageType<"${name}">;\n`;
lang.push({ name, moduleName });
markdown += `## ${name} (\`${moduleName}\`)
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function buildStyles() {
.join("");

const types = styles
.map((style) => `export const ${style.moduleName}: string;\n`)
.map((style) => `export declare const ${style.moduleName}: string;\n`)
.join("");
const base = styles
.map(
Expand Down

0 comments on commit bd956d6

Please sign in to comment.