Babel: Flow "double nullable" type can't be parsed

Created on 13 May 2018  路  3Comments  路  Source: babel/babel

Bug Report

Current Behavior

It throws a syntax error.

Input Code

type A = ??T;

https://babeljs.io/repl/build/master#?babili=false&browsers=&build=&builtIns=false&code_lz=C4TwDgpgBAglC8UD8SAqBuIA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&lineWrap=true&presets=flow&prettier=false&targets=&version=7.0.0-beta.46&envVersion=

Expected behavior/code
It is the same as

type A = ? ?T;

Environment

  • Babel version(s): v7.0.0-beta.46
  • How you are using Babel: repl
flow claimed bug outdated parser

All 3 comments

Note that using the syntax-flow plugin (i.e. not stripping the types) with type A = ? ?T; outputs this:

type A = ??T;

which will fail to parse.

i would like to work on it

If you need help, join our Slack!

Was this page helpful?
0 / 5 - 0 ratings