fix(decorators): Add Symbol.metadata polyfill and import it at entry to ensure decorator metadata is available
This commit is contained in:
6
ts/shim.ts
Normal file
6
ts/shim.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Polyfill for Symbol.metadata required by TC39 Stage 3 decorators.
|
||||
* Must be imported before any decorator code loads.
|
||||
* @see https://github.com/tc39/proposal-decorator-metadata
|
||||
*/
|
||||
(Symbol as any).metadata ??= Symbol.for('Symbol.metadata');
|
||||
Reference in New Issue
Block a user