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

Support default properties #41

Open
agubler opened this issue Jul 30, 2018 · 0 comments
Open

Support default properties #41

agubler opened this issue Jul 30, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@agubler
Copy link
Member

agubler commented Jul 30, 2018

@agubler commented on Wed Jul 26 2017

Enhancement

It could be useful for a widget author to be able to specify default properties that the consumer properties are mixed over ensuring that the this.properties type guard reflects the defaulted properties so that they are not assumed to be possibly undefined.


@pottedmeat commented on Thu Aug 17 2017

This could be helpful for the dgrid editing functionality where there is a set of properties that should be used across all instances - things like length, style, etc. - but each row has its own value.


@agubler commented on Fri Aug 18 2017

@pottedmeat unfortunately it's very difficult to provide the mechanism and support all the typings effectively at the moment.


@pottedmeat commented on Fri Aug 18 2017

That's fine, I was just outlining a use case.


@agubler commented on Fri Aug 18 2017

Of course, I think there are multiple use cases for default properties one of which is dgrid. Just wanted to let you know where I had got with trying to implement the feature... it led me down a rabbit hole of typings that I couldn't get quite right unfortunately.


@kitsonk commented on Tue Aug 29 2017

This seems to be related: microsoft/TypeScript#16173

There appears to still be some challenges, though it seems like the problem space is better understood. We should think about it and try to make sure we have sufficient issues on TypeScript to help solve the problem (or support already existing ones).

@agubler agubler added the enhancement New feature or request label Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant