index.d.ts 794 B

123456789101112131415161718192021222324
  1. import '../build/polyfills/polyfill-module';
  2. import { MittEmitter } from '../shared/lib/mitt';
  3. import type Router from '../shared/lib/router/router';
  4. import { NEXT_DATA } from '../shared/lib/utils';
  5. declare global {
  6. interface Window {
  7. __NEXT_HYDRATED?: boolean;
  8. __NEXT_HYDRATED_CB?: () => void;
  9. __NEXT_PRELOADREADY?: (ids?: (string | number)[]) => void;
  10. __NEXT_DATA__: NEXT_DATA;
  11. __NEXT_P: any[];
  12. }
  13. }
  14. export declare const version: string | undefined;
  15. export declare let router: Router;
  16. export declare const emitter: MittEmitter<string>;
  17. export declare function initialize(opts?: {
  18. webpackHMR?: any;
  19. }): Promise<{
  20. assetPrefix: string;
  21. }>;
  22. export declare function hydrate(opts?: {
  23. beforeRender?: () => Promise<void>;
  24. }): Promise<void>;