Provide vanilla TS types for getting fine types
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.5k
- Forks
- 341
- Merge medio
- 14 min
- PR fusionados (30 d)
- 8
Descripción
Types are not well provided and provided a lot of Vue types correlated, not just plain type for each component.
On usage of VTooltip in a reusable tooltip component (which will fall-through props), I would like to use VTooltip types as extensions of the custom component to get all props available.
I didn't get a proper way to get them without Vue types correlated
Here the types I have when importing from `'floating-vue/dist/index.d.ts'`
Popper's types
```ts
const VTooltipType: () => DefineComponent<{
theme: {
type: StringConstructor;
required: true;
};
targetNodes: {
type: FunctionConstructor;
required: true;
};
referenceNode: {
type: FunctionConstructor;
default: any;
};
popperNode: {
type: FunctionConstructor;
required: true;
};
shown: {
type: BooleanConstructor;
default: boolean;
};
showGroup: {
type: StringConstructor;
default: any;
};
ariaId: {
default: any;
};
disabled: {
type: BooleanConstructor;
default: (props: any) => any;
};
positioningDisabled: {
type: BooleanConstructor;
default: (props: any) => any;
};
placement: {
...;
};
... 29 more ...;
noAutoFocus: {
...;
};
}, ... 10 more ..., {
...;
}>
import VTooltipType
```
What it could be nice to export in types.ts in root all components vanilla types.
```ts
interface VCommonPopper {
placement: Placement;
// common types for all FV components
}
interface VTooltip extends VCommonPopper {
// specific types for VTooltip
}
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.