* @target web * @partial
(s: unknown, key: string)
| 56 | * @partial |
| 57 | */ |
| 58 | public static getValue(s: unknown, key: string): unknown { |
| 59 | if (s instanceof Map) { |
| 60 | return (s as Map<string, unknown>).get(key); |
| 61 | } |
| 62 | |
| 63 | if (typeof s === 'object') { |
| 64 | return (s as any)[key]; |
| 65 | } |
| 66 | return null; |
| 67 | } |
| 68 | } |
no test coverage detected