(msg: string)
| 1 | const hasWarned: Record<string, boolean> = {} |
| 2 | |
| 3 | export function warnOnce(msg: string): void { |
| 4 | const isNodeProd = |
| 5 | typeof process !== 'undefined' && process.env.NODE_ENV === 'production' |
| 6 | if (!isNodeProd && !__TEST__ && !hasWarned[msg]) { |
| 7 | hasWarned[msg] = true |
| 8 | warn(msg) |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | export function warn(msg: string): void { |
| 13 | console.warn( |
no test coverage detected