Add type definitions for graphql-date (#13818)

* Add type definitions for graphql-date

* Add missing semicolons
This commit is contained in:
Eric Naeseth
2017-01-06 17:21:49 -08:00
committed by Andy
parent 8a8b46f0ce
commit 8a27ebe4d2
4 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import {GraphQLObjectType} from 'graphql';
import * as GraphQLDate from 'graphql-date';
const fooType = new GraphQLObjectType({
name: 'Foo',
description: 'Some foo type',
fields: {
created: {
type: GraphQLDate,
description: 'Date foo was created',
}
}
});

10
graphql-date/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for graphql-date 1.0
// Project: https://github.com/tjmehta/graphql-date
// Definitions by: Eric Naeseth <https://github.com/enaeseth>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import {GraphQLScalarType} from 'graphql';
declare const date: GraphQLScalarType;
export = date;

View File

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

1
graphql-date/tslint.json Normal file
View File

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