Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit generated code #10331

Merged
merged 2 commits into from Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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