(key: string | null = null, language: string | Record<string, unknown[]> | null = null, value: unknown[] | null = null)
| 1338 | static label (key: string, language: Record<string, unknown[]>): void; |
| 1339 | static label (key: string, language: string, value: unknown[]): void; |
| 1340 | static label (key: string | null = null, language: string | Record<string, unknown[]> | null = null, value: unknown[] | null = null): unknown { |
| 1341 | if (typeof language === 'string' && value !== null && key !== null) { |
| 1342 | if (typeof this._script[language] !== 'object') { |
| 1343 | this._script[language] = {}; |
| 1344 | } |
| 1345 | (this._script[language] as Record<string, unknown>)[key] = value; |
| 1346 | } else if (typeof language === 'object' && language !== null && value === null && key !== null) { |
| 1347 | if (typeof this._script[key] !== 'object') { |
| 1348 | this._script[key] = []; |
| 1349 | } |
| 1350 | this._script[key] = language; |
| 1351 | } else if (typeof language === 'string' && value === null && key !== null) { |
| 1352 | return (this._script[language] as Record<string, unknown>)?.[key]; |
| 1353 | } else if (key !== null) { |
| 1354 | return this.script (key); |
| 1355 | } else { |
| 1356 | const labelState = this.state ('label') as string; |
| 1357 | return this.script (labelState); |
| 1358 | } |
| 1359 | } |
| 1360 | |
| 1361 | static fn (name: string, { apply = () => true, revert = () => true }: { apply?: () => boolean; revert?: () => boolean } = {}): { apply: () => boolean; revert: () => boolean } { |
| 1362 | if (typeof apply === 'function' && typeof revert === 'function') { |
no test coverage detected