-
Notifications
You must be signed in to change notification settings - Fork 8
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
Is it a better way to add framework-oriented dts files for better typescript support? #8
Comments
That's a good suggestion! |
@LoTwT For temporary, maybe you can declare types in your own repo. Here is an example that may helps: type CustomElement<T> = Partial<
T & { children: unknown } & import("react").DOMAttributes<T> &
import("react").HTMLAttributes<T> &
import("react").Attributes
>;
declare namespace JSX {
interface IntrinsicElements {
["dock-wrapper"]: CustomElement<import("dockbar").DockWrapper>;
["dock-item"]: CustomElement<import("dockbar").DockItem>;
}
} I will continue exploring viable solution and improving them in the README. |
You are right. Extra dependencies are verbose. |
I tried this fantastic dockbar in React and it's my first time to use Web Component in React.
issue
I need to add the following type definitions for better use and I still can't get the right props.
expectation
Is it a better way that the repo offers dts files?
Or it is just my turn to add them to my repo?
The text was updated successfully, but these errors were encountered: