@ui5/task-adaptation
Version:
Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment
26 lines (25 loc) • 1.21 kB
TypeScript
import DiffCase from "./diffCase.js";
export default class InterchangableCase implements DiffCase {
accept(target: any[], i: number, name: string): void;
/**
* When default language source is already compared, it contains diff, e.g.
* { __old: value, __new: wert 1 }, if target annotation in other language
* has other value, it should also reflect the value, be { __old: value,
* __new: wert 2 }, not { __old: value, __new: wert 1 }. So we remove the
* diff completely from value and let it be compared again. Other language
* source will be empty anyway.
*/
private getSourceValue;
/**
* If the array doesn't have any other annotations to take the values from,
* we just don't do it and include the annotations from other language as it
* is. E.g. we include Label but there are no Heading or QuickInfo to take
* values from. So we just don't do it.
* @param target where to put the missing item
* @param property node name
* @returns true if there are some annotations to take the values from.
*/
canAccept(target: any[], property: string): boolean;
private interchangableTerms;
private findByPriority;
}