/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ /** * Mark a function as a decorator. */ export declare function Decorator(decorate: T): T; /** * A function that may act as a tc39 decorator. */ export type Decorator = Decorator.Class | Decorator.Property; export declare namespace Decorator { /** * Determine if a function is marked as a decorator. */ function is(fn: Function): fn is Decorator; interface Class any = abstract new (...args: any) => any> { (target: T, context: ClassDecoratorContext): T | void; } interface ClassMethod any = (this: This, ...args: any) => any> { (target: T, context: ClassMethodDecoratorContext): T | void; } interface ClassGetter void> { (target: T, context: ClassGetterDecoratorContext): T | void; } interface ClassSetter Value> { (target: T, context: ClassSetterDecoratorContext): T | void; } interface ClassField { (target: undefined, context: ClassFieldDecoratorContext): ((initialValue: Value) => Value) | void; } type ClassAccessor = { (target: ClassAccessorDecoratorTarget, context: ClassAccessorDecoratorContext): ClassAccessorDecoratorResult<{}, unknown>; }; type Property = ClassGetter | ClassSetter | ClassField | ClassAccessor; type PropertyContext = ClassGetterDecoratorContext | ClassSetterDecoratorContext | ClassFieldDecoratorContext | ClassAccessorDecoratorContext; interface ClassCollector { (target: NewableFunction, context: ClassDecoratorContext): void; } interface MethodCollector { (target: CallableFunction, context: ClassMethodDecoratorContext): void; } interface PropertyCollector { (target: CallableFunction | undefined, context: PropertyContext): void; } interface Collector { (target: NewableFunction | CallableFunction | undefined, context: DecoratorContext): void; } } //# sourceMappingURL=Decorator.d.ts.map