Giter Site home page Giter Site logo

babel-typescript-union-bug's Introduction

Run

npm i
npm t

> [email protected] test /work
> babel index.ts

TypeError: Property types[0] of UnionTypeAnnotation expected node to be of a type ["FlowType"] but instead got "TSTypeAnnotation"
    at validate (/work/node_modules/@babel/types/lib/definitions/utils.js:128:13)
    at validator (/work/node_modules/@babel/types/lib/definitions/utils.js:97:7)
    at Object.validate (/work/node_modules/@babel/types/lib/definitions/utils.js:172:7)
    at validate (/work/node_modules/@babel/types/lib/validators/validate.js:17:9)
    at builder (/work/node_modules/@babel/types/lib/builders/builder.js:46:27)
    at UnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/generated/index.js:733:31)
    at Object.createUnionTypeAnnotation (/work/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js:20:47)
    at NodePath.ConditionalExpression (/work/node_modules/@babel/traverse/lib/path/inference/inferers.js:124:14)
    at NodePath._getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:63:20)
    at NodePath.getTypeAnnotation (/work/node_modules/@babel/traverse/lib/path/inference/index.js:29:19)
npm ERR! Test failed.  See above for more details.

babel-typescript-union-bug's People

Contributors

azz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.