import type { Expect, Equal } from "@milaboratories/helpers"; import { z } from "zod"; import type { ModelOptions, Model } from "../types"; import type { BlockOutputsBase, InferHrefType, InferOutputsType, OutputWithStatus, Platforma, } from "@platforma-sdk/model"; import type { BaseAppV2, createAppV2 } from "./createAppV2"; import { type AppV2 } from "../defineApp"; import { computed, type Component } from "vue"; declare function __createModel(options: ModelOptions): Model; declare const __args: { seed: number; }; const validate = z.coerce.number().int().parse; type _number = ReturnType; const __model1 = __createModel({ get() { return String(__args.seed); }, validate, autoSave: true, onSave(_seed) { // }, }); const __model2 = __createModel({ get() { return __args.seed; }, validate, autoSave: true, onSave(_seed) { // }, }); type InferArgs = Pl extends Platforma ? Args : never; type InferUiState = Pl extends Platforma ? UiState : never; export type TestApp

= ReturnType< typeof createAppV2, InferOutputsType

, InferUiState

, InferHrefType

> >; type _Args = { x: number; y: string[]; }; type _Outputs = { sum: OutputWithStatus & { __unwrap: true }; }; type _UiState = { flag: boolean; }; type _App1 = BaseAppV2<_Args, _Outputs, _UiState, "/">; type _App2 = TestApp>; const _local = () => { const counter = computed(() => 1); const label = computed(() => "aaaa"); const method = () => 100; return { counter, label, method, routes: { "/": undefined as unknown as Component, }, }; }; type ExtApp = AppV2<1, BlockOutputsBase, unknown, "/", ReturnType>; type _UpdateArgsParams = Parameters[0]>[0]; type __cases = [ Expect, typeof __model1>>, Expect, typeof __model2>>, Expect, typeof __model1>>, Expect, typeof __model2>>, Expect>, Expect>, Expect>, Expect number>>, Expect>, Expect>, Expect>, Expect>, Expect>, Expect>, Expect>, ];