packages/typescript-to-proptypes/src/types/props.ts/uniqueUnionTypes
export function uniqueUnionTypes(node: UnionType): UnionType {
  return {
    type: node.type,
    types: _.uniqBy(node.types, (type) => {
      if (type.type === 'LiteralNode') {
        return type.value;
      }

      if (type.type === 'InstanceOfNode') {
        return `${type.type}.${type.instance}`;
      }

      return type.type;
    }),
  };
}