DefinitelyTyped/types/graphql-depth-limit/index.d.ts
eritikass 842899eee2 Add types for graphql-depth-limit (#25568)
* add types for graphql-depth-limit

* improve type declaration

* remove "strict-export-declare-modifiers" rule disable
2018-05-08 07:39:09 -07:00

15 lines
545 B
TypeScript

// Type definitions for graphql-depth-limit 1.1
// Project: https://github.com/stems/graphql-depth-limit#readme
// Definitions by: Siim Tiilen <https://github.com/eritikass>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
declare function depthLimit(depthLimit: number, options?: depthLimit.Options, callback?: (obj: any) => void): any;
export = depthLimit;
declare namespace depthLimit {
interface Options {
ignore: Array<string | RegExp | ((queryDepths: any[]) => boolean)>;
}
}