[Feature]: export type definitions for the main component
See original GitHub issueDescription
Currently, the MasonryWall
isn’t typed when using Volar (since the library registering through global app components). While this doesn’t affect functionality, it’d be nice to have in-editor type support for props.
Solution
One way of having typed global components is through custom.d.ts file
:
import type { component } from '@yeger/vue-masonry-wall';
declare module 'vue' {
export interface GlobalComponents {
MasonryWall: typeof component;
}
}
export {};
Additional context
No response
Preferences
- I want to be assigned to and work on this issue myself
Issue Analytics
- State:
- Created a year ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Documentation - Modules - TypeScript
Exporting a declaration ... Any declaration (such as a variable, function, class, type alias, or interface) can be exported by adding the export...
Read more >Add Typescript type definitions for all components and services
We use this issue to keep track of the components and services that require Typescript type definitions. Components Accessibility EuiKeyboardAccessible ...
Read more >Building TypeScript definitions on demand - Leonardo Faria
The solution I am using the react-to-typescript-definitions package to create definitions from the compiled files. The tool can map most ...
Read more >Cannot re-export a type when using the --isolatedModules ...
index.ts is just re-exporting everything so we can have a singular entry point and can do something like import Component, { ComponentType } ......
Read more >export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also big thanks to @mahdiboomeri for informing me about the global components declaration!
@DerYeger no more error now thanks !! 🙏😊