prevwong / craft.js

🚀 A React Framework for building extensible drag and drop page editors
https://craft.js.org
MIT License
7.63k stars 744 forks source link

Allowing type augmentation #678

Open addlistener opened 3 months ago

addlistener commented 3 months ago

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
prevwong commented 3 months ago

Good suggestion, care to submit a PR?

addlistener commented 3 months ago

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.