Skip to content

Call expression support

Latest
Compare
Choose a tag to compare
@itsdouges itsdouges released this 12 Oct 05:31
· 7 commits to master since this release

This release adds support for call expressions, for example:

{
    "plugins": [
      {
        "transform": "ts-transform-define",
        "replace": {
          "isNodeEnvironment()": "true"
        }
      }
    ]
  },
}

With this code:

if (isNodeEnvironment()) {
  console.log('hello world');
}

Results in:

if (true) {
  console.log('hello world');
}