fkling / fkling/astexplorer

error when typescript with TSAsExpression

Open
#691 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.5k
Forks
772
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Missing semicolon. (2:10)

**To Reproduce**
Steps to reproduce the behavior:
1. Go to [astexplorer](https://astexplorer.net/)
2. select language `javascript` and parser `@babel/parser`
3. paste code

```
function t(a:any):boolean{
return a as boolean
}

```

**Expected behavior**
work correctly

**Screenshots**
image

**Browser (please complete the following information):**
- OS: macOs
- Browser : Chrome
- Version : 112.0.5615.137(正式版本) (x86_64)

**astexplorer settings:**
- Selected parser: @babel/parser
- Selected transformer (if applicable): none
- Contents of the local storage key `explorerSettingsV1` (code can be removed if you don't want it to be public)
```
{
"showTransformPanel": false,
"parserSettings": {},
"parserPerCategory": {},
"workbench": {
"parser": "acorn",
"code": "/**\n * Paste or drop some JavaScript here and explore\n * the syntax tree created by chosen parser.\n * You can use all the cool new features from ES6\n * and even more. Enjoy!\n */\n\nlet tips = [\n \"Click on any AST node with a '+' to expand it\",\n\n \"Hovering over a node highlights the \\\n corresponding location in the source code\",\n\n \"Shift click on an AST node to expand the whole subtree\"\n];\n\nfunction printTips() {\n tips.forEach((tip, i) => console.log(`Tip ${i}:` + tip));\n}\n",
"keyMap": "default",
"transform": {
"code": "",
"transformer": null
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.