Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed May 25, 2021
1 parent 30d7d15 commit fceb8bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils.ts
Expand Up @@ -601,8 +601,9 @@ export function graphql15InterfaceType<T extends GraphQLInterfaceType>(
return type as T & { getInterfaces(): GraphQLInterfaceType[] }
}

// A function that is correctly typed to get arround a TypeScript issue.
// See https://github.com/microsoft/TypeScript/issues/17002
/**
* A specially typed version of `Array.isArray` to work around [this issue](https://github.com/microsoft/TypeScript/issues/17002).
*/
export function isArray<T>(
arg: T | {}
): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[] {
Expand Down

0 comments on commit fceb8bb

Please sign in to comment.