Skip to content

Commit

Permalink
Commit generated code (#10331)
Browse files Browse the repository at this point in the history
* update prettier generated artifacts

* chore: sync babel-helpers to artifacts
  • Loading branch information
JLHwung authored and nicolo-ribaudo committed Aug 13, 2019
1 parent 0519650 commit 22df2ae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 23 deletions.
7 changes: 2 additions & 5 deletions packages/babel-runtime-corejs2/helpers/esm/temporalRef.js
@@ -1,8 +1,5 @@
import undef from "./temporalUndefined";
import err from "./tdz";
export default function _temporalRef(val, name) {
if (val === undef) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
return val === undef ? err(name) : val;
}
8 changes: 3 additions & 5 deletions packages/babel-runtime-corejs2/helpers/temporalRef.js
@@ -1,11 +1,9 @@
var temporalUndefined = require("./temporalUndefined");

var tdz = require("./tdz");

function _temporalRef(val, name) {
if (val === temporalUndefined) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
return val === temporalUndefined ? tdz(name) : val;
}

module.exports = _temporalRef;
7 changes: 2 additions & 5 deletions packages/babel-runtime/helpers/esm/temporalRef.js
@@ -1,8 +1,5 @@
import undef from "./temporalUndefined";
import err from "./tdz";
export default function _temporalRef(val, name) {
if (val === undef) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
return val === undef ? err(name) : val;
}
8 changes: 3 additions & 5 deletions packages/babel-runtime/helpers/temporalRef.js
@@ -1,11 +1,9 @@
var temporalUndefined = require("./temporalUndefined");

var tdz = require("./tdz");

function _temporalRef(val, name) {
if (val === temporalUndefined) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
return val === temporalUndefined ? tdz(name) : val;
}

module.exports = _temporalRef;
5 changes: 2 additions & 3 deletions packages/babel-types/src/asserts/generated/index.js
Expand Up @@ -8,9 +8,8 @@ import is from "../../validators/is";
function assert(type: string, node: Object, opts?: Object): void {
if (!is(type, node, opts)) {
throw new Error(
`Expected type "${type}" with option ${JSON.stringify(
(opts: any),
)}, but instead got "${node.type}".`,
`Expected type "${type}" with option ${JSON.stringify((opts: any))}, ` +
`but instead got "${node.type}".`,
);
}
}
Expand Down

0 comments on commit 22df2ae

Please sign in to comment.