Sha256: d956848a9ebd7c485908f46c0ce527c83509e952872b4aec8de995434f2369a1

Contents?: true

Size: 534 Bytes

Versions: 164

Compression:

Stored size: 534 Bytes

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = createFlowUnionType;
var _index = require("../generated/index.js");
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates.js");
function createFlowUnionType(types) {
  const flattened = (0, _removeTypeDuplicates.default)(types);
  if (flattened.length === 1) {
    return flattened[0];
  } else {
    return (0, _index.unionTypeAnnotation)(flattened);
  }
}

//# sourceMappingURL=createFlowUnionType.js.map

Version data entries

164 entries across 16 versions & 3 rubygems

Version Path
immosquare-cleaner-0.1.40 node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
wice_grid-7.1.0 node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
immosquare-cleaner-0.1.39 node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
immosquare-cleaner-0.1.38 node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js