MobXObservable fix
This commit is contained in:
@@ -1,13 +1,15 @@
|
|||||||
import type { Struct } from "@effect/schema/Schema"
|
import type { Struct } from "@effect/schema/Schema"
|
||||||
import { makeObservable, observable, type CreateObservableOptions } from "mobx"
|
import { makeObservable, observable, type CreateObservableOptions } from "mobx"
|
||||||
import { mapValues } from "remeda"
|
import { mapValues } from "remeda"
|
||||||
import type { Constructor } from "type-fest"
|
|
||||||
|
|
||||||
|
|
||||||
export function MobXObservable<
|
interface MobXObservableInput {
|
||||||
This extends Constructor<Struct.Type<Struct.Fields>, any> & {
|
new(...args: any[]): Struct.Type<Struct.Fields>
|
||||||
readonly fields: { readonly [K in keyof Struct.Fields]: Struct.Fields[K] }
|
readonly fields: { readonly [K in keyof Struct.Fields]: Struct.Fields[K] }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function MobXObservable<
|
||||||
|
This extends MobXObservableInput
|
||||||
>(
|
>(
|
||||||
class_: This,
|
class_: This,
|
||||||
options?: Omit<CreateObservableOptions, "proxy">,
|
options?: Omit<CreateObservableOptions, "proxy">,
|
||||||
|
|||||||
Reference in New Issue
Block a user