@@ -100,3 +100,112 @@ interface E extends D {}
100100>E : Symbol(E, Decl(circularDeclaredPropertyAccess.ts, 20, 36))
101101>D : Symbol(D, Decl(circularDeclaredPropertyAccess.ts, 18, 16))
102102
103+ // Declared members are available while the base types are instantiated, which
104+ // can need one of them through a type argument referring back to the type.
105+
106+ namespace BaseTypeArguments {
107+ >BaseTypeArguments : Symbol(BaseTypeArguments, Decl(circularDeclaredPropertyAccess.ts, 22, 24))
108+
109+ interface Internals<I = unknown> { input: I; optin?: "optional" | "defaulted" | undefined }
110+ >Internals : Symbol(Internals, Decl(circularDeclaredPropertyAccess.ts, 27, 29))
111+ >I : Symbol(I, Decl(circularDeclaredPropertyAccess.ts, 28, 24))
112+ >input : Symbol(Internals.input, Decl(circularDeclaredPropertyAccess.ts, 28, 38))
113+ >I : Symbol(I, Decl(circularDeclaredPropertyAccess.ts, 28, 24))
114+ >optin : Symbol(Internals.optin, Decl(circularDeclaredPropertyAccess.ts, 28, 48))
115+
116+ interface Schema { _zod: Internals }
117+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
118+ >_zod : Symbol(Schema._zod, Decl(circularDeclaredPropertyAccess.ts, 29, 22))
119+ >Internals : Symbol(Internals, Decl(circularDeclaredPropertyAccess.ts, 27, 29))
120+
121+ type OptionalIn = { _zod: { optin: "optional" | "defaulted" } };
122+ >OptionalIn : Symbol(OptionalIn, Decl(circularDeclaredPropertyAccess.ts, 29, 40))
123+ >_zod : Symbol(_zod, Decl(circularDeclaredPropertyAccess.ts, 30, 23))
124+ >optin : Symbol(optin, Decl(circularDeclaredPropertyAccess.ts, 30, 31))
125+
126+ type IsOptionalIn<T extends Schema> = T extends OptionalIn ? true : false;
127+ >IsOptionalIn : Symbol(IsOptionalIn, Decl(circularDeclaredPropertyAccess.ts, 30, 68))
128+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 31, 22))
129+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
130+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 31, 22))
131+ >OptionalIn : Symbol(OptionalIn, Decl(circularDeclaredPropertyAccess.ts, 29, 40))
132+
133+ type RecordInput<V extends Schema> = [V] extends [OptionalIn] ? Partial<Record<string, V["_zod"]["input"]>> : Record<string, V["_zod"]["input"]>;
134+ >RecordInput : Symbol(RecordInput, Decl(circularDeclaredPropertyAccess.ts, 31, 78))
135+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 32, 21))
136+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
137+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 32, 21))
138+ >OptionalIn : Symbol(OptionalIn, Decl(circularDeclaredPropertyAccess.ts, 29, 40))
139+ >Partial : Symbol(Partial, Decl(lib.es5.d.ts, --, --))
140+ >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
141+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 32, 21))
142+ >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
143+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 32, 21))
144+
145+ interface RecordInternals<V extends Schema> extends Internals<RecordInput<V>> { optin?: "optional" | undefined }
146+ >RecordInternals : Symbol(RecordInternals, Decl(circularDeclaredPropertyAccess.ts, 32, 149))
147+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 33, 30))
148+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
149+ >Internals : Symbol(Internals, Decl(circularDeclaredPropertyAccess.ts, 27, 29))
150+ >RecordInput : Symbol(RecordInput, Decl(circularDeclaredPropertyAccess.ts, 31, 78))
151+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 33, 30))
152+ >optin : Symbol(RecordInternals.optin, Decl(circularDeclaredPropertyAccess.ts, 33, 83))
153+
154+ interface RecordSchema<V extends Schema> extends Schema { _zod: RecordInternals<V> }
155+ >RecordSchema : Symbol(RecordSchema, Decl(circularDeclaredPropertyAccess.ts, 33, 116))
156+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 34, 27))
157+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
158+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
159+ >_zod : Symbol(RecordSchema._zod, Decl(circularDeclaredPropertyAccess.ts, 34, 61))
160+ >RecordInternals : Symbol(RecordInternals, Decl(circularDeclaredPropertyAccess.ts, 32, 149))
161+ >V : Symbol(V, Decl(circularDeclaredPropertyAccess.ts, 34, 27))
162+
163+ interface UnionInternals<T extends readonly Schema[]> extends Internals<T[number]["_zod"]["input"]> {
164+ >UnionInternals : Symbol(UnionInternals, Decl(circularDeclaredPropertyAccess.ts, 34, 88))
165+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 35, 29))
166+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
167+ >Internals : Symbol(Internals, Decl(circularDeclaredPropertyAccess.ts, 27, 29))
168+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 35, 29))
169+
170+ optin: IsOptionalIn<T[number]> extends false ? "optional" | "defaulted" | undefined : "optional" | "defaulted";
171+ >optin : Symbol(UnionInternals.optin, Decl(circularDeclaredPropertyAccess.ts, 35, 105))
172+ >IsOptionalIn : Symbol(IsOptionalIn, Decl(circularDeclaredPropertyAccess.ts, 30, 68))
173+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 35, 29))
174+ }
175+ interface UnionSchema<T extends readonly Schema[]> extends Schema { _zod: UnionInternals<T> }
176+ >UnionSchema : Symbol(UnionSchema, Decl(circularDeclaredPropertyAccess.ts, 37, 5))
177+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 38, 26))
178+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
179+ >Schema : Symbol(Schema, Decl(circularDeclaredPropertyAccess.ts, 28, 95))
180+ >_zod : Symbol(UnionSchema._zod, Decl(circularDeclaredPropertyAccess.ts, 38, 71))
181+ >UnionInternals : Symbol(UnionInternals, Decl(circularDeclaredPropertyAccess.ts, 34, 88))
182+ >T : Symbol(T, Decl(circularDeclaredPropertyAccess.ts, 38, 26))
183+
184+ type JsonValue = { [k: string]: JsonValue };
185+ >JsonValue : Symbol(JsonValue, Decl(circularDeclaredPropertyAccess.ts, 38, 97))
186+ >k : Symbol(k, Decl(circularDeclaredPropertyAccess.ts, 39, 24))
187+ >JsonValue : Symbol(JsonValue, Decl(circularDeclaredPropertyAccess.ts, 38, 97))
188+
189+ type _Json = UnionSchema<[RecordSchema<Json>]>;
190+ >_Json : Symbol(_Json, Decl(circularDeclaredPropertyAccess.ts, 39, 48))
191+ >UnionSchema : Symbol(UnionSchema, Decl(circularDeclaredPropertyAccess.ts, 37, 5))
192+ >RecordSchema : Symbol(RecordSchema, Decl(circularDeclaredPropertyAccess.ts, 33, 116))
193+ >Json : Symbol(Json, Decl(circularDeclaredPropertyAccess.ts, 42, 71))
194+
195+ type _JsonInternals = _Json["_zod"];
196+ >_JsonInternals : Symbol(_JsonInternals, Decl(circularDeclaredPropertyAccess.ts, 40, 51))
197+ >_Json : Symbol(_Json, Decl(circularDeclaredPropertyAccess.ts, 39, 48))
198+
199+ interface JsonInternals extends _JsonInternals { input: JsonValue }
200+ >JsonInternals : Symbol(JsonInternals, Decl(circularDeclaredPropertyAccess.ts, 41, 40))
201+ >_JsonInternals : Symbol(_JsonInternals, Decl(circularDeclaredPropertyAccess.ts, 40, 51))
202+ >input : Symbol(JsonInternals.input, Decl(circularDeclaredPropertyAccess.ts, 42, 52))
203+ >JsonValue : Symbol(JsonValue, Decl(circularDeclaredPropertyAccess.ts, 38, 97))
204+
205+ interface Json extends _Json { _zod: JsonInternals }
206+ >Json : Symbol(Json, Decl(circularDeclaredPropertyAccess.ts, 42, 71))
207+ >_Json : Symbol(_Json, Decl(circularDeclaredPropertyAccess.ts, 39, 48))
208+ >_zod : Symbol(Json._zod, Decl(circularDeclaredPropertyAccess.ts, 43, 34))
209+ >JsonInternals : Symbol(JsonInternals, Decl(circularDeclaredPropertyAccess.ts, 41, 40))
210+ }
211+
0 commit comments