Add preparation for TypeScript 5.3 and Stage 3 decorators.

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

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.

Summary ID
Add preparation for Stage 3 decorators.
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.
9795845569d173d8ac4ec78a91e0ab1b52c4fd4c
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (166959c)