@rose karma Here's a shortened URL of your playground link! You can remove the full link from your message.
Preview:```ts
function fallback<
Method1Fn extends Function,
FallbackFn extends Method1Fn
(props: {fallback: FallbackFn}) {
return function (
target: any,
propertyKey: string,
descriptor: Omit<PropertyDescriptor, "value"> & {
value?: Method1Fn
}
) {
// implement fallback logic...
return descriptor
}
}
class MyClass1 {
// I expect a compilation error because FallbackFn does not extend Method1Fn
@fallback({
fallback: (props: {x: number}): number => {
return 0
},
}) // works! why??
static method1(pros: {}): number {
...```