You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LoadStatus is a TS enumeration, and Feature is a fairly complex TypeScript interface which comes from a automated api-type-generator (i.e. I don't want to have to copy it or modify it). When I do what I thought was the simple translation:
class FeatureStore {
@enumeration(LoadStatus) status
@array(@frozen(Feature)) features
}
I get an error that "Feature is used as a type when a value is expected." I assume that it's because Feature is supposed to be annotated with decorators just like FeatureStore is?
The text was updated successfully, but these errors were encountered:
Ah, Is Feature not MST type? In this situation you should not pass it as arg for frozen. mst-decorators has very basic TS defs for now. All improvements are welcome. For now you can only do @array(frozen()) features
We're evaluating using this library for a large project and I'm having some trouble getting started. My existing model is fairly simple:
LoadStatus is a TS enumeration, and Feature is a fairly complex TypeScript interface which comes from a automated api-type-generator (i.e. I don't want to have to copy it or modify it). When I do what I thought was the simple translation:
I get an error that "Feature is used as a type when a value is expected." I assume that it's because Feature is supposed to be annotated with decorators just like FeatureStore is?
The text was updated successfully, but these errors were encountered: