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

Type definition for 'header' slot missing in TabPanel component #1943

Closed
TBruegg opened this issue Jan 4, 2022 · 0 comments
Closed

Type definition for 'header' slot missing in TabPanel component #1943

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

Comments

@TBruegg
Copy link

TBruegg commented Jan 4, 2022

I'm submitting a ...

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
Provided sandbox template is not working, since the issue refers to the compile procedure

Current behavior
Linting a PrimeVue application containing TabPanel component header templates such as

<TabView>
  <TabPanel>
    <template #header>
    </template>
  </TabPanel>
</TabView>

using vue-tsc causes TS2339 errors:
error TS2339: Property 'header' does not exist on type '{ default: unknown; }'

The reason for this is a missing type definition for the header slot within the interface TabPanelSlots located in TabPanel.d.ts.

Expected behavior
The code above as equivalent to the header template example in the PrimeVue documentation at https://www.primefaces.org/primevue/showcase/#/tabview and should pass the type checking.

Minimal reproduction of the problem with instructions

  1. Run npm install vue-tsc in your project
  2. Add the code snippet aboveto your application
  3. Add a lint script to the scripts section of your package.json and set its value to vue-tsc --noEmit
  4. Run npm run lint

What is the motivation / use case for changing the behavior?
The type definitions are incomplete and do not reflect the expectations derived from the documentation.

Please tell us about your environment:
WSL2, VS Code, Vite@2.7.10,vue-tsc@0.30.2

  • Vue version: 3.2.26

  • PrimeVue version: 3.10.0

  • Browser: not affected since this is a CLI-only issue

@tugcekucukoglu tugcekucukoglu self-assigned this Jan 6, 2022
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 6, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.10.1 milestone Jan 6, 2022
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