(input: T | DefaultExport<T>)
| 24 | } |
| 25 | |
| 26 | export function maybeUnwrapDefaultExport<T>(input: T | DefaultExport<T>): T { |
| 27 | // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not |
| 28 | // subject to property renaming, so we reference it with bracket access. |
| 29 | return isWrappedDefaultExport(input) ? input['default'] : input; |
| 30 | } |
| 31 | |
| 32 | function isWrappedDefaultExport<T>(value: T | DefaultExport<T>): value is DefaultExport<T> { |
| 33 | // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be |
no test coverage detected
searching dependent graphs…