You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moving to finalized decorators and getting a TS complaint about @override.
Using Typescript 5.3.3, Mobx 6.12 with "experimentalDecorators":false.
Unable to resolve signature of method decorator when called as an expression.
No overload matches this call.
Overload 1 of 2, '(target: Object, propertyKey: string | symbol): void', gave the following error.
Argument of type 'ClassGetterDecoratorContext<Sub, number> & { name: "val"; private: false; static: false; }' is not assignable to parameter of type 'string | symbol'.
Overload 2 of 2, '(value: any, context: ClassMethodDecoratorContext<any, any>): any', gave the following error.
Argument of type 'ClassGetterDecoratorContext<Sub, number> & { name: "val"; private: false; static: false; }' is not assignable to parameter of type 'ClassMethodDecoratorContext<any, any>'.
Types of property 'kind' are incompatible.
Type '"getter"' is not assignable to type '"method"'.ts(1241)
override's type seems to include ClassMethodDecorator though not ClassGetterDecorator but I haven't found anything in docs about no longer using @override for subclass getters, so I'm not sure if this typing is intentional and if so what preferred approach is for handling subclass overrides sans makeObservable.
Don't believe so — IIRC I tabled the project's switch to finalized decorators until this and other decorator related issues in the pipeline got ironed out. Haven't circled back yet.
Moving to finalized decorators and getting a TS complaint about
@override
.Using Typescript 5.3.3, Mobx 6.12 with
"experimentalDecorators":false
.override
's type seems to includeClassMethodDecorator
though notClassGetterDecorator
but I haven't found anything in docs about no longer using@override
for subclass getters, so I'm not sure if this typing is intentional and if so what preferred approach is for handling subclass overrides sansmakeObservable
.Copyable Code:
The text was updated successfully, but these errors were encountered: