Add type definitions for graphql-type-json package

This commit is contained in:
Pavel Ivanov 2017-05-12 19:38:19 +03:00
parent e251c14388
commit 2dddf787b6
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import {GraphQLObjectType, GraphQLInputObjectType} from "graphql";
import * as GraphQLJSON from "graphql-type-json";
const TestType = new GraphQLObjectType({
name: "TestType",
fields: {
test: {
type: GraphQLJSON
}
}
});
const TestInputType = new GraphQLInputObjectType({
name: "TestInputType",
fields: {
test: {
type: GraphQLJSON
}
}
});

8
types/graphql-type-json/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for graphql-type-json 0.1
// Project: https://github.com/taion/graphql-type-json#readme
// Definitions by: Pavel Ivanov <https://github.com/schfkt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import {GraphQLScalarType} from "graphql";
declare const GraphQLJSON: GraphQLScalarType;
export = GraphQLJSON;

View File

@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"graphql-type-json-tests.ts"
]
}

View File

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