Add typings for graphql-iso-date (#23202)

* Create index.d.ts

* Create tsconfig.json

* Update index.d.ts

* add graphql-iso-date types

* fix tests

* add strict function types
This commit is contained in:
Jason Waldrip
2018-01-26 10:03:21 -07:00
committed by Andy
parent 00ae13ffe2
commit 56e3995300
4 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import { GraphQLDate, GraphQLTime, GraphQLDateTime } from "graphql-iso-date";
GraphQLDate.name;
GraphQLTime.name;
GraphQLDateTime.name;

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

@@ -0,0 +1,11 @@
// Type definitions for graphql-iso-date 3.3
// Project: https://github.com/excitement-engineer/graphql-iso-date
// Definitions by: Jason Waldrip <https://github.com/jwaldrip>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { GraphQLScalarType } from "graphql";
export const GraphQLDate: GraphQLScalarType;
export const GraphQLTime: GraphQLScalarType;
export const GraphQLDateTime: GraphQLScalarType;

View File

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

View File

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