(idOrName: unknown, defaultValue: string)
| 553 | } |
| 554 | |
| 555 | export function convertOptionIdName(idOrName: unknown, defaultValue: string): string { |
| 556 | if (idOrName == null) { |
| 557 | return defaultValue; |
| 558 | } |
| 559 | return isString(idOrName) |
| 560 | ? idOrName |
| 561 | : (isNumber(idOrName) || isStringSafe(idOrName)) |
| 562 | ? idOrName + '' |
| 563 | : defaultValue; |
| 564 | } |
| 565 | |
| 566 | function warnInvalidateIdOrName(idOrName: unknown) { |
| 567 | if (__DEV__) { |
no test coverage detected
searching dependent graphs…