(
type: 'Getter' | 'Value',
name: string,
value: unknown,
occurrence: 'added' | 'removed' | null,
)
| 366 | } |
| 367 | |
| 368 | export function getPropLabel( |
| 369 | type: 'Getter' | 'Value', |
| 370 | name: string, |
| 371 | value: unknown, |
| 372 | occurrence: 'added' | 'removed' | null, |
| 373 | ): any[] { |
| 374 | // stayed |
| 375 | if (occurrence === null) |
| 376 | return [`${inGray(type)} ${name} ${inGray('=')}${getValueSpecifier(value)}`, value] |
| 377 | // added |
| 378 | if (occurrence === 'added') |
| 379 | return [ |
| 380 | `${inGray(type)} ${name}%c new ${inGray('=')}${getValueSpecifier(value)}`, |
| 381 | STYLES.new, |
| 382 | value, |
| 383 | ] |
| 384 | // removed |
| 385 | return [`${inGray(type)} %c${name}`, 'text-decoration: line-through; color: #888'] |
| 386 | } |
no test coverage detected
searching dependent graphs…