Skip to content

Commit

Permalink
Merge pull request #33 from okgrow/v0.4.5
Browse files Browse the repository at this point in the history
Fixed the TypeScript definitions in graphql-scalars.d.ts
  • Loading branch information
ccuilla committed Feb 12, 2019
2 parents fd7e47b + 7f9bf8f commit f743d0d
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
57 changes: 41 additions & 16 deletions 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;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 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",
Expand Down

0 comments on commit f743d0d

Please sign in to comment.