Skip to content

import.meta.url is not supported in module : es2020 #41722

Closed
microsoft/TypeScript-DOM-lib-generator
#958
@saschanaz

Description

@saschanaz

TypeScript Version: 4.2.0-dev.20201129

Search Terms: import.meta.url

Code

export function foo() {
  return import.meta.url;
}

Expected behavior: It should work

Actual behavior: Property 'url' does not exist on type 'ImportMeta'.

Playground Link: https://www.typescriptlang.org/play?target=7&ts=4.2.0-dev.20201129#code/KYDwDg9gTgLgBAMwK4DsDGMCWEWIhACgEo4BvAWACg44pgYkpdMBbSWAOhfoEMPGANgG4qAXyA

Related Issues: #41274 didn't add url in ImportMeta, which is supported by HTML.

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions