new BaseListState<BrandCriteria, Brand>()
This is working and I add
export type BrandListState = BaseListState<BrandCriteria, Brand>;
then
new BrandListState()
This is not allowed. Any way to fix this problem?
new BaseListState<BrandCriteria, Brand>()
This is working and I add
export type BrandListState = BaseListState<BrandCriteria, Brand>;
then
new BrandListState()
This is not allowed. Any way to fix this problem?
You're using a Type Alias (see doco here) which doesn't have constructor, so it can't be created with new
. You need to create class for this
class BrandListState extends BaseListState<BrandCriteria, Brand> {}
© 2022 - 2024 — McMap. All rights reserved.
new
it, you need to have a constructor, too. Have a look at the error 'classes' in the RxJS codebase. They have both a type and a ctor: github.com/ReactiveX/rxjs/blob/… – Kimberlykimberlyn