Create File class for babel helpers (#10575)

* add test

* fix: pass File to helper traverser

* pass babel.File to helpers.ensure
This commit is contained in:
Huáng Jùnliàng
2020-03-17 04:58:46 -04:00
committed by GitHub
parent 748897be07
commit 4bf36e64da
8 changed files with 61 additions and 10 deletions

View File

@@ -174,7 +174,7 @@ export default class File {
}
// make sure that the helper exists
helpers.ensure(name);
helpers.ensure(name, File);
const uid = (this.declarations[name] = this.scope.generateUidIdentifier(
name,