-
I need to make model with this options like interface in TS where properties can be optional. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@Sindr0me const ConditionalItems = types.array(types.model({
install_date_since: types.string,
campaign_like: types.string,
campaign_in: types.maybe(types.union(types.array, types.string)),
campaign_not_like: types.maybe(types.string),
adset_like: types.maybe(types.string),
adset_in: types.maybe(types.union(types.array, types.string)),
adset_not_like: types.maybe(types.string),
})); |
Beta Was this translation helpful? Give feedback.
-
That is the answer and possible way to do it |
Beta Was this translation helpful? Give feedback.
That is the answer and possible way to do it