diff --git a/types/graphql-bigint/graphql-bigint-tests.ts b/types/graphql-bigint/graphql-bigint-tests.ts new file mode 100644 index 0000000000..c864409113 --- /dev/null +++ b/types/graphql-bigint/graphql-bigint-tests.ts @@ -0,0 +1,13 @@ +import { GraphQLObjectType } from 'graphql'; +import * as GraphQLBigInt from 'graphql-bigint'; + +const fooType = new GraphQLObjectType({ + name: 'Foo', + description: 'Some foo type', + fields: { + created: { + type: GraphQLBigInt, + description: 'BigInt foo was created', + } + } +}); diff --git a/types/graphql-bigint/index.d.ts b/types/graphql-bigint/index.d.ts new file mode 100644 index 0000000000..d77fc7420e --- /dev/null +++ b/types/graphql-bigint/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for graphql-bigint 1.0 +// Project: https://github.com/stems/graphql-bigint#readme +// Definitions by: proudrain +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import { GraphQLScalarType } from 'graphql'; + +declare const GraphQLBigInt: GraphQLScalarType; + +export = GraphQLBigInt; diff --git a/types/graphql-bigint/package.json b/types/graphql-bigint/package.json new file mode 100644 index 0000000000..1e9e930126 --- /dev/null +++ b/types/graphql-bigint/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "graphql": "^14.5.3" + } +} diff --git a/types/graphql-bigint/tsconfig.json b/types/graphql-bigint/tsconfig.json new file mode 100644 index 0000000000..473bff804a --- /dev/null +++ b/types/graphql-bigint/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "esnext.asynciterable" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "graphql-bigint-tests.ts" + ] +} diff --git a/types/graphql-bigint/tslint.json b/types/graphql-bigint/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/graphql-bigint/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }