diff --git a/graphql-date/graphql-date-tests.ts b/graphql-date/graphql-date-tests.ts new file mode 100644 index 0000000000..07542c8c0d --- /dev/null +++ b/graphql-date/graphql-date-tests.ts @@ -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', + } + } +}); diff --git a/graphql-date/index.d.ts b/graphql-date/index.d.ts new file mode 100644 index 0000000000..20cd74d61e --- /dev/null +++ b/graphql-date/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for graphql-date 1.0 +// Project: https://github.com/tjmehta/graphql-date +// Definitions by: Eric Naeseth +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import {GraphQLScalarType} from 'graphql'; + +declare const date: GraphQLScalarType; + +export = date; diff --git a/graphql-date/tsconfig.json b/graphql-date/tsconfig.json new file mode 100644 index 0000000000..211b33bf22 --- /dev/null +++ b/graphql-date/tsconfig.json @@ -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" + ] +} diff --git a/graphql-date/tslint.json b/graphql-date/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/graphql-date/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }