Skip to content

Update Babel #2370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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