-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Domain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorES NextNew featurers for ECMAScript (a.k.a. ESNext)New featurers for ECMAScript (a.k.a. ESNext)FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
import.meta does not parse. import.meta is stage 3 and implemented in Chrome/V8. See the TC39 proposal here: https://github.com/tc39/proposal-import-meta
TypeScript Version: 2.7.0-dev.201xxxxx
Search Terms:
import.meta
Code
const u = import.meta.url;Expected behavior:
import.meta at least parses when output is esnext.
For downlevel emit, specific meta-properties like import.meta.url, would presumably have to be handled differently. For import.meta.url a project could be given a base URL from which module base URLs are calculated from given their path.
Or a custom transform could be used. Any solution requires that import.meta parse though.
Actual behavior:
Syntax error.
Playground Link:
Related Issues:
bahrus, saschanaz, kachkaev and giovannipessiva
Metadata
Metadata
Assignees
Labels
Domain: ES ModulesThe issue relates to import/export style module behaviorThe issue relates to import/export style module behaviorES NextNew featurers for ECMAScript (a.k.a. ESNext)New featurers for ECMAScript (a.k.a. ESNext)FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript