I am using cypress with typescript. I was looking at the ServerOptions type:
interface ServerOptions {
delay: number
method: HttpMethod
status: number
headers: object
response: any
onRequest(...args: any[]): void
onResponse(...args: any[]): void
onAbort(...args: any[]): void
enable: boolean
force404: boolean
urlMatchingOptions: object
whitelist(xhr: Request): void
onAnyRequest(route: RouteOptions, proxy: any): void
onAnyResponse(route: RouteOptions, proxy: any): void
onAnyAbort(route: RouteOptions, proxy: any): void
}
More specifically:
whitelist(xhr: Request): void
Is this type correct? I would expect this type to be:
whitelist(xhr: XMLHttpRequest): void
The xhr passed to the callback certainly behaves like an XMLHttpRequest.
I am using cypress with typescript. I was looking at the ServerOptions type:
More specifically:
Is this type correct? I would expect this type to be:
The xhr passed to the callback certainly behaves like an XMLHttpRequest.