Why does mocking an instance of a class require defining protected and private properties?

前端 未结 0 1486
野的像风
野的像风 2021-01-02 10:43

Example

class A {
    private foo: string;
    protected bar: number;
    public when: Date;
}

// TypeScript rejects t         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题