Add preparation for TypeScript 5.3 and Stage 3 decorators.

Review Request #13557 — Created Feb. 19, 2024 and submitted — Latest diff uploaded

Information

Spina
master

Reviewers

Stage 3 decorators are currently standard in TypeScript and Babel. We're
not able to use it in Spina just yet, but in preparation, we're now
adding the context argument to our decorator function to signal
support for Stage 3 decorators. It's made optional, allowing legacy
decorators to continue to work.

The decorators are also typed with <This, TBase>, which allows us to
return a proper type mixing in the decorated class.

There are also some documentation fixes around decorator arguments.

Unit tests pass with legacy decorators.

Commits

Files

    Loading...