Skip to content

Commit

Permalink
Apparently a String & js.Object type breaks scala 3. Let's call tha…
Browse files Browse the repository at this point in the history
…t a `String`
  • Loading branch information
oyvindberg committed Dec 15, 2021
1 parent 3cb5260 commit f4451cf
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ class ImportType(stdNames: QualifiedName.StdNames) {
TypeRef.Union(imported, NoComments, sort = false)

case TsTypeIntersect(types) =>
TypeRef.Intersection(types.map(apply(scope, importName)), NoComments)
types.map(apply(scope, importName)) match {
case stringObject
if stringObject.length == 2 && stringObject.contains(TypeRef.String) && stringObject.contains(
TypeRef.JsObject,
) =>
TypeRef.String
case other => TypeRef.Intersection(other, NoComments)
}

case TsTypeConstructor(_, TsTypeFunction(sig)) =>
newableFunction(scope, importName, sig, NoComments)
Expand Down

0 comments on commit f4451cf

Please sign in to comment.