def METHOD_NAME(
    w: Union[Shape, Workplane],
    exportType: ExportLiterals,
    fileLike: IO,
    tolerance: float = 0.1,
    angularTolerance: float = 0.1,
):
    """
    :param shape:  the shape to export. it can be a shape object, or a cadquery object. If a cadquery
    object, the first value is exported
    :param exportType: the exportFormat to use
    :param fileLike: a file like object to which the content will be written.
    The object should be already open and ready to write. The caller is responsible
    for closing the object
    :param tolerance: the linear tolerance, in model units. Default 0.1.
    :param angularTolerance: the angular tolerance, in radians. Default 0.1.
    """
    def tessellate(shape, angularTolerance):
        return shape.tessellate(tolerance, angularTolerance)
    shape: Shape
    if isinstance(w, Workplane):
        shape = toCompound(w)
    else:
        shape = w
    if exportType == ExportTypes.TJS:
        tess = tessellate(shape, angularTolerance)
        mesher = JsonMesh()
        # add vertices
        for v in tess[0]:
            mesher.addVertex(v.x, v.y, v.z)
        # add triangles
        for t in tess[1]:
            mesher.addTriangleFace(*t)
        fileLike.write(mesher.toJson())
    elif exportType == ExportTypes.SVG:
        fileLike.write(getSVG(shape))
    elif exportType == ExportTypes.AMF:
        tess = tessellate(shape, angularTolerance)
        aw = AmfWriter(tess)
        aw.writeAmf(fileLike)
    elif exportType == ExportTypes.THREEMF:
        tmfw = ThreeMFWriter(shape, tolerance, angularTolerance)
        tmfw.write3mf(fileLike)
    else:
        # all these types required writing to a file and then
        # re-reading. this is due to the fact that FreeCAD writes these
        (h, outFileName) = tempfile.mkstemp()
        # weird, but we need to close this file. the next step is going to write to
        # it from c code, so it needs to be closed.
        os.close(h)
        if exportType == ExportTypes.STEP:
            shape.exportStep(outFileName)
        elif exportType == ExportTypes.STL:
            shape.exportStl(outFileName, tolerance, angularTolerance, True)
        else:
            raise ValueError("No idea how i got here")
        res = readAndDeleteFile(outFileName)
        fileLike.write(res)