Repository: cypress-io/cypress
File: cli/types/cypress.d.ts (TypeScript)

Code before:
  interface CommandFnsWithSubject<S> {
    [name: string]: (this: Mocha.Context, prevSubject: S, ...args: any) => any
  }
  interface CommandOriginalFn<T extends keyof ChainableMethods> extends CallableFunction {
    (...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]>
  }
  interface CommandOriginalFnWithSubject<T extends keyof ChainableMethods, S> extends CallableFunction {
    (prevSubject: S, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]>
  }
  interface CommandFnWithOriginalFn<T extends keyof Chainable> {
    (this: Mocha.Context, originalFn: CommandOriginalFn<T>, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
  }
  interface CommandFnWithOriginalFnAndSubject<T extends keyof Chainable, S> {
    (this: Mocha.Context, originalFn: CommandOriginalFnWithSubject<T, S>, prevSubject: S, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
  }
  interface QueryFn<T extends keyof ChainableMethods> {
    (this: Command, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
  }
  interface QueryFnWithOriginalFn<T extends keyof Chainable> {
    (this: Command, originalFn: QueryFn<T>, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
  }
  interface ObjectLike {
    [key: string]: any
  }
  interface PromptOptions {
    excludeFromAI?: Record<string, string | number>
  }
  interface Auth {
    username: string
    password: string
  }

  interface RemoteState {
    auth?: Auth
    domainName: string
    strategy: 'file' | 'http'
    origin: string
    fileServer: string | null
    props: Record<string, any> | null
  }

  interface Backend {
    (task: 'net', eventName: string, frame: any): Promise<void>
  }

  type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'edge' | string

  type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string

  type BrowserFamily = 'chromium' | 'firefox' | 'webkit'


Review comment (suggestion):
Thinking about this again, let's just keep it simple for now:
```suggestion
    excludeFromAI?: Record<string, string>
```

Code after:
  interface CommandFnsWithSubject<S> {
    [name: string]: (this: Mocha.Context, prevSubject: S, ...args: any) => any
  }
  interface CommandOriginalFn<T extends keyof ChainableMethods> extends CallableFunction {
    (...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]>
  }
  interface CommandOriginalFnWithSubject<T extends keyof ChainableMethods, S> extends CallableFunction {
    (prevSubject: S, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]>
  }
  interface CommandFnWithOriginalFn<T extends keyof Chainable> {
    (this: Mocha.Context, originalFn: CommandOriginalFn<T>, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
  }
  interface CommandFnWithOriginalFnAndSubject<T extends keyof Chainable, S> {
    (this: Mocha.Context, originalFn: CommandOriginalFnWithSubject<T, S>, prevSubject: S, ...args: Parameters<ChainableMethods[T]>): ReturnType<ChainableMethods[T]> | void
  }
  interface QueryFn<T extends keyof ChainableMethods> {
    (this: Command, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
  }
  interface QueryFnWithOriginalFn<T extends keyof Chainable> {
    (this: Command, originalFn: QueryFn<T>, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
  }
  interface ObjectLike {
    [key: string]: any
  }
  interface PromptOptions {
    excludeFromAI?: Record<string, string>
  }
  interface Auth {
    username: string
    password: string
  }

  interface RemoteState {
    auth?: Auth
    domainName: string
    strategy: 'file' | 'http'
    origin: string
    fileServer: string | null
    props: Record<string, any> | null
  }

  interface Backend {
    (task: 'net', eventName: string, frame: any): Promise<void>
  }

  type BrowserName = 'electron' | 'chrome' | 'chromium' | 'firefox' | 'edge' | string

  type BrowserChannel = 'stable' | 'canary' | 'beta' | 'dev' | 'nightly' | string

  type BrowserFamily = 'chromium' | 'firefox' | 'webkit'