diff --git a/CHANGELOG.md b/CHANGELOG.md index e6471cffc..897e0770d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.4.5] - 2019-02-12 + +### Fixed + +- Fixed the TypeScript definitions in `graphql-scalars.d.ts` (Credit: [@capaj](https://github.com/capaj)) + ## [0.4.4] - 2019-02-08 ### Changed diff --git a/graphql-scalars.d.ts b/graphql-scalars.d.ts index 4f6dbff15..e1be30812 100644 --- a/graphql-scalars.d.ts +++ b/graphql-scalars.d.ts @@ -1,24 +1,49 @@ import { GraphQLScalarType } from 'graphql'; +interface RegularExpressionOptions { + errorMessage: Function; +} + declare namespace GraphqlScalars { - declare const EmailAddress: GraphQLScalarType; - declare const DateTime: GraphQLScalarType; - declare const NonPositiveInt: GraphQLScalarType; - declare const PositiveInt: GraphQLScalarType; - declare const NonNegativeInt: GraphQLScalarType; - declare const NegativeInt: GraphQLScalarType; - declare const NonPositiveFloat: GraphQLScalarType; - declare const PositiveFloat: GraphQLScalarType; - declare const NonNegativeFloat: GraphQLScalarType; - declare const NegativeFloat: GraphQLScalarType; - declare const EmailAddress: GraphQLScalarType; - declare const URL: GraphQLScalarType; - declare const PhoneNumber: GraphQLScalarType; - declare const PostalCode: GraphQLScalarType; + const EmailAddress: GraphQLScalarType; + const DateTime: GraphQLScalarType; + const NonPositiveInt: GraphQLScalarType; + const PositiveInt: GraphQLScalarType; + const NonNegativeInt: GraphQLScalarType; + const NegativeInt: GraphQLScalarType; + const NonPositiveFloat: GraphQLScalarType; + const PositiveFloat: GraphQLScalarType; + const NonNegativeFloat: GraphQLScalarType; + const NegativeFloat: GraphQLScalarType; + const URL: GraphQLScalarType; + const PhoneNumber: GraphQLScalarType; + const PostalCode: GraphQLScalarType; - declare class RegularExpression extends GraphQLScalarType { - constructor(name: string, regex: RegExp); + class RegularExpression extends GraphQLScalarType { + constructor( + name: string, + regex: RegExp, + options?: RegularExpressionOptions, + ); } + + const DateTimeScalar: string; + const NonPositiveIntScalar: string; + const PositiveIntScalar: string; + const NonNegativeIntScalar: string; + const UnsignedIntScalar: string; + const NegativeIntScalar: string; + const NonPositiveFloatScalar: string; + const PositiveFloatScalar: string; + const NonNegativeFloatScalar: string; + const UnsignedFloatScalar: string; + const NegativeFloatScalar: string; + const EmailAddressScalar: string; + const URLScalar: string; + const PhoneNumberScalar: string; + const PostalCodeScalar: string; + const RegularExpressionScalar: string; + const OKGScalarDefinitions: string[]; } export = GraphqlScalars; diff --git a/package-lock.json b/package-lock.json index 4510db9dd..22f3ed6b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@okgrow/graphql-scalars", - "version": "0.4.4", + "version": "0.4.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7873eeb43..543188731 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@okgrow/graphql-scalars", - "version": "0.4.4", + "version": "0.4.5", "description": "A collection of scalar types not included in base GraphQL.", "repository": { "type": "git",