The example from the docs:
import {memoizeDecorator} from 'memoize';
class Example {
index = 0
@memoizeDecorator()
counter() {
return ++this.index;
}
}
returns the following error in TypeScript 5:
Unable to resolve signature of method decorator when called as an expression.
The runtime will invoke the decorator with 2 arguments, but the decorator expects 3. ts(1241)
index.d.ts(109, 183): An argument for 'descriptor' was not provided.
The cause of this issue, I assume, is that the library only supports the stage 2 implementation of decorators. TypeScript 5 supports stage 3 decorator implementation without --experimentalDecorators
, see https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#decorators.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too