Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Wrong name in ImportMeta #489

Closed
ikatyang opened this issue Jun 27, 2018 · 0 comments
Closed

Wrong name in ImportMeta #489

ikatyang opened this issue Jun 27, 2018 · 0 comments
Labels

Comments

@ikatyang
Copy link
Contributor

What version of TypeScript are you using?
2.9.1

What version of typescript-eslint-parser are you using?
16.0.0

What code were you trying to parse?

import.meta.url

What did you expect to happen?

{
  "type": "ExpressionStatement",
  "expression": {
    "type": "MemberExpression",
    "object": {
      "type": "MetaProperty",
      "meta": {
        "type": "Identifier",
        "name": "import"
      },
      "property": {
        "type": "Identifier",
        "name": "meta"
      }
    },
    "property": {
      "type": "Identifier",
      "name": "url"
    },
    "computed": false
  }
}

What happened?

 {
   "type": "ExpressionStatement",
   "expression": {
     "type": "MemberExpression",
     "object": {
       "type": "MetaProperty",
       "meta": {
         "type": "Identifier",
-        "name": "import"
+        "name": "new"
       },
       "property": {
         "type": "Identifier",
         "name": "meta"
       }
     },
     "property": {
       "type": "Identifier",
       "name": "url"
     },
     "computed": false
   }
 }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant