client.d.ts 529 B

123456789101112131415
  1. export declare function updateStyle(id: string, content: string): void;
  2. interface HotCallback {
  3. deps: string | string[];
  4. fn: (modules: object | object[]) => void;
  5. }
  6. export declare const createHotContext: (id: string) => {
  7. readonly data: any;
  8. accept(callback?: HotCallback['fn']): void;
  9. acceptDeps(deps: HotCallback['deps'], callback?: HotCallback['fn']): void;
  10. dispose(cb: (data: any) => void): void;
  11. decline(): void;
  12. invalidate(): void;
  13. on(event: string, cb: () => void): void;
  14. };
  15. export {};