export {};

declare global {
  /**
   * Promise 扩展
   */
  interface PromiseConstructor {
    withResolvers<T>(): {
      promise: Promise<T>;
      resolve: (value: T | PromiseLike<T>) => void;
      reject: (reason?: any) => void;
    };
  }

  interface Array<T> {
    at(index: number): T;
  }
}
