@pilotlab/lux-attributes
Version:
A luxurious user experience framework, developed by your friends at Pilot.
27 lines (26 loc) • 1.06 kB
TypeScript
import { INode } from '@pilotlab/lux-nodes';
import { IPromise } from '@pilotlab/lux-result';
import { AttributeChangeActions, DataType } from '../attributeEnums';
import IAttributeChangeOptions from './iAttributeChangeOptions';
import IAttributeSetReturn from './iAttributeSetReturn';
import IAttributeFactory from './iAttributeFactory';
import IAttributes from './iAttributes';
export interface IAttribute extends INode {
create: IAttributeFactory;
value: any;
valueTarget: any;
valuePrevious: any;
dataType: DataType;
readonly attributes: IAttributes;
isEmpty: boolean;
omit: (value: any) => boolean;
validate: (value: any) => any;
copy: IAttribute;
animationKey: string;
set(value: any, changeOptions?: IAttributeChangeOptions): IPromise<IAttributeSetReturn>;
interrupt(): void;
doChanged(changeAction: AttributeChangeActions): void;
toObject(isSaveDataTypes?: boolean, appendToObject?: any, isForceInclude?: boolean): any;
toJson(isSaveDataTypes?: boolean): string;
}
export default IAttribute;