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

Allowing type augmentation #678

Open
addlistener opened this issue Jul 17, 2024 · 2 comments
Open

Allowing type augmentation #678

addlistener opened this issue Jul 17, 2024 · 2 comments

Comments

@addlistener
Copy link

addlistener commented Jul 17, 2024

Is your feature request related to a problem? Please describe.
When using custom & info we'd like to supply our own typing. However they sits in a type alias instead of an interface so can cannot using type augmentation ( as state here https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces )

Describe the solution you'd like
Change type to interface for UserComponentConfig & NodeData & Node.

image
@addlistener addlistener changed the title Allowing type augmentation of Allowing type augmentation Jul 17, 2024
@prevwong
Copy link
Owner

Good suggestion, care to submit a PR?

@addlistener
Copy link
Author

Sure but not at the moment. Still in some projects and feeling out of stamina.

Something that can also be fixed is the lack of documentation of info.

And I gotta say the API of craft.js is minimal and of good taste. Enjoying every minute playing with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants