1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 18:32:22 +00:00

Merge pull request #948 from wangzongxu/patch-1

字母有误
This commit is contained in:
Ruan YiFeng 2020-02-03 00:01:49 +08:00 committed by GitHub
commit b19cdaacea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -603,7 +603,7 @@ $ hello.js
## import.meta ## import.meta
开发者使用一个模块时,有时需要知道模板本身的一些信息(比如模块的路径)。现在有一个[提案](https://github.com/tc39/proposal-import-meta),为 import 命令添加了一个元属性`import.beta`,返回当前模块的元信息。 开发者使用一个模块时,有时需要知道模板本身的一些信息(比如模块的路径)。现在有一个[提案](https://github.com/tc39/proposal-import-meta),为 import 命令添加了一个元属性`import.meta`,返回当前模块的元信息。
`import.meta`只能在模块内部使用,如果在模块外部使用会报错。 `import.meta`只能在模块内部使用,如果在模块外部使用会报错。