(obj: T)
| 50 | * or undefined if not found. |
| 51 | */ |
| 52 | export function getInstrumented<T>(obj: T): T | undefined { |
| 53 | try { |
| 54 | if (isWeakMapKey(obj)) { |
| 55 | return getInstrumentedMap().get(obj) as T | undefined; |
| 56 | } |
| 57 | |
| 58 | return undefined; |
| 59 | } catch { |
| 60 | return undefined; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Returns the already-instrumented version of `original` if one exists, |
no test coverage detected