From 1e7c5c6d305e7b5bd3bb906238f212246ab3d275 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 14 Sep 2023 13:46:52 +0200 Subject: [PATCH] API updates for this PR --- .api-reports/api-report-cache.md | 4 +-- .api-reports/api-report-core.md | 34 ++++++++---------- .api-reports/api-report-link_http.md | 4 +-- .api-reports/api-report-react.md | 30 ++++++++-------- .api-reports/api-report-react_components.md | 26 +++++++------- .api-reports/api-report-react_context.md | 26 +++++++------- .api-reports/api-report-react_hoc.md | 26 +++++++------- .api-reports/api-report-react_hooks.md | 30 ++++++++-------- .api-reports/api-report-react_ssr.md | 26 +++++++------- .api-reports/api-report-testing.md | 30 ++++++++-------- .api-reports/api-report-testing_core.md | 30 ++++++++-------- .api-reports/api-report-utilities.md | 30 ++++++++-------- .api-reports/api-report.md | 38 +++++++++------------ 13 files changed, 153 insertions(+), 181 deletions(-) diff --git a/.api-reports/api-report-cache.md b/.api-reports/api-report-cache.md index e2135907143..0d002ee9f2c 100644 --- a/.api-reports/api-report-cache.md +++ b/.api-reports/api-report-cache.md @@ -83,7 +83,7 @@ namespace Cache_2 { // (undocumented) interface BatchOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -885,7 +885,7 @@ export type StoreValue = number | string | string[] | Reference | Reference[] | class Stump extends Layer { constructor(root: EntityStore.Root); // (undocumented) - merge(): any; + merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } diff --git a/.api-reports/api-report-core.md b/.api-reports/api-report-core.md index 0bc6fab994b..13364529145 100644 --- a/.api-reports/api-report-core.md +++ b/.api-reports/api-report-core.md @@ -291,7 +291,7 @@ namespace Cache_2 { // (undocumented) interface BatchOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -426,7 +426,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -922,8 +922,6 @@ export class HttpLink extends ApolloLink { constructor(options?: HttpOptions); // (undocumented) options: HttpOptions; - // (undocumented) - requester: RequestHandler; } // @public (undocumented) @@ -1157,15 +1155,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1548,7 +1544,7 @@ export type OptimisticStoreItem = { }; // @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; +type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; // @public (undocumented) export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise; @@ -1628,7 +1624,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1650,7 +1646,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1660,7 +1656,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1936,7 +1932,7 @@ export interface Resolvers { // // @public (undocumented) export function rewriteURIForGET(chosenURI: string, body: Body_2): { - parseError: any; + parseError: unknown; newURI?: undefined; } | { newURI: string; @@ -2017,7 +2013,7 @@ export type StoreValue = number | string | string[] | Reference | Reference[] | class Stump extends Layer { constructor(root: EntityStore.Root); // (undocumented) - merge(): any; + merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } @@ -2183,11 +2179,11 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-link_http.md b/.api-reports/api-report-link_http.md index 09b1e6459dd..8d6da95e4d4 100644 --- a/.api-reports/api-report-link_http.md +++ b/.api-reports/api-report-link_http.md @@ -181,8 +181,6 @@ export class HttpLink extends ApolloLink { constructor(options?: HttpOptions); // (undocumented) options: HttpOptions; - // (undocumented) - requester: RequestHandler; } // @public (undocumented) @@ -278,7 +276,7 @@ type RequestHandler = (operation: Operation, forward: NextLink) => Observable, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -547,7 +547,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -1016,15 +1016,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1447,7 +1445,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1471,7 +1469,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1481,7 +1479,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -2218,18 +2216,18 @@ interface WatchQueryOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -484,7 +484,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -812,15 +812,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1249,7 +1247,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1273,7 +1271,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1283,7 +1281,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1731,11 +1729,11 @@ interface WatchQueryOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -469,7 +469,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -800,15 +800,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1159,7 +1157,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1183,7 +1181,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1193,7 +1191,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1629,11 +1627,11 @@ interface WatchQueryOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -461,7 +461,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -810,15 +810,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1227,7 +1225,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1251,7 +1249,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1261,7 +1259,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1673,11 +1671,11 @@ export function withSubscription, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -517,7 +517,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -966,15 +966,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1377,7 +1375,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1401,7 +1399,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1411,7 +1409,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -2111,18 +2109,18 @@ interface WatchQueryOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -440,7 +440,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -787,15 +787,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1146,7 +1144,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1170,7 +1168,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1180,7 +1178,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1616,11 +1614,11 @@ interface WatchQueryOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -424,7 +424,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -754,7 +754,7 @@ function isReference(obj: any): obj is Reference; type IsStrictlyAny = UnionToIntersection> extends never ? true : false; // @public (undocumented) -export const itAsync: ((message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number | undefined) => any) & { +export const itAsync: ((this: unknown, message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number | undefined) => void) & { only: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; skip: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; todo: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; @@ -765,15 +765,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -942,7 +940,7 @@ export class MockSubscriptionLink extends ApolloLink { // (undocumented) onUnsubscribe(listener: any): void; // (undocumented) - operation: Operation; + operation?: Operation; // (undocumented) request(operation: Operation): Observable; // (undocumented) @@ -1222,7 +1220,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1246,7 +1244,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1256,7 +1254,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1664,11 +1662,11 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts // src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-testing_core.md b/.api-reports/api-report-testing_core.md index 2dc55496b8d..bc418ca8cec 100644 --- a/.api-reports/api-report-testing_core.md +++ b/.api-reports/api-report-testing_core.md @@ -302,7 +302,7 @@ namespace Cache_2 { // (undocumented) interface BatchOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -423,7 +423,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -753,7 +753,7 @@ function isReference(obj: any): obj is Reference; type IsStrictlyAny = UnionToIntersection> extends never ? true : false; // @public (undocumented) -export const itAsync: ((message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number | undefined) => any) & { +export const itAsync: ((this: unknown, message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number | undefined) => void) & { only: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; skip: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; todo: (message: string, callback: (resolve: (result?: any) => void, reject: (reason?: any) => void) => any, timeout?: number) => void; @@ -764,15 +764,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -898,7 +896,7 @@ export class MockSubscriptionLink extends ApolloLink { // (undocumented) onUnsubscribe(listener: any): void; // (undocumented) - operation: Operation; + operation?: Operation; // (undocumented) request(operation: Operation): Observable; // (undocumented) @@ -1178,7 +1176,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1202,7 +1200,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1212,7 +1210,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -1622,11 +1620,11 @@ export function withWarningSpy(it: (...args: TArgs // src/cache/core/types/common.ts:99:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts // src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:46:5 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report-utilities.md b/.api-reports/api-report-utilities.md index 410b9ded70b..6cb83ea20aa 100644 --- a/.api-reports/api-report-utilities.md +++ b/.api-reports/api-report-utilities.md @@ -345,7 +345,7 @@ namespace Cache_2 { // (undocumented) interface BatchOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -505,7 +505,7 @@ export class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -1388,15 +1388,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1804,7 +1802,7 @@ interface Operation { type OperationVariables = Record; // @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; +type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; // @public (undocumented) type Path = ReadonlyArray; @@ -1889,7 +1887,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -1913,7 +1911,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -1923,7 +1921,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -2311,7 +2309,7 @@ export function stripTypename(value: T): DeepOmit; class Stump extends Layer { constructor(root: EntityStore.Root); // (undocumented) - merge(): any; + merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } @@ -2507,11 +2505,11 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/writeToStore.ts:65:7 - (ae-forgotten-export) The symbol "MergeTree" needs to be exported by the entry point index.d.ts // src/core/ApolloClient.ts:47:3 - (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts // src/core/LocalState.ts:71:3 - (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/types.ts:158:3 - (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts // src/core/types.ts:160:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts // src/core/types.ts:178:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts diff --git a/.api-reports/api-report.md b/.api-reports/api-report.md index 01950a8f066..bbc0717e033 100644 --- a/.api-reports/api-report.md +++ b/.api-reports/api-report.md @@ -398,7 +398,7 @@ namespace Cache_2 { // (undocumented) interface BatchOptions, TUpdateResult = void> { // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => any; + onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) optimistic?: string | boolean; // (undocumented) @@ -545,7 +545,7 @@ class Concast extends Observable { // (undocumented) cancel: (reason: any) => void; // (undocumented) - readonly promise: Promise; + readonly promise: Promise; // (undocumented) removeObserver(observer: Observer): void; } @@ -1102,8 +1102,6 @@ export class HttpLink extends ApolloLink { constructor(options?: HttpOptions); // (undocumented) options: HttpOptions; - // (undocumented) - requester: RequestHandler; } // @public (undocumented) @@ -1417,15 +1415,13 @@ class LocalState { // Warning: (ae-forgotten-export) The symbol "LocalStateOptions" needs to be exported by the entry point index.d.ts constructor({ cache, client, resolvers, fragmentMatcher, }: LocalStateOptions); // (undocumented) - addExportedVariables(document: DocumentNode, variables?: OperationVariables, context?: {}): Promise<{ - [x: string]: any; - }>; + addExportedVariables(document: DocumentNode, variables?: TVars, context?: {}): Promise; // (undocumented) addResolvers(resolvers: Resolvers | Resolvers[]): void; // (undocumented) clientQuery(document: DocumentNode): DocumentNode | null; // (undocumented) - getFragmentMatcher(): FragmentMatcher; + getFragmentMatcher(): FragmentMatcher | undefined; // (undocumented) getResolvers(): Resolvers; // (undocumented) @@ -1882,7 +1878,7 @@ export type OptimisticStoreItem = { }; // @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; +type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; // @public (undocumented) export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise; @@ -2003,7 +1999,7 @@ class QueryInfo { document: DocumentNode; variables: Record | undefined; networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; + observableQuery?: ObservableQuery; lastRequestId?: number; }): this; // (undocumented) @@ -2025,7 +2021,7 @@ class QueryInfo { // (undocumented) notify(): void; // (undocumented) - readonly observableQuery: ObservableQuery | null; + readonly observableQuery: ObservableQuery | null; // (undocumented) readonly queryId: string; // (undocumented) @@ -2035,7 +2031,7 @@ class QueryInfo { // (undocumented) setDiff(diff: Cache_2.DiffResult | null): void; // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + setObservableQuery(oq: ObservableQuery | null): void; // (undocumented) stop(): void; // (undocumented) @@ -2379,7 +2375,7 @@ export interface Resolvers { // // @public (undocumented) export function rewriteURIForGET(chosenURI: string, body: Body_2): { - parseError: any; + parseError: unknown; newURI?: undefined; } | { newURI: string; @@ -2466,7 +2462,7 @@ export type StoreValue = number | string | string[] | Reference | Reference[] | class Stump extends Layer { constructor(root: EntityStore.Root); // (undocumented) - merge(): any; + merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } @@ -2887,15 +2883,15 @@ interface WriteContext extends ReadMergeModifyContext { // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts // src/cache/inmemory/policies.ts:167:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts // src/cache/inmemory/types.ts:126:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:112:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:116:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:149:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:378:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:113:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:114:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:117:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:150:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:379:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts // src/core/watchQueryOptions.ts:191:3 - (ae-forgotten-export) The symbol "UpdateQueryFn" needs to be exported by the entry point index.d.ts // src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:24:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:25:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts +// src/react/hooks/useBackgroundQuery.ts:26:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts +// src/react/hooks/useBackgroundQuery.ts:27:3 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package)