Skip to content

fix: parse declaration error #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2022
Merged

fix: parse declaration error #450

merged 1 commit into from
Jul 6, 2022

Conversation

ycs77
Copy link
Contributor

@ycs77 ycs77 commented Jul 5, 2022

unplugin-vue-components version: 0.21.0

If using the component like <IMdi:diceD12>, expected generated components.d.ts file is:

declare module '@vue/runtime-core' {
  export interface GlobalComponents {
    ...
    IFaSolidDiceFive: typeof import('~icons/fa-solid/dice-five')['default']
    IHeroiconsOutlineMenuAlt2: typeof import('~icons/heroicons-outline/menu-alt2')['default']
    'IMdi:diceD12': typeof import('~icons/mdi/dice-d12')['default']
    IMdiLightAlarm: typeof import('~icons/mdi-light/alarm')['default']
    ...
  }
}

But the component name has : char, now the actual generated components.d.ts file is:

declare module '@vue/runtime-core' {
  export interface GlobalComponents {
    ...
    IFaSolidDiceFive: typeof import('~icons/fa-solid/dice-five')['default']
    IHeroiconsOutlineMenuAlt2: typeof import('~icons/heroicons-outline/menu-alt2')['default']
    IMdi: diceD12': typeof import('~icons/mdi/dice-d12')['default']
    'IMdi:diceD12': typeof import('~icons/mdi/dice-d12')['default']
    IMdiLightAlarm: typeof import('~icons/mdi-light/alarm')['default']
    ...
  }
}

This PR will resolve the bug.

@ycs77 ycs77 requested a review from antfu as a code owner July 5, 2022 17:24
@antfu antfu merged commit 16e9ada into unplugin:main Jul 6, 2022
@ycs77 ycs77 deleted the fix-parse-declaration-error branch July 6, 2022 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy