"use strict";const u=require("../../../../../../../../../_virtual/removeTypeDuplicates.js");require("../../validators/generated/index.js");const l=require("../../../../../../../../../_virtual/index35.js");Object.defineProperty(u.__exports,"__esModule",{value:!0});u.__exports.default=y;var r=l.__exports;function f(t){return(0,r.isIdentifier)(t)?t.name:`${t.id.name}.${f(t.qualification)}`}function y(t){const i={},o={},c=new Set,s=[];for(let n=0;n<t.length;n++){const e=t[n];if(!!e&&!(s.indexOf(e)>=0)){if((0,r.isAnyTypeAnnotation)(e))return[e];if((0,r.isFlowBaseAnnotation)(e)){o[e.type]=e;continue}if((0,r.isUnionTypeAnnotation)(e)){c.has(e.types)||(t=t.concat(e.types),c.add(e.types));continue}if((0,r.isGenericTypeAnnotation)(e)){const p=f(e.id);if(i[p]){let a=i[p];a.typeParameters?e.typeParameters&&(a.typeParameters.params=y(a.typeParameters.params.concat(e.typeParameters.params))):a=e.typeParameters}else i[p]=e;continue}s.push(e)}}for(const n of Object.keys(o))s.push(o[n]);for(const n of Object.keys(i))s.push(i[n]);return s}
//# sourceMappingURL=removeTypeDuplicates.js.map
