-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add rtype interface for initialFeatures to Readme. #25
Comments
I think I have the above signatures correct, they feel a bit odd to me though. I think they feel odd because the I wonder if we should make the signatures and implementation more intuitive with something like const initialFeatures = [{
name: 'comments',
enabled: false,
dependencies: []
},{
name: 'user-ratings',
enabled: false,
dependencies: ['comments']
}]; interface Feature {
name: String,
enabled?: false,
dependencies?: [...featureName: String]
}
const initialFeatures = [ ...Feature] |
@ericelliott @thoragio thoughts? |
I think the second way is clearer, and it also addresses my array or object question by using an array to hold the list of features, which is more intuitive IMO. |
@thoragio cool thanks, I think I might make a pr that changes the implementation to this |
[Fixes #25] Change Feature interface
For #16.
I am unsure how to describe initialFeatures in rtype, so I am experimenting here.
The text was updated successfully, but these errors were encountered: