@@ -432,14 +432,25 @@ export type ClientParseError = InvariantError & {
432
432
parseError: Error ;
433
433
};
434
434
435
- // Warning: (ae-forgotten-export) The symbol "UnionToIntersection " needs to be exported by the entry point index.d.ts
436
- // Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs " needs to be exported by the entry point index.d.ts
437
- // Warning: (ae-forgotten-export) The symbol "RemoveFragmentName " needs to be exported by the entry point index.d.ts
435
+ // Warning: (ae-forgotten-export) The symbol "Prettify " needs to be exported by the entry point index.d.ts
436
+ // Warning: (ae-forgotten-export) The symbol "MergeUnions " needs to be exported by the entry point index.d.ts
437
+ // Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames " needs to be exported by the entry point index.d.ts
438
438
//
439
- // @public (undocumented)
440
- type CombineFragmentRefs <FragmentRefs extends Record <string , any >> = UnionToIntersection <{
441
- [K in keyof FragmentRefs ]- ? : UnwrapFragmentRefs <RemoveFragmentName <FragmentRefs [K ]>>;
442
- }[keyof FragmentRefs ]>;
439
+ // @public
440
+ type CombineByTypeName <T extends {
441
+ __typename? : string ;
442
+ }> = {
443
+ [TypeName in NonNullable <T [" __typename" ]>]: Prettify <MergeUnions <ExtractByMatchingTypeNames <T , TypeName >>>;
444
+ }[NonNullable <T [" __typename" ]>];
445
+
446
+ // Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts
447
+ //
448
+ // @public
449
+ type CombineIntersection <T > = Exclude <T , {
450
+ __typename? : string ;
451
+ }> | CombineByTypeName <Extract <T , {
452
+ __typename? : string ;
453
+ }>>;
443
454
444
455
// @public (undocumented)
445
456
class Concast <T > extends Observable <T > {
@@ -633,6 +644,9 @@ export { disableExperimentalFragmentVariables }
633
644
634
645
export { disableFragmentWarnings }
635
646
647
+ // @public (undocumented)
648
+ type DistributedRequiredExclude <T , U > = T extends any ? Required <T > extends Required <U > ? Required <U > extends Required <T > ? never : T : T : T ;
649
+
636
650
export { DocumentNode }
637
651
638
652
// @public (undocumented)
@@ -811,6 +825,13 @@ interface ExecutionPatchResultBase {
811
825
hasNext? : boolean ;
812
826
}
813
827
828
+ // @public
829
+ type ExtractByMatchingTypeNames <Union extends {
830
+ __typename? : string ;
831
+ }, TypeName extends string > = Union extends any ? TypeName extends NonNullable <Union [" __typename" ]> ? Omit <Union , " __typename" > & {
832
+ [K in keyof Union as K extends " __typename" ? K : never ]: TypeName ;
833
+ } : never : never ;
834
+
814
835
// @public (undocumented)
815
836
export const fallbackHttpConfig: {
816
837
http: HttpQueryOptions ;
@@ -1227,6 +1248,9 @@ interface InvalidateModifier {
1227
1248
// @public (undocumented)
1228
1249
const _invalidateModifier: unique symbol ;
1229
1250
1251
+ // @public (undocumented)
1252
+ type IsAny <T > = 0 extends 1 & T ? true : false ;
1253
+
1230
1254
// @public (undocumented)
1231
1255
export function isApolloError(err : Error ): err is ApolloError ;
1232
1256
@@ -1236,11 +1260,11 @@ export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean;
1236
1260
// @public (undocumented)
1237
1261
export function isReference(obj : any ): obj is Reference ;
1238
1262
1239
- // Warning: (ae-forgotten-export) The symbol "UnionToIntersection_2 " needs to be exported by the entry point index.d.ts
1263
+ // Warning: (ae-forgotten-export) The symbol "UnionToIntersection " needs to be exported by the entry point index.d.ts
1240
1264
// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts
1241
1265
//
1242
1266
// @public (undocumented)
1243
- type IsStrictlyAny <T > = UnionToIntersection_2 <UnionForAny <T >> extends never ? true : false ;
1267
+ type IsStrictlyAny <T > = UnionToIntersection <UnionForAny <T >> extends never ? true : false ;
1244
1268
1245
1269
// @public (undocumented)
1246
1270
type KeyArgsFunction = (args : Record <string , any > | null , context : {
@@ -1377,16 +1401,16 @@ interface MaskOperationOptions<TData> {
1377
1401
// @public (undocumented)
1378
1402
type MaybeAsync <T > = T | PromiseLike <T >;
1379
1403
1380
- // Warning: (ae-forgotten-export) The symbol "Prettify " needs to be exported by the entry point index.d.ts
1404
+ // Warning: (ae-forgotten-export) The symbol "IsAny " needs to be exported by the entry point index.d.ts
1381
1405
// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts
1382
1406
// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts
1383
1407
//
1384
1408
// @public
1385
- export type MaybeMasked <TData > = TData extends {
1409
+ export type MaybeMasked <TData > = TData extends any ? true extends IsAny < TData > ? TData : TData extends {
1386
1410
__masked? : true ;
1387
1411
} ? Prettify <RemoveMaskedMarker <TData >> : DataMasking extends {
1388
1412
enabled: true ;
1389
- } ? TData : true extends ContainsFragmentsRefs <TData > ? Unmasked <TData > : TData ;
1413
+ } ? TData : true extends ContainsFragmentsRefs <TData > ? Unmasked <TData > : TData : never ;
1390
1414
1391
1415
// @public (undocumented)
1392
1416
export interface MergeInfo {
@@ -1398,6 +1422,19 @@ export interface MergeInfo {
1398
1422
typename: string | undefined ;
1399
1423
}
1400
1424
1425
+ // Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts
1426
+ //
1427
+ // @public (undocumented)
1428
+ type MergeObjects <T , U > = Prettify <{
1429
+ [k in keyof T ]: k extends keyof U ? [
1430
+ NonNullable <T [k ]>,
1431
+ NonNullable <U [k ]>
1432
+ ] extends ([
1433
+ infer TK extends object ,
1434
+ infer UK extends object
1435
+ ]) ? TK extends unknown [] ? UK extends unknown [] ? CombineIntersection <TK [number ] | UK [number ]>[] | Extract <T [k ] | U [k ], undefined | null > : T [k ] : CombineIntersection <TK | UK > | Extract <T [k ] | U [k ], undefined | null > : T [k ] : T [k ];
1436
+ } & Pick <U , Exclude <keyof U , keyof T >>>;
1437
+
1401
1438
// @public (undocumented)
1402
1439
type MergeObjectsFunction = <T extends StoreObject | Reference >(existing : T , incoming : T ) => T ;
1403
1440
@@ -1414,6 +1451,22 @@ export interface MergeTree {
1414
1451
map: Map <string | number , MergeTree >;
1415
1452
}
1416
1453
1454
+ // Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts
1455
+ // Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts
1456
+ //
1457
+ // @public (undocumented)
1458
+ type MergeUnions <TUnion > = MergeUnionsAcc <TUnion , takeOneFromUnion <TUnion >, never >;
1459
+
1460
+ // Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts
1461
+ // Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts
1462
+ //
1463
+ // @public (undocumented)
1464
+ type MergeUnionsAcc <TUnion , Curr , Merged > = [
1465
+ Curr
1466
+ ] extends [never ] ? Merged : MergeUnionsAcc <DistributedRequiredExclude <TUnion , Curr >, takeOneFromUnion <DistributedRequiredExclude <TUnion , Curr >>, [
1467
+ Merged
1468
+ ] extends [never ] ? Curr : MergeObjects <Curr , Merged >>;
1469
+
1417
1470
// @public (undocumented)
1418
1471
export type MethodKeys <T > = {
1419
1472
[P in keyof T ]: T [P ] extends Function ? P : never ;
@@ -2276,6 +2329,11 @@ export interface SubscriptionOptions<TVariables = OperationVariables, TData = an
2276
2329
variables? : TVariables ;
2277
2330
}
2278
2331
2332
+ // Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts
2333
+ //
2334
+ // @public (undocumented)
2335
+ type takeOneFromUnion <T > = unionToIntersection <T extends T ? (x : T ) => 0 : never > extends ((x : infer U ) => 0 ) ? U : never ;
2336
+
2279
2337
// @public (undocumented)
2280
2338
export const throwServerError: (response : Response , result : any , message : string ) => never ;
2281
2339
@@ -2334,22 +2392,21 @@ export type TypePolicy = {
2334
2392
type UnionForAny <T > = T extends never ? " a" : 1 ;
2335
2393
2336
2394
// @public (undocumented)
2337
- type UnionToIntersection <U > = (U extends any ? (x : U ) => void : never ) extends (x : infer I ) => void ? I : never ;
2395
+ type UnionToIntersection <U > = (U extends any ? (k : U ) => void : never ) extends (k : infer I ) => void ? I : never ;
2338
2396
2339
2397
// @public (undocumented)
2340
- type UnionToIntersection_2 < U > = (U extends any ? (k : U ) => void : never ) extends (k : infer I ) => void ? I : never ;
2398
+ type unionToIntersection < T > = (T extends unknown ? (x : T ) => unknown : never ) extends (( x : infer U ) => unknown ) ? U : never ;
2341
2399
2400
+ // Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts
2401
+ // Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts
2402
+ //
2342
2403
// @public
2343
- export type Unmasked <TData > = TData extends object ? UnwrapFragmentRefs <RemoveMaskedMarker <RemoveFragmentName <TData >>> : TData ;
2404
+ export type Unmasked <TData > = true extends IsAny < TData > ? TData : TData extends object ? UnwrapFragmentRefs <RemoveMaskedMarker <RemoveFragmentName <TData >>> : TData ;
2344
2405
2345
- // Warning: (ae-forgotten-export) The symbol "CombineFragmentRefs" needs to be exported by the entry point index.d.ts
2346
- //
2347
2406
// @public (undocumented)
2348
- type UnwrapFragmentRefs <TData > = TData extends any ? string extends keyof NonNullable <TData > ? TData : " $fragmentRefs" extends keyof NonNullable <TData > ? TData extends {
2349
- " $fragmentRefs" ? : infer FragmentRefs extends object ;
2350
- } ? Prettify <{
2351
- [K in keyof TData as K extends " $fragmentRefs" ? never : K ]: UnwrapFragmentRefs <TData [K ]>;
2352
- } & CombineFragmentRefs <FragmentRefs >> : never : TData extends Array <infer TItem > ? Array <UnwrapFragmentRefs <TItem >> : TData extends object ? {
2407
+ type UnwrapFragmentRefs <TData > = true extends IsAny <TData > ? TData : TData extends any ? string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends {
2408
+ " $fragmentRefs" ? : infer FragmentRefs ;
2409
+ } ? UnwrapFragmentRefs <CombineIntersection <Omit <TData , " $fragmentRefs" > | RemoveFragmentName <NonNullable <NonNullable <FragmentRefs >[keyof NonNullable <FragmentRefs >]>>>> : TData extends Array <infer TItem > ? Array <UnwrapFragmentRefs <TItem >> : TData extends object ? {
2353
2410
[K in keyof TData ]: UnwrapFragmentRefs <TData [K ]>;
2354
2411
} : TData : never ;
2355
2412
0 commit comments