Skip to content

Commit b633f8b

Browse files
committed
Refactor order of type params in Js._WithFacade types
1 parent 9199bc5 commit b633f8b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

core/src/main/scala/japgolly/scalajs/react/component/Js.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ object Js extends JsBaseComponentTemplate[RAW.ReactClass] {
3737

3838
type RawMounted = RAW.ReactComponent
3939

40-
type Component[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u]] = ComponentWithRawType[P, S, CT, RawMounted]
41-
type Unmounted[P <: js.Object, S <: js.Object] = UnmountedWithRawType[P, S, RawMounted]
42-
type Mounted [P <: js.Object, S <: js.Object] = MountedWithRawType [P, S, RawMounted]
40+
type Component[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u]] = ComponentWithRawType[P, S, RawMounted, CT]
41+
type Unmounted[P <: js.Object, S <: js.Object] = UnmountedWithRawType[P, S, RawMounted]
42+
type Mounted [P <: js.Object, S <: js.Object] = MountedWithRawType [P, S, RawMounted]
4343

44-
type ComponentWithFacade[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u], R <: js.Object] = ComponentWithRawType[P, S, CT, RawMounted with R]
45-
type UnmountedWithFacade[P <: js.Object, S <: js.Object, R <: js.Object] = UnmountedWithRawType[P, S, RawMounted with R]
46-
type MountedWithFacade[P <: js.Object, S <: js.Object, R <: js.Object] = MountedWithRawType[P, S, RawMounted with R]
44+
type ComponentWithFacade[P <: js.Object, S <: js.Object, F <: js.Object, CT[-p, +u] <: CtorType[p, u]] = ComponentWithRawType[P, S, RawMounted with F, CT]
45+
type UnmountedWithFacade[P <: js.Object, S <: js.Object, F <: js.Object] = UnmountedWithRawType[P, S, RawMounted with F]
46+
type MountedWithFacade[P <: js.Object, S <: js.Object, F <: js.Object] = MountedWithRawType[P, S, RawMounted with F]
4747

48-
type ComponentWithRawType[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u], R <: RawMounted] = ComponentRoot[P, CT, UnmountedWithRawType[P, S, R]]
49-
type UnmountedWithRawType[P <: js.Object, S <: js.Object, R <: RawMounted] = UnmountedRoot[P, MountedWithRawType[P, S, R]]
48+
type ComponentWithRawType[P <: js.Object, S <: js.Object, R <: RawMounted, CT[-p, +u] <: CtorType[p, u]] = ComponentRoot[P, CT, UnmountedWithRawType[P, S, R]]
49+
type UnmountedWithRawType[P <: js.Object, S <: js.Object, R <: RawMounted] = UnmountedRoot[P, MountedWithRawType[P, S, R]]
5050
type MountedWithRawType[P <: js.Object, S <: js.Object, R <: RawMounted] = MountedRoot[Effect.Id, P, S, R]
5151

5252
override protected val rawComponentDisplayName: RAW.ReactClass => String =

core/src/main/scala/japgolly/scalajs/react/component/Scala.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ object Scala {
3737
type MountedPure [P, S, B] = Mounted[CallbackTo, P, S, B]
3838
type BackendScope [P, S] = Generic.MountedRoot[CallbackTo, P, S]
3939

40-
type JsComponent[P, S, B, CT[-p, +u] <: CtorType[p, u]] = Js.ComponentWithFacade[Box[P], Box[S], CT, Vars[P, S, B]]
41-
type JsUnmounted[P, S, B] = Js.UnmountedWithFacade[Box[P], Box[S], Vars[P, S, B]]
42-
type JsMounted [P, S, B] = Js.MountedWithFacade [Box[P], Box[S], Vars[P, S, B]]
40+
type JsComponent[P, S, B, CT[-p, +u] <: CtorType[p, u]] = Js.ComponentWithFacade[Box[P], Box[S], Vars[P, S, B], CT]
41+
type JsUnmounted[P, S, B] = Js.UnmountedWithFacade[Box[P], Box[S], Vars[P, S, B]]
42+
type JsMounted [P, S, B] = Js.MountedWithFacade [Box[P], Box[S], Vars[P, S, B]]
4343

4444
type RawMounted[P, S, B] = Js.RawMounted with Vars[P, S, B]
4545

core/src/main/scala/japgolly/scalajs/react/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package object react extends ReactEventTypes {
2121

2222
val JsComponent = component.Js
2323
type JsComponent[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u]] = JsComponent.Component[P, S, CT]
24-
type JsComponentWithFacade[P <: js.Object, S <: js.Object, CT[-p, +u] <: CtorType[p, u], R <: js.Object] = JsComponent.ComponentWithFacade[P, S, CT, R]
24+
type JsComponentWithFacade[P <: js.Object, S <: js.Object, F <: js.Object, CT[-p, +u] <: CtorType[p, u]] = JsComponent.ComponentWithFacade[P, S, F, CT]
2525

2626
val JsFnComponent = component.JsFn
2727
type JsFnComponent[P <: js.Object, CT[-p, +u] <: CtorType[p, u]] = JsFnComponent.Component[P, CT]

0 commit comments

Comments
 (0)