Skip to content

Commit

Permalink
Update Babel (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Jan 20, 2020
1 parent a9bf2f5 commit d447244
Show file tree
Hide file tree
Showing 3 changed files with 631 additions and 659 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@
},
"dependencies": {},
"devDependencies": {
"@babel/core": "7.6.2",
"@babel/plugin-transform-flow-strip-types": "7.4.4",
"@babel/polyfill": "7.6.0",
"@babel/preset-env": "7.6.2",
"@babel/register": "7.6.2",
"@babel/core": "7.8.3",
"@babel/plugin-transform-flow-strip-types": "7.8.3",
"@babel/polyfill": "7.8.3",
"@babel/preset-env": "7.8.3",
"@babel/register": "7.8.3",
"babel-eslint": "10.0.3",
"chai": "4.2.0",
"cspell": "4.0.44",
"dtslint": "2.0.5",
"eslint": "6.8.0",
"eslint-plugin-flowtype": "4.6.0",
"eslint-plugin-import": "2.20.0",
"flow-bin": "0.116.0",
"flow-bin": "0.116.1",
"mocha": "7.0.0",
"nyc": "15.0.0",
"prettier": "1.19.1"
Expand Down
10 changes: 8 additions & 2 deletions src/type/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,16 @@ export function assertAbstractType(type: mixed): GraphQLAbstractType {
* })
*
*/
// FIXME: workaround to fix issue with Babel parser
/* ::
declare class GraphQLList<+T: GraphQLType> {
+ofType: T;
static <T>(ofType: T): GraphQLList<T>;
// Note: constructors cannot be used for covariant types. Drop the "new".
constructor(ofType: GraphQLType): void;
}
// eslint-disable-next-line no-redeclare
*/

export function GraphQLList(ofType) {
if (this instanceof GraphQLList) {
this.ofType = assertType(ofType);
Expand Down Expand Up @@ -395,13 +398,16 @@ defineToJSON(GraphQLList);
*
* Note: the enforcement of non-nullability occurs within the executor.
*/
// FIXME: workaround to fix issue with Babel parser
/* ::
declare class GraphQLNonNull<+T: GraphQLNullableType> {
+ofType: T;
static <T>(ofType: T): GraphQLNonNull<T>;
// Note: constructors cannot be used for covariant types. Drop the "new".
constructor(ofType: GraphQLType): void;
}
// eslint-disable-next-line no-redeclare
*/

export function GraphQLNonNull(ofType) {
if (this instanceof GraphQLNonNull) {
this.ofType = assertNullableType(ofType);
Expand Down
Loading

0 comments on commit d447244

Please sign in to comment.