export {}; declare global { interface SymbolConstructor { readonly metadata: unique symbol; } } /** * Give `ctor` its own `Symbol.metadata` slot, so metadata reads on a class that * has none of its own stop here instead of walking up to `Function.prototype`. * * The TC39 decorator-metadata proposal defines * `Function.prototype[Symbol.metadata]` as `null`, and core-js's * `esnext.function.metadata` polyfill installs it with a bare `{ value: null }` * descriptor — non-writable and non-configurable. On a page loading such a * polyfill (`agora-rtc-sdk-ng` bundles one) every inherited read yields `null` * rather than `undefined`, and every inherited write throws. Owning the slot * keeps both to the values the rest of the codebase is written against. * * Callers are the two metadata roots: `Schema` (subclasses inherit its slot) * and `registerType`, which every collection type is registered through. */ export declare function shadowMetadata(ctor: Function): void;