import { isReactive , reactive } from "vue" ; export type RecursivePartial < T > = { [ P in keyof T ] ? : T [ P ] extends ( infer U ) [ ] ? RecursivePartial < U > [ ] : T [ P ] extends ( infer U ) [ ] | undefined ? RecursivePartial < U > [ ] : T [ P ] extends object ? RecursivePartial < T [ P ] > : T [ P ] extends object | undefined ? RecursivePartial < T [ P ] > : T [ P ] ; } ; declare class Id < T extends string > { private IDENTITY : T ; } export type Reactive < T > = Id < "Reactive" > & T ; export function Reactive < T extends object > ( value ) { if ( isReactive ( value ) ) { return value as Reactive < T > ; } else { return reactive ( value ) as Reactive < T > ; } } export interface ReadonlyRef < T > { readonly value : T ; } export function nonNull < T > ( val ? , name = "Parameter" ) { if ( val === undefined || val === null ) { throw new Error ( `${ name } is null` ) ; } return val ; }