我正在通过TypeScript向现有的JavaScript库添加JSDoc的类型信息。我有一个构造函数,它可以根据给定的参数的值设置一个属性: * Settings you can use to configure an instance of an {@link ExampleClass= true;}
我本来希望TypeScript外部将property的声明解释为类似于
我正在尝试如何定义其他可选属性。= false;
使用上面的TypeScript引发一个错误:
Property '[OptionalProps]' in type 'EntityA' is not assignable tothe same property in base type 'BaseEntity'.基本上,我的BaseEntity具有可选属性</e