Skip to content
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

IconField: Wrong casing in Typescript module declaration file (.d.ts) #5376

Closed
NikoGJ opened this issue Mar 4, 2024 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@NikoGJ
Copy link
Contributor

NikoGJ commented Mar 4, 2024

Describe the bug

The last PrimeVue versions introduced 2 new components IconField and InputIcon.
For Typescript, the InputIcon module augmentation in the GlobalComponents interface is declared correctly (PascalCase) but for IconField, it is declared in lowercase. Thus, intellisense proposes the lowercase writing when declaring components globally.
Was it intentional ?

IconField.d.ts

declare class IconField extends ClassComponent<IconFieldProps, IconFieldSlots, IconFieldEmits> {}

declare module '@vue/runtime-core' {
    interface GlobalComponents {
        iconfield: GlobalComponentConstructor<IconField>;
    }
}

export default IconField;

In comparison, the InputIcon component in InputIcon.d.ts

declare class InputIcon extends ClassComponent<InputIconProps, InputIconSlots, InputIconEmits> {}

declare module '@vue/runtime-core' {
    interface GlobalComponents {
        InputIcon: GlobalComponentConstructor<InputIcon>;
    }
}

export default InputIcon;

image

Reproducer

https://primevue.org/

PrimeVue version

3.49.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

declare class IconField extends ClassComponent<IconFieldProps, IconFieldSlots, IconFieldEmits> {}

declare module '@vue/runtime-core' {
    interface GlobalComponents {
        IconField: GlobalComponentConstructor<IconField>;
    }
}

export default IconField;
@NikoGJ NikoGJ added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 4, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.50.0 milestone Mar 4, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 4, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants