UNPKG

@cds/core

Version:

Clarity Design System - common components, themes, and utilties

24 lines (23 loc) 953 B
export interface ClassDescriptor { kind: 'class'; elements: ClassElement[]; finisher?: <T>(classDef: Constructor<T>) => undefined | Constructor<T>; } export interface ClassElement { kind: 'field' | 'method'; key: PropertyKey; placement: 'static' | 'prototype' | 'own'; initializer?: any; extras?: ClassElement[]; finisher?: <T>(classDef: Constructor<T>) => undefined | Constructor<T>; descriptor?: PropertyDescriptor; } export declare type Constructor<T> = { new (...args: any[]): T; }; export declare const classStandardDecorator: (value: any, descriptor: ClassDescriptor, fn: (value: any, classDef: Constructor<HTMLElement>) => any) => { kind: "class"; elements: ClassElement[]; finisher(classDef: Constructor<HTMLElement>): void; }; export declare const classLegacyDecorator: (value: any, classDef: Constructor<HTMLElement>, fn: (value: any, classDef: Constructor<HTMLElement>) => any) => any;