首页 > 解决方案 > 使用强化类型,你可以在 TsInterface 上默认设置属性吗?

问题描述

我们使用属性,AutoExportMethodsTsInterface. 但我们必须记住将其添加到每个TsInterface. 我想知道我们是否有办法在 Reinforced Typings 的配置中默认将此设置为 true?

这类似于Is there a configuration option in Reinforced.Typings to TsIgnore all properties and methods unless they have a TsProperty attribute set using? , 但不是每个文件都忽略它,我们希望默认忽略所有文件。

标签: reinforced-typings

解决方案


您可以默认继承[TsInterface]属性和制作AutoExportMethods true。然后使用你自己的属性而不是内置的[TsInterface]


推荐阅读