interface Window {
  define: Function;
  appConfig: {
    THEME_TIME?: number;
    LOCAL: boolean;
    ASSETS_URL: string;
    SERVICE_URL: string;
    ICON: string;
    REFRESH_TIME: number;
    LOGO: string;
    REFRESH_TIME: number;
    LOGIN_LOGO: string;
    LOGIN_URL: string;
    LOGOUT_URL: string;
    HOME_URL: string;
    MARKET_URL: string;
    USER_ENV: 'local' | 'uic' | 'op';
    USER_CENTER_URL: string;
    IS_ENV_DETECTION: boolean;
    UPLOAD_MODE: 'LOCAL' | 'OSS' | 'FS';
  };
  __easvy__event__: any;
  component: {
    [x: string]: any;
  };
  interactionControllers: any;

  clipboardData: any;
  console: any;
  jQuery: any;
}

declare const BASENAME: string;
declare const VERSION: string;
declare const define: any;

declare module '*.css';
declare module '*.less';
declare module '*.scss';
declare module '*.svg';
declare module '*.png';
declare module '*.jpg';
declare module '*.webm';
declare module '*.ico';

type TimingFunction = 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out';

declare namespace Mousetrap {
  interface MousetrapStatic {
    (el?: Element): MousetrapInstance;
    new (el?: Element): MousetrapInstance;
    addKeycodes(keycodes: { [key: number]: string }): void;
    stopCallback: (e: ExtendedKeyboardEvent, element: Element, combo: string) => boolean;
    bind(
      keys: string | string[],
      callback: (e: ExtendedKeyboardEvent, combo: string) => any,
      action?: string,
    ): MousetrapInstance;
    unbind(keys: string | string[], action?: (e: ExtendedKeyboardEvent) => void): MousetrapInstance;
    trigger(keys: string, action?: string): MousetrapInstance;
    reset(): MousetrapInstance;
    bindGlobal(
      keyArray: string | string[],
      callback: (e: ExtendedKeyboardEvent, combo: string) => any,
      action?: string,
    ): void;
    pause(): void;
    unpause(): void;
  }
}

declare module '*.json' {
  const value: any;
  export default value;
}

declare namespace d3 {
  export function nest(): any;
}
