boo = false; //TS2322: Type 'false' is not assignable to type 'moo'.: Type '{ sad: true; times: boolean; }' is not assignable to type 'meep'.hmmm = { sad: true }; // TS2322: Type '{ sad: true; }' is not
我有一个用例,其中我有一个泛型类,以及一个包含泛型类的多个成员的容器类。我想使用setViaFunction来设置容器类的成员,而不是依赖于它们的类型。但是,我得到以下错误:Argument of type 'string | boolean' is not assignable to parameter of type 'never'.GenericClass<T> { constructor(_value: T){