import { LDMLKeyboard } from "@keymanapp/developer-utils"; /** * Verifies that value is an item in the enumeration. */ export declare function isValidEnumValue(enu: T, value: string): boolean; /** * Returns unique LKKeys only, preserving later ones * in case of conflict. (i.e. later overrides) * @param keys list of keys to consider. (mutated) * @returns Array of unique keys. Order is not specified. */ export declare function calculateUniqueKeys(keys?: LDMLKeyboard.LKKey[]): LDMLKeyboard.LKKey[]; /** Convert an array of keys to a hash */ export declare function hashKeys(keys?: LDMLKeyboard.LKKey[]): Map; export declare function hashFlicks(flicks?: LDMLKeyboard.LKFlick[]): Map; /** * @param layersList list of layers elements, from `keyboard?.layers` * @returns set of key IDs */ export declare function allUsedKeyIdsInLayers(layersList?: LDMLKeyboard.LKLayers[]): Set; /** * Extract all of the key ids that this key refers to, not counting flicks * @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key. */ export declare function allUsedKeyIdsInKey(key: LDMLKeyboard.LKKey): Map; export declare function allUsedKeyIdsInFlick(flick?: LDMLKeyboard.LKFlick): Set; /** * Helper function for validating child elements. Written for the convenience of message passing functions. * * @param values array of values to check * @param onDuplicate callback with array of duplicate values, deduped * @param allowed optional set of valid values * @param onInvalid callback with array of invalid values, deduped * @returns true if all OK */ export declare function verifyValidAndUnique(values: string[], onDuplicate: (duplicates: string[]) => void, allowed?: Set, onInvalid?: (invalids: string[]) => void): boolean; /** * Determine modifier from layer info * @param layer layer obj * @returns modifier array */ export declare function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer): number[]; /** * @param modifier modifier sequence such as undefined, "none", "shift altR" etc * @returns true if valid */ export declare function validModifier(modifier?: string): boolean; //# sourceMappingURL=util.d.ts.map