Add typing for graphql-bigint (#40041)

This commit is contained in:
Prain 2019-11-06 05:11:33 +08:00 committed by Nathan Shively-Sanders
parent 2e7765f18a
commit f7d76b4bd1
5 changed files with 55 additions and 0 deletions

View File

@ -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',
}
}
});

11
types/graphql-bigint/index.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
// Type definitions for graphql-bigint 1.0
// Project: https://github.com/stems/graphql-bigint#readme
// Definitions by: proudrain <https://github.com/proudrain>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import { GraphQLScalarType } from 'graphql';
declare const GraphQLBigInt: GraphQLScalarType;
export = GraphQLBigInt;

View File

@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"graphql": "^14.5.3"
}
}

View File

@ -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"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }