Skip to content

Commit

Permalink
fix: capitalize component takes precedence over camelize component
Browse files Browse the repository at this point in the history
close #2010
  • Loading branch information
johnsoncodehk committed Oct 15, 2022
1 parent 1ef24b0 commit 7464536
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -167,9 +167,10 @@ export function generate(
const var_componentVar = capitalize(camelize(tagName.replace(/:/g, '-')));

const names = new Set([
tagName,
camelize(tagName),
// order is important: https://github.com/johnsoncodehk/volar/issues/2010
capitalize(camelize(tagName)),
camelize(tagName),
tagName,
]);

codeGen.push(`let ${var_componentVar}!: import('./__VLS_types.js').GetComponents<typeof __VLS_components, ${[...names].map(name => `'${name}'`).join(', ')}>;\n`);
Expand Down

0 comments on commit 7464536

Please sign in to comment.