@babel/preset-typescript

    In

    Out

      1. {
      2. "presets": ["@babel/preset-typescript"]

      Via CLI

      1. require("@babel/core").transform("code", {
      2. presets: ["@babel/preset-typescript"],

      isTSX

      boolean, defaults to false.

      Forcibly enables jsx parsing. Otherwise angle brackets will be treated as typescript's legacy type assertion . Also, isTSX: true requires allExtensions: true

      string, defaults to React.

      This is so that we know that the import is not a type import, and should not be removed

      allExtensions

      boolean, defaults to false.

      Indicates that every file should be parsed as TS or TSX (depending on the isTSX option)