1 line
725 B
JSON
1 line
725 B
JSON
{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createUnionTypeAnnotation;\n\nvar _generated = require(\"../generated\");\n\nvar _removeTypeDuplicates = _interopRequireDefault(require(\"../../modifications/flow/removeTypeDuplicates\"));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction createUnionTypeAnnotation(types) {\n var flattened = (0, _removeTypeDuplicates.default)(types);\n\n if (flattened.length === 1) {\n return flattened[0];\n } else {\n return (0, _generated.unionTypeAnnotation)(flattened);\n }\n}","map":null,"metadata":{},"sourceType":"script"} |