如何向自定义类型添加函数?

时间:2021-01-28 02:17:04

标签: typescript

我正在使用 io-ts 检查类型。

export type UserType = t.TypeOf<typeof User>

如何向该类型添加函数,以便我可以执行类似操作

const user : UserType {...}
user.getName()

0 个答案:

没有答案
相关问题