Skip to content

Commit

Permalink
Improve usage of HTMLCollectionOf
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Apr 22, 2020
1 parent c310cbd commit aa5bf0e
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ object LibrarySpecific {
val libName: TsIdentLibrary
}

object std extends Named {
override val libName = TsIdentLibrarySimple("std")

override def enterTsDecl(t: TsTreeScope)(x: TsDecl): TsDecl =
x match {
case i @ TsDeclInterface(_, _, TsIdentSimple("HTMLCollectionOf"), _, _, _, _) =>
i.copy(inheritance = Empty)
case other => other
}
}

object styledComponents extends Named {
override val libName = TsIdentLibrarySimple("styled-components")

Expand Down Expand Up @@ -197,7 +208,7 @@ object LibrarySpecific {
}

val patches: Map[TsIdentLibrary, Named] =
IArray(atUifabricFoundation, aMap, emberPolyfills, emotion, react, semanticUiReact, styledComponents)
IArray(atUifabricFoundation, aMap, emberPolyfills, emotion, react, semanticUiReact, std, styledComponents)
.map(x => x.libName -> x)
.toMap

Expand Down

0 comments on commit aa5bf0e

Please sign in to comment.