Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 15, 2020
1 parent eb5c07b commit d9c06c0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/babel-plugin-proposal-object-rest-spread/src/index.js
Expand Up @@ -17,15 +17,16 @@ const ZERO_REFS = (() => {
export default declare((api, opts) => {
api.assertVersion(7);

const { useBuiltIns = false } = opts;

const ignoreFunctionLength =
api.assumption("ignoreFunctionLength") ?? opts.loose;
const objectRestNoSymbols =
api.assumption("objectRestNoSymbols") ?? opts.loose;
const pureGetters = api.assumption("pureGetters") ?? opts.loose;
const setSpreadProperties =
api.assumption("setSpreadProperties") ?? opts.loose;
const { useBuiltIns = false, loose = false } = opts;

if (typeof loose !== "boolean") {
throw new Error(".loose must be a boolean, or undefined");
}

const ignoreFunctionLength = api.assumption("ignoreFunctionLength") ?? loose;
const objectRestNoSymbols = api.assumption("objectRestNoSymbols") ?? loose;
const pureGetters = api.assumption("pureGetters") ?? loose;
const setSpreadProperties = api.assumption("setSpreadProperties") ?? loose;

function getExtendsHelper(file) {
return useBuiltIns
Expand Down

0 comments on commit d9c06c0

Please sign in to comment.