Skip to content

Commit f743d0d

Browse files
authored
Merge pull request #33 from okgrow/v0.4.5
Fixed the TypeScript definitions in graphql-scalars.d.ts
2 parents fd7e47b + 7f9bf8f commit f743d0d

File tree

4 files changed

+49
-18
lines changed

4 files changed

+49
-18
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [0.4.5] - 2019-02-12
9+
10+
### Fixed
11+
12+
- Fixed the TypeScript definitions in `graphql-scalars.d.ts` (Credit: [@capaj](https://github.com/capaj))
13+
814
## [0.4.4] - 2019-02-08
915

1016
### Changed

graphql-scalars.d.ts

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,49 @@
11
import { GraphQLScalarType } from 'graphql';
22

3+
interface RegularExpressionOptions {
4+
errorMessage: Function;
5+
}
6+
37
declare namespace GraphqlScalars {
4-
declare const EmailAddress: GraphQLScalarType;
5-
declare const DateTime: GraphQLScalarType;
6-
declare const NonPositiveInt: GraphQLScalarType;
7-
declare const PositiveInt: GraphQLScalarType;
8-
declare const NonNegativeInt: GraphQLScalarType;
9-
declare const NegativeInt: GraphQLScalarType;
10-
declare const NonPositiveFloat: GraphQLScalarType;
11-
declare const PositiveFloat: GraphQLScalarType;
12-
declare const NonNegativeFloat: GraphQLScalarType;
13-
declare const NegativeFloat: GraphQLScalarType;
14-
declare const EmailAddress: GraphQLScalarType;
15-
declare const URL: GraphQLScalarType;
16-
declare const PhoneNumber: GraphQLScalarType;
17-
declare const PostalCode: GraphQLScalarType;
8+
const EmailAddress: GraphQLScalarType;
9+
const DateTime: GraphQLScalarType;
10+
const NonPositiveInt: GraphQLScalarType;
11+
const PositiveInt: GraphQLScalarType;
12+
const NonNegativeInt: GraphQLScalarType;
13+
const NegativeInt: GraphQLScalarType;
14+
const NonPositiveFloat: GraphQLScalarType;
15+
const PositiveFloat: GraphQLScalarType;
16+
const NonNegativeFloat: GraphQLScalarType;
17+
const NegativeFloat: GraphQLScalarType;
18+
const URL: GraphQLScalarType;
19+
const PhoneNumber: GraphQLScalarType;
20+
const PostalCode: GraphQLScalarType;
1821

19-
declare class RegularExpression extends GraphQLScalarType {
20-
constructor(name: string, regex: RegExp);
22+
class RegularExpression extends GraphQLScalarType {
23+
constructor(
24+
name: string,
25+
regex: RegExp,
26+
options?: RegularExpressionOptions,
27+
);
2128
}
29+
30+
const DateTimeScalar: string;
31+
const NonPositiveIntScalar: string;
32+
const PositiveIntScalar: string;
33+
const NonNegativeIntScalar: string;
34+
const UnsignedIntScalar: string;
35+
const NegativeIntScalar: string;
36+
const NonPositiveFloatScalar: string;
37+
const PositiveFloatScalar: string;
38+
const NonNegativeFloatScalar: string;
39+
const UnsignedFloatScalar: string;
40+
const NegativeFloatScalar: string;
41+
const EmailAddressScalar: string;
42+
const URLScalar: string;
43+
const PhoneNumberScalar: string;
44+
const PostalCodeScalar: string;
45+
const RegularExpressionScalar: string;
46+
const OKGScalarDefinitions: string[];
2247
}
2348

2449
export = GraphqlScalars;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@okgrow/graphql-scalars",
3-
"version": "0.4.4",
3+
"version": "0.4.5",
44
"description": "A collection of scalar types not included in base GraphQL.",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)