()
| 7 | |
| 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 9 | function getInstrumentedMap(): WeakMap<any, any> { |
| 10 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 11 | const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> }; |
| 12 | if (!globalObj[GLOBAL_KEY]) { |
| 13 | globalObj[GLOBAL_KEY] = new WeakMap(); |
| 14 | } |
| 15 | return globalObj[GLOBAL_KEY]; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Check if a value can be used as a WeakMap key. |
no outgoing calls
no test coverage detected