import { type Class, type Constructable } from '@aurelia/kernel'; import type { InterceptorFunc } from '@aurelia/runtime'; import { BindingMode, IComponentBindablePropDefinition } from '@aurelia/template-compiler'; type PropertyType = typeof Number | typeof String | typeof Boolean | typeof BigInt | { coercer: InterceptorFunc; } | Class; export type PartialBindableDefinition = Omit & { callback?: string; name?: string; set?: InterceptorFunc; type?: PropertyType; /** * When set to `false` and automatic type-coercion is enabled, `null` and `undefined` will be coerced into target type. * * @default true */ nullable?: boolean; }; /** * Decorator: Specifies a bindable property on a class property. * * @example * ```ts * class Foo { * ⁣@bindable bar: string; * } * ``` */ export declare function bindable(_: undefined, context: ClassFieldDecoratorContext): void; export declare function bindable(_: Function, context: ClassGetterDecoratorContext): void; /** * Decorator: Specifies custom behavior for a bindable property. * This can be either be a property decorator or a class decorator. * * @param config - The overrides */ export declare function bindable(config?: Omit): (target: unknown, context: ClassDecoratorContext | ClassFieldDecoratorContext | ClassGetterDecoratorContext) => void; /** * Decorator: Specifies a bindable property on a class. * * @param prop - The property name */ export declare function bindable(prop: string): (target: Constructable, context: ClassDecoratorContext) => void; export declare const Bindable: Readonly<{ name: string; keyFrom: (name: string) => string; from(...bindableLists: readonly (BindableDefinition | Record | true> | readonly (string | (PartialBindableDefinition & { name: string; }))[] | undefined)[]): Record; getAll(Type: Constructable): readonly BindableDefinition[]; /** @internal */ _add(bindable: BindableDefinition, Type: Constructable): void; }>; export declare class BindableDefinition { readonly attribute: string; readonly callback: string; readonly mode: BindingMode; readonly name: string; readonly set: InterceptorFunc; private constructor(); static toAttr(prop: string): string; static create(prop: string, def?: PartialBindableDefinition): BindableDefinition; } type CoercerFunction = (this: This, value: unknown) => InstanceType; export declare function coercer>(target: TCoercer, context: ClassMethodDecoratorContext): void; export {}; //# sourceMappingURL=bindable.d.ts.map