Comments (2)
For problem 1, when I change DefineComponent
from @primevue/core
to vue
, the problem fixed.
import type { DefineComponent } from '@primevue/core';
declare const Button: DefineComponent<ButtonProps, ButtonSlots, ButtonEmits>;
to
import type { DefineComponent } from 'vue';
declare const Button: DefineComponent<ButtonProps, ButtonSlots, ButtonEmits>;
from primevue.
For problem 1, when I change
DefineComponent
from@primevue/core
tovue
, the problem fixed.import type { DefineComponent } from '@primevue/core'; declare const Button: DefineComponent<ButtonProps, ButtonSlots, ButtonEmits>;to
import type { DefineComponent } from 'vue'; declare const Button: DefineComponent<ButtonProps, ButtonSlots, ButtonEmits>;
Do this you fix only for props. Slots and emits doesn't work anyway.
I found what vue DefineComponent typescript type uses first generic (which is ButtonProps in this case) for another type guards. So, i think fix this issue is replace in @primevue/core type guard DefineComponent
:
from
primevue/packages/core/src/index.d.ts
Line 17 in bda04be
to:
export type DefineComponent<P = {}, S = {}, E = {}, M = {}> = _DefineComponent<P, {}, {}, {}, M & MethodOptions, {}, {}, E & ObjectEmitsOptions, string, PublicProps, Readonly<ExtractPropTypes<P>>, ExtractDefaultPropTypes<P>, SlotsType<S>>;
It require types PublicProps, SlotsType, ExtractDefaultPropTypes, ExtractPropTypes
from vue bundle
But i think need to use defineComponent (from primevue team side) in vue files by vue's typescript guide: https://vuejs.org/guide/typescript/overview#definecomponent
from primevue.
Related Issues (20)
- StepList and StepPanels: Different type than of Stepper, Step and StepPanel
- Sidebar: In headless mode, the sidebar is not scrollable
- How can I append a DataTable filter overlay to any HTML element, excluding the default Protal value "body"? HOT 1
- Paginator: v4 page buttons still have PrimeVue classes in unstyled mode
- Lara theme type HOT 1
- DataTable: Frozen Column Breaks Frozen RowSpan Column
- Tiered Menu: First sub level doesn't open on hover but all other levels do
- Input Mask: Unable to enter characters in InputMask on Android Chrome HOT 1
- Button: size inconsistent
- Badge & Toast: help severity missing HOT 1
- DataView: dataKey prop should be same type as DataTable's dataKey prop
- ConfirmDialog and ConfirmPopup: Missing accept/reject labels
- DataView & DataTable: pass type of value prop into slotProps etc.
- DatePicker (Calendar): hidden date parts should always be set to 0
- DatePicker: can not typing same date using input
- Menubar v4: initial rendering without styles
- SELECT: hide clear button when options is empty in Dropdown
- How to pass slots through from Parent to Child Components with PrimeVue? HOT 2
- PrimeVue v4 ignores Nuxt configuration settings when building the project HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primevue.