(prototype: any, propName: string)
| 20 | } |
| 21 | |
| 22 | export function isUseI18NSetter(prototype: any, propName: string) { |
| 23 | const configure = prototype?.options?.configure; |
| 24 | if (Array.isArray(configure)) { |
| 25 | return configure.some(c => { |
| 26 | return c.name === propName && c?.setter?.type?.displayName === 'I18nSetter'; |
| 27 | }); |
| 28 | } |
| 29 | return false; |
| 30 | } |
| 31 | |
| 32 | export function convertToI18NObject(v: string | any, locale: string = 'zh-CN') { |
| 33 | if (isI18NObject(v)) return v; |
no test coverage detected
searching dependent graphs…