如何在汽车应用中定义联合类型元数据
我正在使用 automapper with pojo策略 我必须为此定义元数据,但是“邮政编码”字段具有联合类型。
PojosMetadataMap.create<FrontendData>("FrontendData", {
address: String,
postalCode: null | number,
latitude: Number,
longitude: Number,
});
不幸的是语法null邮政编码:null |数字不起作用。我已经看文档了,但是与此策略一起使用联合类型并没有什么可以 - htttps:htttps:// automapperts.netlify.app/docs/strategies/pojos/ 。 如果您解决了类似的问题,我会感谢您的帮助
I'm using automapper with Pojo strategy
I have to define metadata for it, but "postalCode" field have a union type.
PojosMetadataMap.create<FrontendData>("FrontendData", {
address: String,
postalCode: null | number,
latitude: Number,
longitude: Number,
});
Unfortunately the syntax null postalCode: null | number does not work. I have looking in documentation but there was nothing about using union types with this strategy - https://automapperts.netlify.app/docs/strategies/pojos/.
If you have solved a similar issue, I'd be thankful for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在GitHub问题中问了同样的问题,并从图书馆的开发人员那里得到了答案:
您可以找到GitHub问题在这里
I asked the same question in github issue and got an answer from the developer of the library:
You can find github issue here