class.d.ts 536 B

12345
  1. export declare function getClass(elem: Element): string;
  2. export declare function hasClass(elem: Element | null, selector: string | null): boolean;
  3. export declare function addClass(elem: Element | null, selector: ((cls: string) => string) | string | null): void;
  4. export declare function removeClass(elem: Element | null, selector?: ((cls: string) => string) | string | null): void;
  5. export declare function toggleClass(elem: Element | null, selector: ((cls: string, state?: boolean) => string) | string | null, stateVal?: boolean): void;