Skip to content

Commit

Permalink
fixup! Remove catch/finally/then from devServerConfig code completion
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboy committed Jan 28, 2022
1 parent 86be32a commit 8d396c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

// The new Awaited type added in 4.5 would work here, but we seem to need to
// support older versions of Typescript
type AwaitedLike<T> = T extends PromiseLike<infer U> ? AwaitedLike<U> : T
type AwaitedLike<T> = T extends PromiseLike<infer U>
? { 0: AwaitedLike<U>; 1: U }[U extends PromiseLike<any> ? 0 : 1]
: T

declare namespace Cypress {
type FileContents = string | any[] | object
Expand Down

0 comments on commit 8d396c4

Please sign in to comment.