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