diff --git a/.api-reports/api-report-cache.api.md b/.api-reports/api-report-cache.api.md index 0bdf4326705..0e7551ac5dc 100644 --- a/.api-reports/api-report-cache.api.md +++ b/.api-reports/api-report-cache.api.md @@ -4,14 +4,33 @@ ```ts +import type { ApolloCache as ApolloCache_2 } from '@apollo/client'; +import type { AsStoreObject } from '@apollo/client/utilities'; +import { canonicalStringify } from '@apollo/client/utilities'; +import type { DataValue } from '@apollo/client'; +import type { DeepPartial } from '@apollo/client/utilities'; import type { DocumentNode } from 'graphql'; +import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import type { FieldNode } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; +import type { FragmentMap } from '@apollo/client/utilities/internal'; +import type { FragmentMapFunction } from '@apollo/client/utilities/internal'; +import type { FragmentType } from '@apollo/client/masking'; +import { getApolloCacheMemoryInternals } from '@apollo/client/utilities/internal'; +import type { GetDataState } from '@apollo/client'; +import { getInMemoryCacheMemoryInternals } from '@apollo/client/utilities/internal'; import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; +import { isReference } from '@apollo/client/utilities'; +import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; +import { Observable } from 'rxjs'; +import type { OperationVariables } from '@apollo/client'; +import { Reference } from '@apollo/client/utilities'; import type { SelectionSetNode } from 'graphql'; +import type { StoreObject } from '@apollo/client/utilities'; +import type { StoreValue } from '@apollo/client/utilities'; import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode } from '@apollo/client'; +import type { Unmasked } from '@apollo/client/masking'; // Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts // @@ -19,23 +38,38 @@ import { TypedDocumentNode } from '@graphql-typed-document-node/core'; type AllFieldsModifier> = Modifier> : never>; // @public (undocumented) -export abstract class ApolloCache implements DataProxy { +export namespace ApolloCache { + export interface WatchFragmentOptions { + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + from: StoreObject | Reference | FragmentType> | string; + optimistic?: boolean; + variables?: TVariables; + } + export type WatchFragmentResult = ({ + complete: true; + missing?: never; + } & GetDataState) | ({ + complete: false; + missing: MissingTree; + } & GetDataState); +} + +// @public (undocumented) +export abstract class ApolloCache { // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; + abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; + abstract extract(optimistic?: boolean): unknown; // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; + abstract fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal + // @internal @deprecated getMemoryInternals?: typeof getApolloCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; @@ -44,53 +78,43 @@ export abstract class ApolloCache implements DataProxy { // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; + abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; + abstract read(query: Cache_2.ReadOptions): Unmasked | null; + readFragment({ fragment, variables, fragmentName, id, optimistic, returnPartialData, }: Cache_2.ReadFragmentOptions): Unmasked | null; // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; + readFragment(options: Cache_2.ReadFragmentOptions, + optimistic: boolean): Unmasked | null; + readQuery({ query, variables, id, optimistic, returnPartialData, }: Cache_2.ReadQueryOptions): Unmasked | null; + readQuery(options: Cache_2.ReadQueryOptions, + optimistic: boolean): Unmasked | null; // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; + recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; // (undocumented) abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; + abstract restore(serializedState: unknown): this; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) transformForLink(document: DocumentNode): DocumentNode; // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; + abstract watch(watch: Cache_2.WatchOptions): () => void; + watchFragment(options: ApolloCache.WatchFragmentOptions): Observable>>; // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; + abstract write(write: Cache_2.WriteOptions): Reference | undefined; + writeFragment({ data, fragment, fragmentName, variables, overwrite, id, broadcast, }: Cache_2.WriteFragmentOptions): Reference | undefined; + writeQuery({ data, query, variables, overwrite, id, broadcast, }: Cache_2.WriteQueryOptions): Reference | undefined; } // @public (undocumented) export type ApolloReducerConfig = { dataIdFromObject?: KeyFieldsFunction; - addTypename?: boolean; -}; - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; }; // @public (undocumented) @@ -99,7 +123,7 @@ type BroadcastOptions = Pick, "optimistic" | // @public (undocumented) namespace Cache_2 { // (undocumented) - interface BatchOptions, TUpdateResult = void> { + interface BatchOptions { // (undocumented) onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) @@ -110,9 +134,21 @@ namespace Cache_2 { update(cache: TCache): TUpdateResult; } // (undocumented) - interface DiffOptions extends Omit, "rootId"> { + interface DiffOptions extends Omit, "rootId"> { } // (undocumented) + type DiffResult = { + result: DataValue.Complete; + complete: true; + missing?: never; + fromOptimisticTransaction?: boolean; + } | { + result: DataValue.Partial | null; + complete: false; + missing?: MissingFieldError; + fromOptimisticTransaction?: boolean; + }; + // (undocumented) interface EvictOptions { // (undocumented) args?: Record; @@ -137,17 +173,35 @@ namespace Cache_2 { optimistic?: boolean; } // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; + interface ReadFragmentOptions { + fragment: DocumentNode_2 | TypedDocumentNode; + fragmentName?: string; + id?: string; + optimistic?: boolean; + returnPartialData?: boolean; + variables?: TVariables; + } + // (undocumented) + interface ReadOptions { + id?: string; // (undocumented) optimistic: boolean; // (undocumented) previousResult?: any; + query: DocumentNode_2 | TypedDocumentNode; // (undocumented) returnPartialData?: boolean; // (undocumented) rootId?: string; + variables?: TVariables; + } + // (undocumented) + interface ReadQueryOptions { + id?: string; + optimistic?: boolean; + query: DocumentNode_2 | TypedDocumentNode; + returnPartialData?: boolean; + variables?: TVariables; } // (undocumented) interface ResetOptions { @@ -155,9 +209,15 @@ namespace Cache_2 { discardWatches?: boolean; } // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; + interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { + } // (undocumented) - interface WatchOptions extends DiffOptions { + interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { + } + // (undocumented) + type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; + // (undocumented) + interface WatchOptions extends DiffOptions { // (undocumented) callback: WatchCallback; // (undocumented) @@ -168,20 +228,35 @@ namespace Cache_2 { watcher?: object; } // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { + interface WriteFragmentOptions { + broadcast?: boolean; + data: Unmasked; + fragment: DocumentNode_2 | TypedDocumentNode; + fragmentName?: string; + id?: string; + overwrite?: boolean; + variables?: TVariables; + } + // (undocumented) + interface WriteOptions { + broadcast?: boolean; // (undocumented) dataId?: string; + overwrite?: boolean; + query: DocumentNode_2 | TypedDocumentNode; // (undocumented) - result: Unmasked; + result: Unmasked; + variables?: TVariables; + } + // (undocumented) + interface WriteQueryOptions { + broadcast?: boolean; + data: Unmasked; + id?: string; + overwrite?: boolean; + query: DocumentNode_2 | TypedDocumentNode; + variables?: TVariables; } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; } export { Cache_2 as Cache } @@ -204,150 +279,18 @@ class CacheGroup { export const cacheSlot: { readonly id: string; hasValue(): boolean; - getValue(): ApolloCache | undefined; - withValue(value: ApolloCache, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult; + getValue(): ApolloCache_2 | undefined; + withValue(value: ApolloCache_2, callback: (this: TThis, ...args: TArgs) => TResult, args?: TArgs | undefined, thisArg?: TThis | undefined): TResult; }; -// @public -export const canonicalStringify: ((value: any) => string) & { - reset(): void; -}; +export { canonicalStringify } // @public (undocumented) type CanReadFunction = (value: StoreValue) => boolean; -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - // @public (undocumented) export function createFragmentRegistry(...fragments: DocumentNode[]): FragmentRegistryAPI; -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -export namespace DataProxy { - // (undocumented) - export type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - export interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - export interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // (undocumented) - export interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // (undocumented) - export interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - export interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - export interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // (undocumented) - export interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -export interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - // Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) @@ -367,9 +310,6 @@ export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { returnPartialData?: boolean; }; -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - // @public (undocumented) export abstract class EntityStore implements NormalizedCache { constructor(policies: Policies, group: CacheGroup); @@ -416,14 +356,14 @@ export abstract class EntityStore implements NormalizedCache { // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; + makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined): object; makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; // (undocumented) - modify(dataId: string, fields: Modifier | Modifiers>): boolean; + modify(dataId: string, fields: Modifier | Modifiers>, exact: boolean): boolean; // (undocumented) readonly policies: Policies; // (undocumented) @@ -434,6 +374,12 @@ export abstract class EntityStore implements NormalizedCache { replace(newData: NormalizedCacheObject | null): void; // (undocumented) retain(rootId: string): number; + // Warning: (ae-forgotten-export) The symbol "Root" needs to be exported by the entry point index.d.ts + // + // (undocumented) + static Root: typeof Root; + // (undocumented) + get supportsResultCaching(): boolean; // (undocumented) toObject(): NormalizedCacheObject; // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts @@ -443,41 +389,7 @@ export abstract class EntityStore implements NormalizedCache { } // @public (undocumented) -export namespace EntityStore { - // (undocumented) - export class Root extends EntityStore { - constructor({ policies, resultCaching, seed, }: { - policies: Policies; - resultCaching?: boolean; - seed?: NormalizedCacheObject; - }); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - removeLayer(): Root; - // (undocumented) - readonly storageTrie: Trie; - // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly stump: Stump; - } -} - -// @public (undocumented) -type Exact = (x: T) => T; - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -export interface FieldFunctionOptions, TVars = Record> { +export interface FieldFunctionOptions, TVariables extends OperationVariables = Record> { // (undocumented) args: TArgs | null; // (undocumented) @@ -505,7 +417,7 @@ export interface FieldFunctionOptions, TVars = Recor // (undocumented) toReference: ToReferenceFunction; // (undocumented) - variables?: TVars; + variables?: TVariables; } // @public (undocumented) @@ -546,15 +458,6 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; - // @public (undocumented) export interface FragmentRegistryAPI { // (undocumented) @@ -567,44 +470,6 @@ export interface FragmentRegistryAPI { transform(document: D): D; } -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getInMemoryCacheMemoryInternals: (() => { - addTypenameDocumentTransform: { - cache: number; - }[]; - inMemoryCache: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - }; - fragmentRegistry: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - }; - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - // @public (undocumented) export type IdGetter = (value: IdGetterObj) => string | undefined; @@ -619,7 +484,16 @@ export interface IdGetterObj extends Object { } // @public (undocumented) -export class InMemoryCache extends ApolloCache { +export interface IgnoreModifier { + // (undocumented) + [_ignoreModifier]: true; +} + +// @public (undocumented) +const _ignoreModifier: unique symbol; + +// @public (undocumented) +export class InMemoryCache extends ApolloCache { constructor(config?: InMemoryCacheConfig); // (undocumented) readonly assumeImmutableResults = true; @@ -632,21 +506,18 @@ export class InMemoryCache extends ApolloCache { // (undocumented) protected config: InMemoryCacheConfig; // (undocumented) - diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; + diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) evict(options: Cache_2.EvictOptions): boolean; // (undocumented) extract(optimistic?: boolean): NormalizedCacheObject; // (undocumented) - fragmentMatches(fragment: InlineFragmentNode, typename: string): boolean; + fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(options?: { resetResultCache?: boolean; - resetResultIdentities?: boolean; }): string[]; - // Warning: (ae-forgotten-export) The symbol "getInMemoryCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal + // @internal @deprecated getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; @@ -661,7 +532,11 @@ export class InMemoryCache extends ApolloCache { // (undocumented) readonly policies: Policies; // (undocumented) - read(options: Cache_2.ReadOptions): T | null; + read(options: Cache_2.ReadOptions & { + returnPartialData: true; + }): TData | DeepPartial | null; + // (undocumented) + read(options: Cache_2.ReadOptions): TData | null; // (undocumented) release(rootId: string, optimistic?: boolean): number; // (undocumented) @@ -675,21 +550,17 @@ export class InMemoryCache extends ApolloCache { // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) - watch(watch: Cache_2.WatchOptions): () => void; + watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) - write(options: Cache_2.WriteOptions): Reference | undefined; + write(options: Cache_2.WriteOptions): Reference | undefined; } // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { - // @deprecated - canonizeResults?: boolean; // (undocumented) fragments?: FragmentRegistryAPI; // (undocumented) possibleTypes?: PossibleTypesMap; - // @deprecated (undocumented) - resultCacheMaxSize?: number; // (undocumented) resultCaching?: boolean; // (undocumented) @@ -705,11 +576,7 @@ interface InvalidateModifier { // @public (undocumented) const _invalidateModifier: unique symbol; -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -export function isReference(obj: any): obj is Reference; +export { isReference } // @public (undocumented) type KeyArgsFunction = (args: Record | null, context: { @@ -743,7 +610,7 @@ class Layer extends EntityStore { // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) - getStorage(): StorageType; + getStorage(...args: Parameters): StorageType; // (undocumented) readonly group: CacheGroup; // (undocumented) @@ -758,24 +625,9 @@ class Layer extends EntityStore { toObject(): NormalizedCacheObject; } -// @public (undocumented) -export function makeReference(id: string): Reference; - // @public (undocumented) export function makeVar(value: T): ReactiveVar; -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - // @public (undocumented) export interface MergeInfo { // (undocumented) @@ -786,19 +638,6 @@ export interface MergeInfo { typename: string | undefined; } -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - // @public (undocumented) type MergeObjectsFunction = (existing: T, incoming: T) => T; @@ -810,22 +649,6 @@ export interface MergeTree { map: Map; } -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - // @public (undocumented) export class MissingFieldError extends Error { constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); @@ -870,9 +693,6 @@ export type Modifiers = Record> = [FieldName in keyof T]: Modifier>>; }>; -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - // @public export interface NormalizedCache { // (undocumented) @@ -896,7 +716,7 @@ export interface NormalizedCache { // (undocumented) merge(olderObject: StoreObject, newerId: string): void; // (undocumented) - modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; + modify>(dataId: string, fields: Modifiers | AllFieldsModifier, exact: boolean): boolean; // (undocumented) release(rootId: string): number; replace(newData: NormalizedCacheObject): void; @@ -916,14 +736,11 @@ export interface NormalizedCacheObject { }; } -// @public (undocumented) -type OperationVariables = Record; - // @public (undocumented) export type OptimisticStoreItem = { id: string; data: NormalizedCacheObject; - transaction: Transaction; + transaction: Transaction; }; // @public (undocumented) @@ -971,14 +788,6 @@ export type PossibleTypesMap = { [supertype: string]: string[]; }; -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - // @public (undocumented) type ReactiveListener = (value: T) => any; @@ -987,9 +796,9 @@ export interface ReactiveVar { // (undocumented) (newValue?: T): T; // (undocumented) - attachCache(cache: ApolloCache): this; + attachCache(cache: ApolloCache_2): this; // (undocumented) - forgetCache(cache: ApolloCache): boolean; + forgetCache(cache: ApolloCache_2): boolean; // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -1015,7 +824,7 @@ export interface ReadMergeModifyContext { // (undocumented) store: NormalizedCache; // (undocumented) - variables?: Record; + variables?: OperationVariables; // (undocumented) varString?: string; } @@ -1026,71 +835,62 @@ export type ReadQueryOptions = { query: DocumentNode; variables?: Object; previousResult?: any; - canonizeResults?: boolean; rootId?: string; config?: ApolloReducerConfig; }; +export { Reference } + // @public (undocumented) -export interface Reference { +class Root extends EntityStore { + constructor({ policies, resultCaching, seed, }: { + policies: Policies; + resultCaching?: boolean; + seed?: NormalizedCacheObject; + }); + // (undocumented) + addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; + // (undocumented) + getStorage(): StorageType; + // (undocumented) + removeLayer(): Root; + // (undocumented) + readonly storageTrie: Trie; + // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts + // // (undocumented) - readonly __ref: string; + readonly stump: Stump; } -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - // @public (undocumented) type SafeReadonly = T extends object ? Readonly : T; // @public (undocumented) type StorageType = Record; -// @public (undocumented) -export interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} +export { StoreObject } -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// // @public (undocumented) type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ Item ] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; -// @public (undocumented) -export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; +export { StoreValue } // @public (undocumented) class Stump extends Layer { - constructor(root: EntityStore.Root); + constructor(root: Root); // (undocumented) merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) removeLayer(): this; } -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - // @public (undocumented) type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; // @public (undocumented) -export type Transaction = (c: ApolloCache) => void; +export type Transaction = (c: ApolloCache) => void; // @public (undocumented) export type TypePolicies = { @@ -1109,44 +909,11 @@ export type TypePolicy = { }; }; -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; +// @public @deprecated (undocumented) +export type WatchFragmentOptions = ApolloCache_2.WatchFragmentOptions; -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public -export interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -export type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; +// @public @deprecated (undocumented) +export type WatchFragmentResult = ApolloCache_2.WatchFragmentResult; // @public (undocumented) interface WriteContext extends ReadMergeModifyContext { @@ -1166,8 +933,6 @@ interface WriteContext extends ReadMergeModifyContext { mergeTree?: MergeTree; fieldNodeSet: Set; }>; - // Warning: (ae-forgotten-export) The symbol "FragmentMapFunction" needs to be exported by the entry point index.d.ts - // // (undocumented) lookupFragment: FragmentMapFunction; // (undocumented) @@ -1182,11 +947,9 @@ interface WriteContext extends ReadMergeModifyContext { // Warnings were encountered during analysis: // -// src/cache/core/cache.ts:96:7 - (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:93:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// 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:134:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-core.api.md b/.api-reports/api-report-core.api.md index 37c4aecb597..3d41dcda5c1 100644 --- a/.api-reports/api-report-core.api.md +++ b/.api-reports/api-report-core.api.md @@ -4,1635 +4,583 @@ ```ts -import type { ASTNode } from 'graphql'; +import { ApolloCache } from '@apollo/client/cache'; +import { ApolloLink } from '@apollo/client/link'; +import { ApolloPayloadResult } from '@apollo/client/link'; +import { ApolloReducerConfig } from '@apollo/client/cache'; +import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; +import { Cache as Cache_2 } from '@apollo/client/cache'; +import { checkFetcher } from '@apollo/client/link/http'; +import type { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; +import { CombinedGraphQLErrors } from '@apollo/client/errors'; +import { CombinedProtocolErrors } from '@apollo/client/errors'; +import { concat } from '@apollo/client/link'; +import { createHttpLink } from '@apollo/client/link/http'; +import { createSignalIfSupported } from '@apollo/client/link/http'; +import type { DeepPartial } from '@apollo/client/utilities'; +import { defaultDataIdFromObject } from '@apollo/client/cache'; +import { defaultPrinter } from '@apollo/client/link/http'; +import { DiffQueryAgainstStoreOptions } from '@apollo/client/cache'; import { disableExperimentalFragmentVariables } from 'graphql-tag'; import { disableFragmentWarnings } from 'graphql-tag'; -import type { DocumentNode } from 'graphql'; +import { DocumentNode } from '@apollo/client/link'; +import type { DocumentNode as DocumentNode_2 } from 'graphql'; +import { DocumentTransform } from '@apollo/client/utilities'; +import { DocumentTransformCacheKey } from '@apollo/client/utilities'; +import { empty } from '@apollo/client/link'; import { enableExperimentalFragmentVariables } from 'graphql-tag'; -import type { FieldNode } from 'graphql'; +import { execute } from '@apollo/client/link'; +import { fallbackHttpConfig } from '@apollo/client/link/http'; +import { FetchResult } from '@apollo/client/link'; +import { FieldFunctionOptions } from '@apollo/client/cache'; +import { FieldMergeFunction } from '@apollo/client/cache'; +import { FieldPolicy } from '@apollo/client/cache'; +import { FieldReadFunction } from '@apollo/client/cache'; import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; +import { FragmentType } from '@apollo/client/masking'; +import { from } from '@apollo/client/link'; +import { getApolloClientMemoryInternals } from '@apollo/client/utilities/internal'; import { gql } from 'graphql-tag'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { InvariantError } from 'ts-invariant'; -import { Observable } from 'zen-observable-ts'; -import type { Subscription as ObservableSubscription } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import { GraphQLRequest } from '@apollo/client/link'; +import type { HKT } from '@apollo/client/utilities'; +import { HttpLink } from '@apollo/client/link/http'; +import { IdGetter } from '@apollo/client/cache'; +import { IdGetterObj } from '@apollo/client/cache'; +import type { IgnoreModifier } from '@apollo/client/cache'; +import type { Incremental } from '@apollo/client/incremental'; +import { InMemoryCache } from '@apollo/client/cache'; +import { InMemoryCacheConfig } from '@apollo/client/cache'; +import type { InteropObservable } from 'rxjs'; +import type { IsAny } from '@apollo/client/utilities/internal'; +import { isReference } from '@apollo/client/utilities'; +import { LinkError } from '@apollo/client/errors'; +import type { LocalState } from '@apollo/client/local-state'; +import { LocalStateError } from '@apollo/client/errors'; +import { makeVar } from '@apollo/client/cache'; +import { MaybeMasked } from '@apollo/client/masking'; +import { MergeInfo } from '@apollo/client/cache'; +import { MergeTree } from '@apollo/client/cache'; +import { MissingFieldError } from '@apollo/client/cache'; +import type { NextNotification } from 'rxjs'; +import { NormalizedCache } from '@apollo/client/cache'; +import { NormalizedCacheObject } from '@apollo/client/cache'; +import { Observable } from '@apollo/client/utilities'; +import { Observable as Observable_2 } from 'rxjs'; +import type { ObservableNotification } from 'rxjs'; +import type { Observer } from 'rxjs'; +import { Operation } from '@apollo/client/link'; +import { OperationTypeNode } from 'graphql'; +import { OptimisticStoreItem } from '@apollo/client/cache'; +import { parseAndCheckHttpResponse } from '@apollo/client/link/http'; +import { PossibleTypesMap } from '@apollo/client/cache'; +import { ReactiveVar } from '@apollo/client/cache'; +import { ReadMergeModifyContext } from '@apollo/client/cache'; +import { ReadQueryOptions } from '@apollo/client/cache'; +import { Reference } from '@apollo/client/utilities'; +import type { Reference as Reference_2 } from '@apollo/client/cache'; +import { RequestHandler } from '@apollo/client/link'; import { resetCaches } from 'graphql-tag'; -import type { SelectionSetNode } from 'graphql'; -import { setVerbosity as setLogVerbosity } from 'ts-invariant'; -import type { Subscriber } from 'zen-observable-ts'; +import { rewriteURIForGET } from '@apollo/client/link/http'; +import { selectHttpOptionsAndBody } from '@apollo/client/link/http'; +import { selectHttpOptionsAndBodyInternal } from '@apollo/client/link/http'; +import { selectURI } from '@apollo/client/link/http'; +import { ServerError } from '@apollo/client/errors'; +import { ServerParseError } from '@apollo/client/errors'; +import { setVerbosity as setLogVerbosity } from '@apollo/client/utilities/invariant'; +import { split } from '@apollo/client/link'; +import { StoreObject } from '@apollo/client/utilities'; +import { StoreValue } from '@apollo/client/cache'; +import type { Subscribable } from 'rxjs'; +import type { Subscription } from 'rxjs'; +import { Transaction } from '@apollo/client/cache'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import { TypePolicies } from '@apollo/client/cache'; +import { TypePolicy } from '@apollo/client/cache'; +import { UnconventionalError } from '@apollo/client/errors'; +import { Unmasked } from '@apollo/client/masking'; +import type { VariablesOption } from '@apollo/client/utilities/internal'; +import { WatchFragmentOptions } from '@apollo/client/cache'; +import { WatchFragmentResult } from '@apollo/client/cache'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; +export { ApolloCache } // @public (undocumented) -export abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; +export namespace ApolloClient { // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; + export namespace Base { + // (undocumented) + export interface ReadQueryOptions { + id?: string; + optimistic?: boolean; + query: DocumentNode_2 | TypedDocumentNode; + returnPartialData?: boolean; + } + } // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; + export namespace Base { + // (undocumented) + export interface ReadFragmentOptions { + fragment: DocumentNode_2 | TypedDocumentNode; + fragmentName?: string; + id?: string; + optimistic?: boolean; + returnPartialData?: boolean; + } + } // (undocumented) - identify(object: StoreObject | Reference): string | undefined; + export namespace Base { + // (undocumented) + export interface WriteQueryOptions { + broadcast?: boolean; + data: Unmasked; + id?: string; + overwrite?: boolean; + query: DocumentNode_2 | TypedDocumentNode; + } + } // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; + export namespace Base { + // (undocumented) + export interface WriteFragmentOptions { + broadcast?: boolean; + data: Unmasked; + fragment: DocumentNode_2 | TypedDocumentNode; + fragmentName?: string; + id?: string; + overwrite?: boolean; + } + } // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; + export interface DefaultOptions { + // (undocumented) + mutate?: Partial>; + // (undocumented) + query?: Partial>; + // (undocumented) + watchQuery?: Partial>; + } // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; + export interface DevtoolsOptions { + enabled?: boolean; + name?: string; + } // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; + export namespace DocumentationTypes { + // (undocumented) + export interface ReadQueryOptions extends Base.ReadQueryOptions { + variables?: TVariables; + } + } // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; + export namespace DocumentationTypes { + // (undocumented) + export interface WriteQueryOptions extends Base.WriteQueryOptions { + variables?: TVariables; + } + } // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; + export namespace DocumentationTypes { + // (undocumented) + export interface WriteQueryOptions extends Base.WriteQueryOptions { + variables?: TVariables; + } + } // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; + export namespace DocumentationTypes { + // (undocumented) + export interface WriteFragmentOptions extends Base.WriteFragmentOptions { + variables?: TVariables; + } + } // (undocumented) - abstract removeOptimistic(id: string): void; + export type MutateOptions = { + optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked> | IgnoreModifier); + updateQueries?: MutationQueryReducersMap; + refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; + awaitRefetchQueries?: boolean; + update?: MutationUpdaterFunction; + onQueryUpdated?: OnQueryUpdated; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: MutationFetchPolicy; + keepRootFields?: boolean; + mutation: DocumentNode_2 | TypedDocumentNode; + } & VariablesOption>; // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; + export interface MutateResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; + } // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; + export interface Options { + assumeImmutableResults?: boolean; + cache: ApolloCache; + // (undocumented) + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + dataMasking?: boolean; + // (undocumented) + defaultContext?: Partial; + defaultOptions?: ApolloClient.DefaultOptions; + devtools?: DevtoolsOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; + incrementalHandler?: Incremental.Handler; + link: ApolloLink; + // (undocumented) + localState?: LocalState; + queryDeduplication?: boolean; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + } + export type QueryOptions = { + query: DocumentNode_2 | TypedDocumentNode; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: FetchPolicy; + } & VariablesOption>; + // (undocumented) + export interface QueryResult { + data: TData | undefined; + error?: ErrorLike; + } // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; + export type ReadFragmentOptions = Base.ReadFragmentOptions & VariablesOption; // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + export type ReadQueryOptions = Base.ReadQueryOptions & VariablesOption; + export interface RefetchQueriesOptions { + include?: RefetchQueriesInclude; + onQueryUpdated?: OnQueryUpdated | null; + optimistic?: boolean; + updateCache?: (cache: TCache) => void; + } + export interface RefetchQueriesResult extends Promise>, RefetchQueriesResult.AdditionalProperties { + } // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + export namespace RefetchQueriesResult { + // (undocumented) + export interface AdditionalProperties { + queries: ObservableQuery[]; + results: InternalRefetchQueriesResult[]; + } + } // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - watchFragment(options: WatchFragmentOptions): Observable>; + export type SubscribeOptions = { + query: DocumentNode_2 | TypedDocumentNode; + fetchPolicy?: FetchPolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + extensions?: Record; + } & VariablesOption>; + // (undocumented) + export interface SubscribeResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; + } // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; + export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; + // (undocumented) + export type WatchFragmentResult = ApolloCache.WatchFragmentResult; + export type WatchQueryOptions = { + fetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + initialFetchPolicy?: WatchQueryFetchPolicy; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode_2 | TypedDocumentNode; + } & VariablesOption>; // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; + export type WriteFragmentOptions = Base.WriteFragmentOptions & VariablesOption; // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; + export type WriteQueryOptions = Base.WriteQueryOptions & VariablesOption; } // @public -export class ApolloClient implements DataProxy { +export class ApolloClient { // (undocumented) __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); + constructor(options: ApolloClient.Options); // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; + __requestRaw(request: ApolloLink.Request): Observable_2>; // (undocumented) - cache: ApolloCache; + cache: ApolloCache; clearStore(): Promise; // (undocumented) get defaultContext(): Partial; // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; + readonly devtoolsConfig: ApolloClient.DevtoolsOptions; // @deprecated (undocumented) - disableNetworkFetches: boolean; + disableNetworkFetches: never; get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts + extract(optimistic?: boolean): unknown; getMemoryInternals?: typeof getApolloClientMemoryInternals; - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; + getObservableQueries(include?: RefetchQueriesInclude): Set>; // (undocumented) link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; + get localState(): LocalState | undefined; + set localState(localState: LocalState); + mutate(options: ApolloClient.MutateOptions): Promise>>; onClearStore(cb: () => Promise): () => void; onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; set prioritizeCacheValues(value: boolean); - query(options: QueryOptions): Promise>>; + get prioritizeCacheValues(): boolean; + query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; + readFragment(options: ApolloClient.ReadFragmentOptions): Unmasked | null; + // @deprecated + readFragment(options: ApolloClient.ReadFragmentOptions, optimistic: boolean): Unmasked | null; + readQuery(options: ApolloClient.ReadQueryOptions): Unmasked | null; // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; + readQuery(options: ApolloClient.ReadQueryOptions, + optimistic: boolean): Unmasked | null; // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; + reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; + refetchObservableQueries(includeStandby?: boolean): Promise[]>; + refetchQueries>>(options: ApolloClient.RefetchQueriesOptions): ApolloClient.RefetchQueriesResult; + resetStore(): Promise[] | null>; + restore(serializedState: unknown): ApolloCache; + setLink(newLink: ApolloLink): void; stop(): void; - subscribe(options: SubscriptionOptions): Observable>>; - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; + subscribe(options: ApolloClient.SubscribeOptions): SubscriptionObservable>>; // (undocumented) version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; + watchFragment(options: ApolloClient.WatchFragmentOptions): Observable_2>>; + watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; + writeFragment(options: ApolloClient.WriteFragmentOptions): Reference_2 | undefined; + writeQuery(options: ApolloClient.WriteQueryOptions): Reference_2 | undefined; } -// @public (undocumented) -export interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} +// @public @deprecated (undocumented) +export type ApolloClientOptions = ApolloClient.Options; -// @public (undocumented) -export class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} +export { ApolloLink } -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} +export { ApolloPayloadResult } -// @public (undocumented) -export class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} +// @public @deprecated (undocumented) +export type ApolloQueryResult["dataState"] = DataState["dataState"]> = ObservableQuery.Result; -// @public (undocumented) -export interface ApolloPayloadResult, TExtensions = Record> { - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - payload: SingleExecutionResult | ExecutionPatchResult | null; -} +export { ApolloReducerConfig } // @public (undocumented) -export interface ApolloQueryResult { - data: T; - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} +export const build: "source" | "esm" | "cjs"; -// @public (undocumented) -export type ApolloReducerConfig = { - dataIdFromObject?: KeyFieldsFunction; - addTypename?: boolean; -}; +export { Cache_2 as Cache } -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; +export { checkFetcher } -// @public (undocumented) -interface Body_2 { - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query?: string; - // (undocumented) - variables?: Record; -} +export { CombinedGraphQLErrors } -// @public (undocumented) -type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; +export { CombinedProtocolErrors } + +export { concat } + +export { createHttpLink } + +export { createSignalIfSupported } // @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // (undocumented) - interface WatchOptions extends DiffOptions { - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} -export { Cache_2 as Cache } +export type DataState = { + data: DataValue.Complete; + dataState: "complete"; +} | { + data: DataValue.Streaming; + dataState: "streaming"; +} | { + data: DataValue.Partial; + dataState: "partial"; +} | { + data: undefined; + dataState: "empty"; +}; // @public (undocumented) -class CacheGroup { - constructor(caching: boolean, parent?: CacheGroup | null); - // (undocumented) - readonly caching: boolean; - // (undocumented) - depend(dataId: string, storeFieldName: string): void; - // (undocumented) - dirty(dataId: string, storeFieldName: string): void; - // (undocumented) - keyMaker: Trie; - // (undocumented) - resetCaching(): void; +export namespace DataValue { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + export type Complete = ApplyHKTImplementationWithDefault; + export type Partial = ApplyHKTImplementationWithDefault; + export type Streaming = ApplyHKTImplementationWithDefault; } // @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, +export interface DefaultContext extends Record { // (undocumented) - OVERWRITE = 1 + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + queryDeduplication?: boolean; } -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; +export { defaultDataIdFromObject } -// @public (undocumented) -export const checkFetcher: (fetcher: typeof fetch | undefined) => void; +// @public @deprecated (undocumented) +export type DefaultOptions = ApolloClient.DefaultOptions; -// @public (undocumented) -export type ClientParseError = InvariantError & { - parseError: Error; -}; +export { defaultPrinter } -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; +// @public @deprecated (undocumented) +export type DevtoolsOptions = ApolloClient.DevtoolsOptions; -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; +export { DiffQueryAgainstStoreOptions } -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} +export { disableExperimentalFragmentVariables } -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; +export { disableFragmentWarnings } -// @public (undocumented) -export const concat: typeof ApolloLink.concat; +export { DocumentNode } -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; +export { DocumentTransform } -// @public (undocumented) -export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; +export { DocumentTransformCacheKey } -// @public @deprecated (undocumented) -export const createSignalIfSupported: () => { - controller: boolean; - signal: boolean; -} | { - controller: AbortController; - signal: AbortSignal; -}; +export { empty } -// @public (undocumented) -export interface DataMasking { -} +export { enableExperimentalFragmentVariables } -// @public (undocumented) -export namespace DataProxy { - // (undocumented) - export type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - export interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - export interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // (undocumented) - export interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // (undocumented) - export interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - export interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - export interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } +// @public +export interface ErrorLike { // (undocumented) - export interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -export interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -export interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function defaultDataIdFromObject({ __typename, id, _id }: Readonly, context?: KeyFieldsContext): string | undefined; - -// @public (undocumented) -export interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const defaultPrinter: Printer; - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { - returnPartialData?: boolean; -}; - -export { disableExperimentalFragmentVariables } - -export { disableFragmentWarnings } - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -export { DocumentNode } - -// @public (undocumented) -export class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -export type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public (undocumented) -export const empty: typeof ApolloLink.empty; - -export { enableExperimentalFragmentVariables } - -// @public (undocumented) -abstract class EntityStore implements NormalizedCache { - constructor(policies: Policies, group: CacheGroup); - // Warning: (ae-forgotten-export) The symbol "Layer" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // Warning: (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // (undocumented) - protected data: NormalizedCacheObject; - // (undocumented) - delete(dataId: string, fieldName?: string, args?: Record): boolean; - // (undocumented) - evict(options: Cache_2.EvictOptions, limit: EntityStore): boolean; - // (undocumented) - extract(): NormalizedCacheObject; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - gc(): string[]; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: (objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly; - // (undocumented) - getRootIdSet(ids?: Set): Set; - // Warning: (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // Warning: (ae-forgotten-export) The symbol "CacheGroup" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // @deprecated (undocumented) - makeCacheKey(...args: any[]): object; - // (undocumented) - merge(older: string | StoreObject, newer: StoreObject | string): void; - // (undocumented) - modify(dataId: string, fields: Modifier | Modifiers>): boolean; - // Warning: (ae-forgotten-export) The symbol "Policies" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly policies: Policies; - // (undocumented) - release(rootId: string): number; - // (undocumented) - abstract removeLayer(layerId: string): EntityStore; - // (undocumented) - replace(newData: NormalizedCacheObject | null): void; - // (undocumented) - retain(rootId: string): number; - // (undocumented) - toObject(): NormalizedCacheObject; - // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - toReference: ToReferenceFunction; -} - -// @public (undocumented) -namespace EntityStore { - // (undocumented) - class Root extends EntityStore { - constructor({ policies, resultCaching, seed, }: { - policies: Policies; - resultCaching?: boolean; - seed?: NormalizedCacheObject; - }); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - removeLayer(): Root; - // (undocumented) - readonly storageTrie: Trie; - // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly stump: Stump; - } -} - -// @public -export type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// @public (undocumented) -export const execute: typeof ApolloLink.execute; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -export interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -export type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -export const fallbackHttpConfig: { - http: HttpQueryOptions; - headers: { - accept: string; - "content-type": string; - }; - options: { - method: string; - }; -}; - -// @public (undocumented) -export interface FetchMoreOptions { - // (undocumented) - updateQuery?: (previousQueryResult: TData, options: { - fetchMoreResult?: TData; - variables?: TVariables; - }) => TData; -} - -// @public (undocumented) -export interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// @public (undocumented) -export type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -export interface FieldFunctionOptions, TVars = Record> { - // (undocumented) - args: TArgs | null; - // (undocumented) - cache: InMemoryCache; - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - field: FieldNode | null; - // (undocumented) - fieldName: string; - // (undocumented) - isReference: typeof isReference; - // Warning: (ae-forgotten-export) The symbol "MergeObjectsFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - mergeObjects: MergeObjectsFunction; - // Warning: (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField: ReadFieldFunction; - // (undocumented) - storage: StorageType; - // (undocumented) - storeFieldName: string; - // (undocumented) - toReference: ToReferenceFunction; - // (undocumented) - variables?: TVars; -} - -// @public (undocumented) -export type FieldMergeFunction = (existing: SafeReadonly | undefined, incoming: SafeReadonly, options: TOptions) => SafeReadonly; - -// @public (undocumented) -export type FieldPolicy = { - keyArgs?: KeySpecifier | KeyArgsFunction | false; - read?: FieldReadFunction; - merge?: FieldMergeFunction | boolean; -}; - -// @public (undocumented) -export type FieldReadFunction = (existing: SafeReadonly | undefined, options: TOptions) => TReadResult | undefined; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// Warning: (ae-forgotten-export) The symbol "EntityStore" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FieldValueGetter = EntityStore["getFieldValue"]; - -// Warning: (ae-forgotten-export) The symbol "WriteContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FlavorableWriteContext = Pick; - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; - -// @public (undocumented) -export type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -interface FragmentRegistryAPI { - // (undocumented) - lookup(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - register(...fragments: DocumentNode[]): this; - // (undocumented) - resetCaches(): void; - // (undocumented) - transform(document: D): D; -} - -// @public (undocumented) -export type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @public (undocumented) -export const from: typeof ApolloLink.from; - -// @public @deprecated (undocumented) -export function fromError(errorValue: any): Observable; - -// @public @deprecated (undocumented) -export function fromPromise(promise: Promise): Observable; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @internal -const getInMemoryCacheMemoryInternals: (() => { - addTypenameDocumentTransform: { - cache: number; - }[]; - inMemoryCache: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - }; - fragmentRegistry: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - }; - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -export { gql } - -// @public (undocumented) -export interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface HttpConfig { - // (undocumented) - credentials?: any; - // (undocumented) - headers?: Record; - // (undocumented) - http?: HttpQueryOptions; - // (undocumented) - options?: any; -} - -// @public (undocumented) -export class HttpLink extends ApolloLink { - constructor(options?: HttpOptions); - // (undocumented) - options: HttpOptions; -} - -// @public (undocumented) -export interface HttpOptions { - credentials?: string; - fetch?: typeof fetch; - fetchOptions?: any; - headers?: Record; - includeExtensions?: boolean; - includeUnusedVariables?: boolean; - preserveHeaderCase?: boolean; - print?: Printer; - uri?: string | UriFunction; - useGETForQueries?: boolean; -} - -// @public (undocumented) -interface HttpQueryOptions { - // (undocumented) - includeExtensions?: boolean; - // (undocumented) - includeQuery?: boolean; - // (undocumented) - preserveHeaderCase?: boolean; -} - -// @public (undocumented) -export type IdGetter = (value: IdGetterObj) => string | undefined; - -// @public (undocumented) -export interface IdGetterObj extends Object { - // (undocumented) - __typename?: string; - // (undocumented) - id?: string; - // (undocumented) - _id?: string; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -export interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // (undocumented) - path: Path; -} - -// @public (undocumented) -export class InMemoryCache extends ApolloCache { - constructor(config?: InMemoryCacheConfig); - // (undocumented) - readonly assumeImmutableResults = true; - // (undocumented) - batch(options: Cache_2.BatchOptions): TUpdateResult; - // Warning: (ae-forgotten-export) The symbol "BroadcastOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected broadcastWatches(options?: BroadcastOptions): void; - // (undocumented) - protected config: InMemoryCacheConfig; - // (undocumented) - diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) - extract(optimistic?: boolean): NormalizedCacheObject; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(options?: { - resetResultCache?: boolean; - resetResultIdentities?: boolean; - }): string[]; - // Warning: (ae-forgotten-export) The symbol "getInMemoryCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - readonly makeVar: typeof makeVar; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // (undocumented) - performTransaction(update: (cache: InMemoryCache) => any, optimisticId?: string | null): any; - // (undocumented) - readonly policies: Policies; - // (undocumented) - read(options: Cache_2.ReadOptions): T | null; - // (undocumented) - release(rootId: string, optimistic?: boolean): number; - // (undocumented) - removeOptimistic(idToRemove: string): void; - // (undocumented) - reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - restore(data: NormalizedCacheObject): this; - // (undocumented) - retain(rootId: string, optimistic?: boolean): number; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - watch(watch: Cache_2.WatchOptions): () => void; - // (undocumented) - write(options: Cache_2.WriteOptions): Reference | undefined; -} - -// @public (undocumented) -export interface InMemoryCacheConfig extends ApolloReducerConfig { - // @deprecated - canonizeResults?: boolean; - // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fragments?: FragmentRegistryAPI; - // (undocumented) - possibleTypes?: PossibleTypesMap; - // @deprecated (undocumented) - resultCacheMaxSize?: number; - // (undocumented) - resultCaching?: boolean; - // (undocumented) - typePolicies?: TypePolicies; -} - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -export type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -export interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// @public (undocumented) -export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -export interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// @public @deprecated (undocumented) -export type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -export interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -export interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; + message: string; // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; + name: string; // (undocumented) - extensions?: TExtensions; + stack?: string; } -// @public @deprecated (undocumented) -export type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; +// @public +export type ErrorPolicy = "none" | "ignore" | "all"; -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} +export { execute } -// @public (undocumented) -const _invalidateModifier: unique symbol; +export { fallbackHttpConfig } -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; +// @public +export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; -// @public @deprecated (undocumented) -export function isApolloError(err: Error): err is ApolloError; +export { FetchResult } -// @public -export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; +export { FieldFunctionOptions } -// @public (undocumented) -export function isReference(obj: any): obj is Reference; +export { FieldMergeFunction } -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; +export { FieldPolicy } -// @public (undocumented) -type KeyArgsFunction = (args: Record | null, context: { - typename: string; - fieldName: string; - field: FieldNode | null; - variables?: Record; -}) => KeySpecifier | false | ReturnType; +export { FieldReadFunction } -// @public (undocumented) -type KeyFieldsContext = { - typename: string | undefined; - storeObject: StoreObject; - readField: ReadFieldFunction; - selectionSet?: SelectionSetNode; - fragmentMap?: FragmentMap; - keyObject?: Record; -}; +export { FragmentType } + +export { from } // @public (undocumented) -type KeyFieldsFunction = (object: Readonly, context: KeyFieldsContext) => KeySpecifier | false | ReturnType; +export type GetDataState["dataState"]> = Extract, { + dataState: TState; +}>; + +export { gql } + +export { GraphQLRequest } + +export { HttpLink } + +export { IdGetter } +export { IdGetterObj } + +export { InMemoryCache } + +export { InMemoryCacheConfig } + +// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -type KeySpecifier = ReadonlyArray; +export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) -class Layer extends EntityStore { - constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - readonly id: string; - // (undocumented) - readonly parent: EntityStore; - // (undocumented) - removeLayer(layerId: string): EntityStore; - // (undocumented) - readonly replay: (layer: EntityStore) => any; - // (undocumented) - toObject(): NormalizedCacheObject; -} +export type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; // @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; +export interface InternalRefetchQueriesOptions extends Omit, "include"> { // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; + include?: InternalRefetchQueriesInclude; // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; + removeOptimistic?: string; } // @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; +export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; // @public (undocumented) -export function makeReference(id: string): Reference; +export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | ApolloClient.QueryOptions; // @public (undocumented) -export function makeVar(value: T): ReactiveVar; +export namespace InternalTypes { + export type { NextFetchPolicyContext, QueryManager }; +} // @public -export type Masked = TData & { - __masked?: true; -}; +export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; -// @public -export type MaskedDocumentNode = TypedDocumentNode, TVariables>; +export { isReference } + +export { LinkError } + +export { LocalStateError } + +export { makeVar } // @public (undocumented) interface MaskFragmentOptions { // (undocumented) data: TData; // (undocumented) - fragment: DocumentNode; + fragment: DocumentNode_2; // (undocumented) fragmentName?: string; } // @public (undocumented) interface MaskOperationOptions { + cause?: object; // (undocumented) data: TData; // (undocumented) - document: DocumentNode; + document: DocumentNode_2; // (undocumented) fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -export type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// @public (undocumented) -export interface MergeInfo { - // (undocumented) - field: FieldNode; - // (undocumented) - merge: FieldMergeFunction; - // (undocumented) - typename: string | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// @public (undocumented) -type MergeObjectsFunction = (existing: T, incoming: T) => T; - -// Warning: (ae-forgotten-export) The symbol "OptionsUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function mergeOptions>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial | undefined, options: TOptions | Partial): TOptions & TDefaultOptions; - -// @public (undocumented) -export interface MergeTree { - // (undocumented) - info?: MergeInfo; - // (undocumented) - map: Map; -} - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -export type MethodKeys = { - [P in keyof T]: T[P] extends Function ? P : never; -}[keyof T]; - -// @public (undocumented) -export class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; } -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; +export { MaybeMasked } -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; +export { MergeInfo } -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; +export { MergeTree } -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; +export { MissingFieldError } -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - errorPolicy?: ErrorPolicy; - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - update?: MutationUpdaterFunction; - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} +// @public @deprecated (undocumented) +export type MutateResult = ApolloClient.MutateResult; // @public (undocumented) export type MutationFetchPolicy = Extract; -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} +// @public @deprecated (undocumented) +export type MutationOptions = ApolloClient.MutateOptions; // @public (undocumented) export type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; + mutationResult: NormalizedExecutionResult>; queryName: string | undefined; queryVariables: Record; }) => Record; @@ -1644,14 +592,6 @@ export type MutationQueryReducersMap; }; -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - // @public (undocumented) interface MutationStoreValue { // (undocumented) @@ -1659,19 +599,14 @@ interface MutationStoreValue { // (undocumented) loading: boolean; // (undocumented) - mutation: DocumentNode; + mutation: DocumentNode_2; // (undocumented) variables: Record; } -// @public @deprecated (undocumented) -export type MutationUpdaterFn = (cache: ApolloCache, mutationResult: FetchResult) => void; - // @public (undocumented) -export type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; +export type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { + context?: DefaultContext; variables?: TVariables; }) => void; @@ -1683,7 +618,8 @@ export enum NetworkStatus { poll = 6, ready = 7, refetch = 4, - setVariables = 2 + setVariables = 2, + streaming = 9 } // @public (undocumented) @@ -1693,376 +629,258 @@ interface NextFetchPolicyContext { // (undocumented) observable: ObservableQuery; // (undocumented) - options: WatchQueryOptions; + options: ApolloClient.WatchQueryOptions; // (undocumented) reason: "after-fetch" | "variables-changed"; } -// @public (undocumented) -export type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; +export { NormalizedCache } -// @public -export interface NormalizedCache { - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // (undocumented) - delete(dataId: string, fieldName?: string): boolean; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "FieldValueGetter" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: FieldValueGetter; - // (undocumented) - getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - merge(olderId: string, newerObject: StoreObject): void; - // (undocumented) - merge(olderObject: StoreObject, newerId: string): void; - // (undocumented) - modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; - // (undocumented) - release(rootId: string): number; - replace(newData: NormalizedCacheObject): void; - retain(rootId: string): number; - toObject(): NormalizedCacheObject; - // (undocumented) - toReference: ToReferenceFunction; -} +export { NormalizedCacheObject } // @public -export interface NormalizedCacheObject { - // (undocumented) - [dataId: string]: StoreObject | undefined; - // (undocumented) - __META?: { - extraRootIds: string[]; - }; -} +export type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; export { Observable } // @public (undocumented) -export class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; +interface ObservableAndInfo { // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts + fromLink: boolean; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): ObservableSubscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): ObservableSubscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - subscribeToMore(options: SubscribeToMoreOptions): () => void; - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; + observable: Observable_2>; } -export { ObservableSubscription } - -export { Observer } - -// @public (undocumented) -export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - // @public (undocumented) -export interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; +export namespace ObservableQuery { + // @internal @deprecated + export interface CacheWatchOptions extends Cache_2.WatchOptions { + // @deprecated + lastOwnDiff?: Cache_2.DiffResult; + } // (undocumented) - query: DocumentNode; + export namespace DocumentationTypes { + // (undocumented) + export interface ObservableMethods { + pipe(...operators: OperatorFunctionChain, OperatorResult>): Observable_2; + subscribe(observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)): Subscription; + } + // (undocumented) + export type OperatorFunctionChain = []; + } // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; + export type FetchMoreOptions = { + query?: DocumentNode_2 | TypedDocumentNode; + variables?: Partial>; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + updateQuery?: (previousQueryResult: Unmasked, options: { + fetchMoreResult: Unmasked; + variables: TFetchVars; + }) => Unmasked; }; // (undocumented) - variables: Record; -} - -// @public (undocumented) -export type OperationVariables = Record; - -// @public (undocumented) -export type OptimisticStoreItem = { - id: string; - data: NormalizedCacheObject; - transaction: Transaction; -}; - -// @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; - -// @public (undocumented) -export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise; - -// @public @deprecated (undocumented) -export type Path = ReadonlyArray; - -// @public (undocumented) -class Policies { - constructor(config: { - cache: InMemoryCache; - dataIdFromObject?: KeyFieldsFunction; - possibleTypes?: PossibleTypesMap; - typePolicies?: TypePolicies; - }); - // (undocumented) - addPossibleTypes(possibleTypes: PossibleTypesMap): void; - // (undocumented) - addTypePolicies(typePolicies: TypePolicies): void; - // (undocumented) - readonly cache: InMemoryCache; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record, variables?: Record): boolean; - // (undocumented) - getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction | undefined; - // (undocumented) - getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction | undefined; - // Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getStoreFieldName(fieldSpec: FieldSpecifier): string; - // (undocumented) - hasKeyArgs(typename: string | undefined, fieldName: string): boolean; - // (undocumented) - identify(object: StoreObject, partialContext?: Partial): [string?, StoreObject?]; - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly | undefined; - // (undocumented) - readonly rootIdsByTypename: Record; - // (undocumented) - readonly rootTypenamesById: Record; - // (undocumented) - runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge }: MergeInfo, context: WriteContext, storage?: StorageType): any; + export type Options = { + fetchPolicy: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + initialFetchPolicy: WatchQueryFetchPolicy; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode_2 | TypedDocumentNode; + variables: TVariables; + }; // (undocumented) - readonly usingPossibleTypes = false; -} - -// @public (undocumented) -export type PossibleTypesMap = { - [supertype: string]: string[]; -}; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const print_2: ((ast: ASTNode) => string) & { - reset(): void; -}; - -// @public (undocumented) -interface Printer { - // Warning: (ae-forgotten-export) The symbol "print_2" needs to be exported by the entry point index.d.ts - // + export type Result["dataState"] = DataState["dataState"]> = { + error?: ErrorLike; + loading: boolean; + networkStatus: NetworkStatus; + partial: boolean; + } & GetDataState; + export interface ResultPromise extends Promise { + retain(): this; + } // (undocumented) - (node: ASTNode, originalPrint: typeof print_2): string; + export interface SubscribeToMoreOptions { + // (undocumented) + context?: DefaultContext; + // (undocumented) + document: DocumentNode_2 | TypedDocumentNode; + // (undocumented) + onError?: (error: ErrorLike) => void; + // (undocumented) + updateQuery?: SubscribeToMoreUpdateQueryFn; + // (undocumented) + variables?: TSubscriptionVariables; + } } // @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; +export class ObservableQuery implements Subscribable>>, InteropObservable>> { // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; + ["@@observable"]: () => Subscribable>>; // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; + [Symbol.observable]: () => Subscribable>>; + constructor({ queryManager, options, transformedQuery, }: { + queryManager: QueryManager; + options: ApolloClient.WatchQueryOptions; + transformedQuery?: DocumentNode_2 | TypedDocumentNode; + queryId?: string; + }); + // @internal @deprecated (undocumented) + applyOptions(newOptions: Partial>): void; + fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; + // @internal @deprecated (undocumented) + getCacheDiff({ optimistic }?: { + optimistic?: boolean | undefined; + }): Cache_2.DiffResult; // (undocumented) - readonly observableQuery: ObservableQuery | null; + getCurrentResult(): ObservableQuery.Result>; // (undocumented) - readonly queryId: string; + hasObservers(): boolean; + // @internal @deprecated + _lastWrite?: unknown; + // @internal @deprecated (undocumented) + notify(scheduled?: boolean): void; // (undocumented) - resetDiff(): void; + readonly options: ObservableQuery.Options; + pipe: Observable_2>>["pipe"]; // (undocumented) - resetLastWrite(): void; + get query(): TypedDocumentNode; // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; + readonly queryName?: string; + refetch(variables?: Partial): ObservableQuery.ResultPromise>; + reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; + // @internal @deprecated + reset(): void; + setVariables(variables: TVariables): Promise>; + startPolling(pollInterval: number): void; + stop(): void; + stopPolling(): void; + subscribe: (observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)) => Subscription; + subscribeToMore(options: ObservableQuery.SubscribeToMoreOptions): () => void; + updateQuery(mapFn: UpdateQueryMapFn): void; + get variables(): TVariables; +} + +// @public (undocumented) +export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; + +export { Operation } + +// @public (undocumented) +export type OperationVariables = Record; + +export { OptimisticStoreItem } + +// @public (undocumented) +namespace OverridableTypes { // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + interface Complete extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } // (undocumented) - stop(): void; + interface Defaults { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Complete: Complete; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Partial: Partial; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Streaming: Streaming; + } // (undocumented) - stopped: boolean; + interface Partial extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: DeepPartial; + } // (undocumented) - variables?: Record; + interface Streaming extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } } +export { parseAndCheckHttpResponse } + +export { PossibleTypesMap } + // @public (undocumented) -class QueryManager { +class QueryManager { // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); + constructor(options: QueryManagerOptions); // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) broadcastQueries(): void; // (undocumented) - cache: ApolloCache; + get cache(): ApolloCache; // (undocumented) clearStore(options?: Cache_2.ResetOptions): Promise; // (undocumented) + readonly client: ApolloClient; + readonly clientOptions: ApolloClient.Options; + // (undocumented) readonly dataMasking: boolean; // (undocumented) readonly defaultContext: Partial; // (undocumented) - defaultOptions: DefaultOptions; + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly documentTransform: DocumentTransform; // (undocumented) protected fetchCancelFns: Map any>; + // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.d.ts + // // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; + fetchObservableWithInfo(options: ApolloClient.WatchQueryOptions, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, }: { + networkStatus?: NetworkStatus; + query?: DocumentNode_2; + fetchQueryOperator?: (source: Observable_2) => Observable_2; + onCacheHit?: () => void; + observableQuery?: ObservableQuery | undefined; + }): ObservableAndInfo; // (undocumented) - generateQueryId(): string; + fetchQuery(options: ApolloClient.WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; // (undocumented) generateRequestId(): number; // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts // // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; + getDocumentInfo(document: DocumentNode_2): TransformCacheEntry; // (undocumented) - getLocalState(): LocalState; + getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // + getVariables(document: DocumentNode_2, variables?: TVariables): TVariables; // (undocumented) - getQueryStore(): Record; + readonly incrementalHandler: Incremental.Handler; // (undocumented) protected inFlightLinkObservables: Trie<{ - observable?: Observable>; + observable?: Observable_2>; + restart?: () => void; }>; // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; + get link(): ApolloLink; // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; + localState: LocalState | undefined; // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -2072,56 +890,53 @@ class QueryManager { // (undocumented) maskOperation(options: MaskOperationOptions): MaybeMasked; // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; + mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: ApolloClient.MutateOptions & { + errorPolicy: ErrorPolicy; + fetchPolicy: MutationFetchPolicy; + }): Promise>>; // (undocumented) mutationStore?: { [mutationId: string]: MutationStoreValue; }; + obsQueries: Set>; + prioritizeCacheValues: boolean; // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; + query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; + refetchObservableQueries(includeStandby?: boolean): Promise[]>; // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; + refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; // (undocumented) readonly ssrMode: boolean; // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; + startGraphQLSubscription(options: ApolloClient.SubscribeOptions): SubscriptionObservable>; stop(): void; // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; + transform(document: DocumentNode_2): DocumentNode_2; // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; + watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; } // @public (undocumented) -interface QueryManagerOptions { +interface QueryManagerOptions { // (undocumented) assumeImmutableResults: boolean; // (undocumented) - cache: ApolloCache; + client: ApolloClient; // (undocumented) - clientAwareness: Record; + clientOptions: ApolloClient.Options; // (undocumented) dataMasking: boolean; // (undocumented) defaultContext: Partial | undefined; // (undocumented) - defaultOptions: DefaultOptions; + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) documentTransform: DocumentTransform | null | undefined; // (undocumented) - link: ApolloLink; + incrementalHandler: Incremental.Handler; // (undocumented) - localState: LocalState; + localState: LocalState | undefined; // (undocumented) onBroadcast: undefined | (() => void); // (undocumented) @@ -2130,84 +945,45 @@ interface QueryManagerOptions { ssrMode: boolean; } -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} -export { QueryOptions as PureQueryOptions } -export { QueryOptions } - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -type ReactiveListener = (value: T) => any; - // @public (undocumented) -export interface ReactiveVar { +namespace QueryNotification { + // (undocumented) + type FromCache = NextNotification> & { + source: "cache"; + }; // (undocumented) - (newValue?: T): T; + type FromNetwork = ObservableNotification> & { + source: "network"; + }; // (undocumented) - attachCache(cache: ApolloCache): this; + type NewNetworkStatus = NextNotification<{ + resetError?: boolean; + }> & { + source: "newNetworkStatus"; + }; // (undocumented) - forgetCache(cache: ApolloCache): boolean; - // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts + type SetResult = NextNotification> & { + source: "setResult"; + }; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) - onNextChange(listener: ReactiveListener): () => void; + type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; } -// @public (undocumented) -interface ReadFieldFunction { - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} +// @public @deprecated (undocumented) +export type QueryOptions = ApolloClient.QueryOptions; -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} +export { ReactiveVar } -// @public (undocumented) -export interface ReadMergeModifyContext { - // (undocumented) - store: NormalizedCache; - // (undocumented) - variables?: Record; - // (undocumented) - varString?: string; -} +export { ReadMergeModifyContext } -// @public (undocumented) -export type ReadQueryOptions = { - store: NormalizedCache; - query: DocumentNode; - variables?: Object; - previousResult?: any; - canonizeResults?: boolean; - rootId?: string; - config?: ApolloReducerConfig; -}; +export { ReadQueryOptions } -// @public (undocumented) -export interface Reference { - // (undocumented) - readonly __ref: string; -} +export { Reference } // @public (undocumented) export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; @@ -2215,248 +991,80 @@ export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesInc // @public (undocumented) type RefetchQueriesIncludeShorthand = "all" | "active"; -// @public (undocumented) -export interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} +// @public @deprecated (undocumented) +export type RefetchQueriesOptions = ApolloClient.RefetchQueriesOptions; -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; +export type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? ApolloClient.QueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; -// @public (undocumented) -export interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} +// @public @deprecated (undocumented) +export type RefetchQueriesResult = ApolloClient.RefetchQueriesResult; // @public (undocumented) -export type RefetchQueryDescriptor = string | DocumentNode; +export type RefetchQueryDescriptor = string | DocumentNode_2; // @public (undocumented) export type RefetchWritePolicy = "merge" | "overwrite"; -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; +export { RequestHandler } export { resetCaches } -// @public (undocumented) -export type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -export interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// Warning: (ae-forgotten-export) The symbol "Body_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function rewriteURIForGET(chosenURI: string, body: Body_2): { - parseError: unknown; - newURI?: undefined; -} | { - newURI: string; - parseError?: undefined; -}; - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// Warning: (ae-forgotten-export) The symbol "HttpConfig" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function selectHttpOptionsAndBody(operation: Operation, fallbackConfig: HttpConfig, ...configs: Array): { - options: HttpConfig & Record; - body: Body_2; -}; +export { rewriteURIForGET } -// @public (undocumented) -export function selectHttpOptionsAndBodyInternal(operation: Operation, printer: Printer, ...configs: HttpConfig[]): { - options: HttpConfig & Record; - body: Body_2; -}; +export { selectHttpOptionsAndBody } -// @public (undocumented) -export const selectURI: (operation: Operation, fallbackURI?: string | ((operation: Operation) => string)) => any; +export { selectHttpOptionsAndBodyInternal } -// @public (undocumented) -export const serializeFetchParameter: (p: any, label: string) => string; +export { selectURI } -// @public (undocumented) -export type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; +export { ServerError } -// @public (undocumented) -export type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; +export { ServerParseError } export { setLogVerbosity } -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -export interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -export const split: typeof ApolloLink.split; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -export interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; +export { split } -// @public (undocumented) -export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; +export { StoreObject } -// @public (undocumented) -class Stump extends Layer { - constructor(root: EntityStore.Root); - // (undocumented) - merge(older: string | StoreObject, newer: string | StoreObject): void; - // (undocumented) - removeLayer(): this; -} +export { StoreValue } // @public (undocumented) export interface SubscribeToMoreFunction { // (undocumented) - (options: SubscribeToMoreOptions): () => void; + (options: ObservableQuery.SubscribeToMoreOptions): () => void; } -// @public (undocumented) -export interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} +// @public @deprecated (undocumented) +export type SubscribeToMoreOptions = ObservableQuery.SubscribeToMoreOptions; // @public (undocumented) -export type SubscribeToMoreUpdateQueryFn = { +export type SubscribeToMoreUpdateQueryFn = { ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { subscriptionData: { data: Unmasked; }; }): Unmasked | void; }; -// @public (undocumented) -export interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; +// @public +export interface SubscriptionObservable extends Observable_2 { + restart: () => void; } -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public @deprecated (undocumented) -export const throwServerError: (response: Response, result: any, message: string) => never; - // @public @deprecated (undocumented) -export function toPromise(observable: Observable): Promise; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; +export type SubscriptionOptions = ApolloClient.SubscribeOptions; -// @public (undocumented) -export type Transaction = (c: ApolloCache) => void; +export { Transaction } // @public (undocumented) interface TransformCacheEntry { // (undocumented) - asQuery: DocumentNode; + asQuery: DocumentNode_2; // (undocumented) - clientQuery: DocumentNode | null; + clientQuery: DocumentNode_2 | null; // (undocumented) defaultVars: OperationVariables; // (undocumented) @@ -2464,70 +1072,42 @@ interface TransformCacheEntry { // (undocumented) hasForcedResolvers: boolean; // (undocumented) + hasIncrementalDirective: boolean; + // (undocumented) hasNonreactiveDirective: boolean; // (undocumented) - nonReactiveQuery: DocumentNode; + nonReactiveQuery: DocumentNode_2; + // (undocumented) + operationType: OperationTypeNode | undefined; // (undocumented) - serverQuery: DocumentNode | null; + serverQuery: DocumentNode_2 | null; + // (undocumented) + violation?: Error | undefined; } -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - export { TypedDocumentNode } // @public (undocumented) -export type TypePolicies = { - [__typename: string]: TypePolicy; -}; - -// @public (undocumented) -export type TypePolicy = { - keyFields?: KeySpecifier | KeyFieldsFunction | false; - merge?: FieldMergeFunction | boolean; - queryType?: true; - mutationType?: true; - subscriptionType?: true; - fields?: { - [fieldName: string]: FieldPolicy | FieldReadFunction; - }; -}; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +export interface TypeOverrides { +} -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; +export { TypePolicies } -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -export type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; +export { TypePolicy } -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; +export { UnconventionalError } -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; +export { Unmasked } // @public (undocumented) -export interface UpdateQueryMapFn { +export interface UpdateQueryMapFn { // (undocumented) ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; } // @public (undocumented) -export type UpdateQueryOptions = { +export type UpdateQueryOptions = { variables?: TVariables; } & ({ complete: true; @@ -2538,84 +1118,23 @@ export type UpdateQueryOptions = { }); // @public (undocumented) -export interface UriFunction { - // (undocumented) - (operation: Operation): string; -} +export const version: string; -// @public -export interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} +export { WatchFragmentOptions } -// @public -export type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; +export { WatchFragmentResult } // @public (undocumented) -export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public -export interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} +export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network" | "standby"; -// @public (undocumented) -interface WriteContext extends ReadMergeModifyContext { - // (undocumented) - clientOnly: boolean; - // (undocumented) - deferred: boolean; - // Warning: (ae-forgotten-export) The symbol "FlavorableWriteContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - flavors: Map; - // (undocumented) - readonly fragmentMap: FragmentMap; - // (undocumented) - incomingById: Map; - }>; - // Warning: (ae-forgotten-export) The symbol "FragmentMapFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lookupFragment: FragmentMapFunction; - // (undocumented) - merge(existing: T, incoming: T): T; - // (undocumented) - overwrite: boolean; - // (undocumented) - readonly written: { - [dataId: string]: SelectionSetNode[]; - }; -} +// @public @deprecated (undocumented) +export type WatchQueryOptions = ApolloClient.WatchQueryOptions; // Warnings were encountered during analysis: // -// src/cache/inmemory/policies.ts:93:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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/core/ApolloClient.ts:353:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:360:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:175:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-errors.api.md b/.api-reports/api-report-errors.api.md index 245b71b1db6..35d06c95203 100644 --- a/.api-reports/api-report-errors.api.md +++ b/.api-reports/api-report-errors.api.md @@ -4,171 +4,177 @@ ```ts -import type { GraphQLError } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; +import type { ApolloLink } from '@apollo/client/link'; +import { ErrorLike } from '@apollo/client'; +import type { FormattedExecutionResult } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; // @public (undocumented) -export class ApolloError extends Error { - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; +export namespace CombinedGraphQLErrors { + // (undocumented) + export namespace DocumentationTypes { + export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; + // (undocumented) + export interface InstanceProperties { + readonly data: Record | null | undefined; + readonly errors: ReadonlyArray; + readonly extensions: Record | undefined; + } + export function is(error: unknown): boolean; + } + export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; + // (undocumented) + export interface MessageFormatterOptions { + defaultFormatMessage: (errors: ReadonlyArray) => string; + result: ApolloLink.Result; + } } -// @public (undocumented) -export interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; +// @public +export class CombinedGraphQLErrors extends Error { + constructor(result: FormattedExecutionResult); + constructor(result: ApolloLink.Result, errors: ReadonlyArray); + readonly data: Record | null | undefined; + readonly errors: ReadonlyArray; + readonly extensions: Record | undefined; + static formatMessage: CombinedGraphQLErrors.MessageFormatter; + static is(error: unknown): error is CombinedGraphQLErrors; } // @public (undocumented) -interface DefaultContext extends Record { +export namespace CombinedProtocolErrors { + // (undocumented) + export namespace DocumentationTypes { + export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; + // (undocumented) + export interface InstanceProperties { + readonly errors: ReadonlyArray; + } + } + export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; + // (undocumented) + export interface MessageFormatterOptions { + defaultFormatMessage: (errors: ReadonlyArray) => string; + } } -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; +// @public +export class CombinedProtocolErrors extends Error { + constructor(protocolErrors: Array | ReadonlyArray); + readonly errors: ReadonlyArray; + static formatMessage: CombinedProtocolErrors.MessageFormatter; + static is(error: unknown): error is CombinedProtocolErrors; } -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - // @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} +export function graphQLResultHasProtocolErrors(result: T): result is T & { + extensions: Record; +}; -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; +export function isErrorLike(error: unknown): error is ErrorLike; -// Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResultWithSymbolExtensions = FetchResult & { - extensions: Record; +// @public +export const LinkError: { + is: (error: unknown) => boolean; }; -// @public @deprecated (undocumented) -export type GraphQLErrors = ReadonlyArray; - -// Warning: (ae-forgotten-export) The symbol "FetchResultWithSymbolExtensions" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export function graphQLResultHasProtocolErrors(result: FetchResult): result is FetchResultWithSymbolExtensions; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; +export namespace LocalStateError { + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly path?: Array; + } + } + // (undocumented) + export interface Options { + // (undocumented) + path?: Array; + // (undocumented) + sourceError?: unknown; + } } -// @public @deprecated (undocumented) -export function isApolloError(err: Error): err is ApolloError; +// @public +export class LocalStateError extends Error { + constructor(message: string, options?: LocalStateError.Options); + static is(error: unknown): error is LocalStateError; + readonly path?: Array; +} // @public (undocumented) -export type NetworkError = Error | ServerParseError | ServerError | null; +export const PROTOCOL_ERRORS_SYMBOL: unique symbol; -// @public @deprecated (undocumented) -type Path = ReadonlyArray; +// @internal @deprecated +export function registerLinkError(error: ErrorLike): void; // @public (undocumented) -export const PROTOCOL_ERRORS_SYMBOL: unique symbol; +export namespace ServerError { + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly bodyText: string; + readonly response: Response; + readonly statusCode: number; + } + } + // (undocumented) + export interface Options { + // (undocumented) + bodyText: string; + // (undocumented) + response: Response; + } +} -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; +// @public +export class ServerError extends Error { + constructor(message: string, options: ServerError.Options); + readonly bodyText: string; + static is(error: unknown): error is ServerError; + readonly response: Response; + readonly statusCode: number; +} // @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; +export namespace ServerParseError { + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly bodyText: string; + readonly response: Response; + readonly statusCode: number; + } + } + // (undocumented) + export interface Options { + // (undocumented) + bodyText: string; + // (undocumented) + response: Response; + } +} + +// @public +export class ServerParseError extends Error { + constructor(originalParseError: unknown, options: ServerParseError.Options); + readonly bodyText: string; + static is(error: unknown): error is ServerParseError; + readonly response: Response; + readonly statusCode: number; +} -// Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; +export function toErrorLike(error: unknown): ErrorLike; + +// @public +export class UnconventionalError extends Error { + constructor(errorType: unknown); + static is(error: unknown): error is UnconventionalError; } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-incremental.api.md b/.api-reports/api-report-incremental.api.md new file mode 100644 index 00000000000..efdd684674c --- /dev/null +++ b/.api-reports/api-report-incremental.api.md @@ -0,0 +1,141 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloLink } from '@apollo/client/link'; +import type { DeepPartial } from '@apollo/client/utilities'; +import type { DocumentNode } from 'graphql'; +import type { FormattedExecutionResult } from 'graphql'; +import type { GraphQLFormattedError } from 'graphql'; +import type { HKT } from '@apollo/client/utilities'; + +// @public (undocumented) +namespace Defer20220824Handler { + // (undocumented) + type Chunk> = InitialResult | SubsequentResult; + // (undocumented) + interface Defer20220824Result extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + arg2: unknown; + // (undocumented) + return: Defer20220824Handler.Chunk>; + } + // (undocumented) + type IncrementalDeferPayload> = { + data?: TData | null | undefined; + errors?: ReadonlyArray; + extensions?: Record; + path?: Incremental.Path; + label?: string; + }; + // (undocumented) + type InitialResult> = { + data?: TData | null | undefined; + errors?: ReadonlyArray; + extensions?: Record; + hasNext: boolean; + }; + // (undocumented) + type SubsequentResult> = { + data?: TData | null | undefined; + errors?: ReadonlyArray; + extensions?: Record; + hasNext: boolean; + incremental?: Array>; + }; + // (undocumented) + interface TypeOverrides { + // (undocumented) + AdditionalApolloLinkResultTypes: Defer20220824Result; + } +} + +// @public +class Defer20220824Handler implements Incremental.Handler> { + // (undocumented) + extractErrors(result: ApolloLink.Result): GraphQLFormattedError[] | undefined; + // (undocumented) + isIncrementalResult(result: Record): result is Defer20220824Handler.SubsequentResult | Defer20220824Handler.InitialResult; + // (undocumented) + prepareRequest(request: ApolloLink.Request): ApolloLink.Request; + // Warning: (ae-forgotten-export) The symbol "DeferRequest" needs to be exported by the entry point index.d.ts + // + // (undocumented) + startRequest>(_: { + query: DocumentNode; + }): DeferRequest; +} +export { Defer20220824Handler } +export { Defer20220824Handler as GraphQL17Alpha2Handler } + +// @public (undocumented) +class DeferRequest> implements Incremental.IncrementalRequest, TData> { + // (undocumented) + handle(cacheData: TData | DeepPartial | null | undefined, chunk: Defer20220824Handler.Chunk): FormattedExecutionResult; + // (undocumented) + hasNext: boolean; +} + +// @public (undocumented) +export namespace Incremental { + // @internal @deprecated (undocumented) + export interface Handler = Record> { + // (undocumented) + extractErrors: (result: ApolloLink.Result) => readonly GraphQLFormattedError[] | undefined | void; + // (undocumented) + isIncrementalResult: (result: ApolloLink.Result) => result is Chunk; + // (undocumented) + prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request; + // (undocumented) + startRequest: >(request: { + query: DocumentNode; + }) => IncrementalRequest; + } + // (undocumented) + export interface IncrementalRequest, TData> { + // (undocumented) + handle: (cacheData: TData | DeepPartial | undefined | null, chunk: Chunk) => FormattedExecutionResult; + // (undocumented) + hasNext: boolean; + } + // (undocumented) + export type Path = ReadonlyArray; +} + +// @public (undocumented) +export namespace NotImplementedHandler { + // (undocumented) + export interface NotImplementedResult extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + arg2: unknown; + // (undocumented) + return: never; + } + // (undocumented) + export interface TypeOverrides { + // (undocumented) + AdditionalApolloLinkResultTypes: NotImplementedResult; + } +} + +// @public (undocumented) +export class NotImplementedHandler implements Incremental.Handler { + // (undocumented) + extractErrors(): void; + // (undocumented) + isIncrementalResult(_: any): _ is never; + // (undocumented) + prepareRequest(request: ApolloLink.Request): ApolloLink.Request; + // (undocumented) + startRequest: any; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-link.api.md b/.api-reports/api-report-link.api.md new file mode 100644 index 00000000000..8eb1f611efe --- /dev/null +++ b/.api-reports/api-report-link.api.md @@ -0,0 +1,117 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloClient } from '@apollo/client'; +import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; +import type { DefaultContext } from '@apollo/client'; +import { DocumentNode } from 'graphql'; +import type { FormattedExecutionResult } from 'graphql'; +import type { GraphQLFormattedError } from 'graphql'; +import type { NotImplementedHandler } from '@apollo/client/incremental'; +import type { Observable } from 'rxjs'; +import type { OperationTypeNode } from 'graphql'; +import type { OperationVariables } from '@apollo/client'; +import type { TypeOverrides } from '@apollo/client'; + +// @public (undocumented) +export namespace ApolloLink { + // (undocumented) + export type AdditionalResultTypes, TExtensions = Record> = ApplyHKTImplementationWithDefault; + // (undocumented) + export namespace DocumentationTypes { + export function ForwardFunction(operation: ApolloLink.Operation): Observable; + export function RequestHandler(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; + } + export interface ExecuteContext { + client: ApolloClient; + } + export type ForwardFunction = (operation: ApolloLink.Operation) => Observable; + export interface Operation { + readonly client: ApolloClient; + extensions: Record; + getContext: () => Readonly; + operationName: string | undefined; + operationType: OperationTypeNode; + query: DocumentNode; + setContext: { + (context: Partial): void; + (updateContext: (previousContext: Readonly) => Partial): void; + }; + variables: OperationVariables; + } + export interface OperationContext extends DefaultContext { + } + export interface Request { + context?: DefaultContext; + extensions?: Record; + query: DocumentNode; + variables?: OperationVariables; + } + export type RequestHandler = (operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction) => Observable; + // (undocumented) + export type Result, TExtensions = Record> = FormattedExecutionResult | AdditionalResultTypes; +} + +// @public +export class ApolloLink { + constructor(request?: ApolloLink.RequestHandler); + // @deprecated + static concat(...links: ApolloLink[]): ApolloLink; + concat(...links: ApolloLink[]): ApolloLink; + static empty(): ApolloLink; + static execute(link: ApolloLink, request: ApolloLink.Request, context: ApolloLink.ExecuteContext): Observable; + static from(links: ApolloLink[]): ApolloLink; + // @internal @deprecated + getMemoryInternals?: () => unknown; + // @internal @deprecated + readonly left?: ApolloLink; + request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; + // @internal @deprecated + readonly right?: ApolloLink; + static split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; + split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; +} + +// @public (undocumented) +export interface ApolloPayloadResult, TExtensions = Record> { + // (undocumented) + errors?: ReadonlyArray; + // (undocumented) + payload: FormattedExecutionResult | null; +} + +// @public @deprecated (undocumented) +export const concat: typeof ApolloLink.concat; + +export { DocumentNode } + +// @public @deprecated (undocumented) +export const empty: typeof ApolloLink.empty; + +// @public (undocumented) +export const execute: typeof ApolloLink.execute; + +// @public @deprecated (undocumented) +export type FetchResult, TExtensions = Record> = ApolloLink.Result; + +// @public @deprecated (undocumented) +export const from: typeof ApolloLink.from; + +// @public @deprecated (undocumented) +export type GraphQLRequest = ApolloLink.Request; + +// @public @deprecated (undocumented) +export type Operation = ApolloLink.Operation; + +// @public @deprecated (undocumented) +export type RequestHandler = ApolloLink.RequestHandler; + +// @public @deprecated (undocumented) +export const split: typeof ApolloLink.split; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-link_batch-http.api.md b/.api-reports/api-report-link_batch-http.api.md index 9352ba6515e..d05550808ad 100644 --- a/.api-reports/api-report-link_batch-http.api.md +++ b/.api-reports/api-report-link_batch-http.api.md @@ -4,248 +4,39 @@ ```ts -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import { ApolloLink } from '@apollo/client/link'; +import type { BaseHttpLink } from '@apollo/client/link/http'; +import { BatchLink } from '@apollo/client/link/batch'; +import { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; +import { Observable } from 'rxjs'; // @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -type BatchHandler = (operations: Operation[], forward?: (NextLink | undefined)[]) => Observable | null; - -// @public (undocumented) -export namespace BatchHttpLink { - // Warning: (ae-forgotten-export) The symbol "BatchLink" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "HttpOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - export type Options = Pick & Omit; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public -export class BatchHttpLink extends ApolloLink { - constructor(fetchParams?: BatchHttpLink.Options); - // (undocumented) - request(operation: Operation): Observable | null; -} - -// @public (undocumented) -namespace BatchLink { - // (undocumented) - interface Options { - batchDebounce?: boolean; - // Warning: (ae-forgotten-export) The symbol "BatchHandler" needs to be exported by the entry point index.d.ts - batchHandler?: BatchHandler; - batchInterval?: number; - batchKey?: (operation: Operation) => string; +export namespace BaseBatchHttpLink { + export interface ContextOptions extends BaseHttpLink.ContextOptions { + } + export interface Options extends BatchLink.Shared.Options, BaseHttpLink.Shared.Options { batchMax?: number; } } -// @public (undocumented) -class BatchLink extends ApolloLink { - constructor(fetchParams?: BatchLink.Options); - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface HttpOptions { - credentials?: string; - fetch?: typeof fetch; - fetchOptions?: any; - headers?: Record; - includeExtensions?: boolean; - includeUnusedVariables?: boolean; - preserveHeaderCase?: boolean; - // Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts - print?: Printer; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - uri?: string | UriFunction; - useGETForQueries?: boolean; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -const print_2: ((ast: ASTNode) => string) & { - reset(): void; -}; - -// @public (undocumented) -interface Printer { - // Warning: (ae-forgotten-export) The symbol "print_2" needs to be exported by the entry point index.d.ts - // +// @public +export class BaseBatchHttpLink extends ApolloLink { + constructor(options?: BaseBatchHttpLink.Options); // (undocumented) - (node: ASTNode, originalPrint: typeof print_2): string; + request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; +export namespace BatchHttpLink { + export interface ContextOptions extends BaseBatchHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { + } + export interface Options extends BaseBatchHttpLink.Options, ClientAwarenessLink.Options { + } } -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; +// @public +export class BatchHttpLink extends ApolloLink { + constructor(options?: BatchHttpLink.Options); } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_batch.api.md b/.api-reports/api-report-link_batch.api.md index 847e0de4475..687f38fa98f 100644 --- a/.api-reports/api-report-link_batch.api.md +++ b/.api-reports/api-report-link_batch.api.md @@ -4,218 +4,32 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -export interface BatchableRequest { - // (undocumented) - forward?: NextLink; - // (undocumented) - operation: Operation; -} - -// @public (undocumented) -export type BatchHandler = (operations: Operation[], forward?: (NextLink | undefined)[]) => Observable | null; +import { ApolloLink } from '@apollo/client/link'; +import type { Observable } from 'rxjs'; // @public (undocumented) export namespace BatchLink { - // (undocumented) - export interface Options { - batchDebounce?: boolean; - batchHandler?: BatchHandler; - batchInterval?: number; - batchKey?: (operation: Operation) => string; + export type BatchHandler = (operations: ApolloLink.Operation[], forward: ApolloLink.ForwardFunction[]) => Observable; + export interface Options extends Shared.Options { + batchHandler?: BatchLink.BatchHandler; batchMax?: number; } -} - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export class BatchLink extends ApolloLink { - constructor(fetchParams?: BatchLink.Options); - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -export class OperationBatcher { - constructor({ batchDebounce, batchInterval, batchMax, batchHandler, batchKey, }: { - batchDebounce?: boolean; - batchInterval?: number; - batchMax?: number; - batchHandler: BatchHandler; - batchKey?: (operation: Operation) => string; - }); - // (undocumented) - consumeQueue(key?: string): (Observable | undefined)[] | undefined; - // (undocumented) - enqueueRequest(request: BatchableRequest): Observable; + export namespace Shared { + export interface Options { + batchDebounce?: boolean; + batchInterval?: number; + batchKey?: (operation: ApolloLink.Operation) => string; + batchMax?: number; + } + } } -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; +// @public +export class BatchLink extends ApolloLink { + constructor(options?: BatchLink.Options); // (undocumented) - extensions?: TExtensions; + request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_client-awareness.api.md b/.api-reports/api-report-link_client-awareness.api.md new file mode 100644 index 00000000000..1df767023f0 --- /dev/null +++ b/.api-reports/api-report-link_client-awareness.api.md @@ -0,0 +1,38 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ApolloLink } from '@apollo/client/link'; + +// @public (undocumented) +export namespace ClientAwarenessLink { + // (undocumented) + export interface ClientAwarenessOptions { + name?: string; + transport?: "headers" | false; + version?: string; + } + export interface ContextOptions { + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + } + // (undocumented) + export interface EnhancedClientAwarenessOptions { + transport?: "extensions" | false; + } + // (undocumented) + export interface Options { + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; + } +} + +// @public +export class ClientAwarenessLink extends ApolloLink { + constructor(options?: ClientAwarenessLink.Options); +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-link_context.api.md b/.api-reports/api-report-link_context.api.md index 3b8fb51287e..9ec268b13e1 100644 --- a/.api-reports/api-report-link_context.api.md +++ b/.api-reports/api-report-link_context.api.md @@ -4,179 +4,26 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import { ApolloLink } from '@apollo/client/link'; -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type ContextSetter = (operation: GraphQLRequest, prevContext: DefaultContext) => Promise | DefaultContext; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// // @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; +export function setContext(setter: SetContextLink.LegacyContextSetter): SetContextLink; // @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; +export namespace SetContextLink { + export type ContextSetter = (prevContext: Readonly, operation: SetContextLink.SetContextOperation) => Promise> | Partial; + // @deprecated (undocumented) + export type LegacyContextSetter = (operation: SetContextLink.SetContextOperation, prevContext: Readonly) => Promise> | Partial; // (undocumented) - variables: Record; + export namespace SetContextLinkDocumentationTypes { + export function ContextSetter(prevContext: Readonly, operation: SetContextLink.SetContextOperation): Promise> | Partial; + } + export type SetContextOperation = Omit; } -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function setContext(setter: ContextSetter): ApolloLink; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; +// @public +export class SetContextLink extends ApolloLink { + constructor(setter: SetContextLink.ContextSetter); } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_core.api.md b/.api-reports/api-report-link_core.api.md deleted file mode 100644 index eec35723989..00000000000 --- a/.api-reports/api-report-link_core.api.md +++ /dev/null @@ -1,182 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -export class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -export interface ApolloPayloadResult, TExtensions = Record> { - // (undocumented) - errors?: ReadonlyArray; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - payload: SingleExecutionResult | ExecutionPatchResult | null; -} - -// @public (undocumented) -export const concat: typeof ApolloLink.concat; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -export { DocumentNode } - -// @public (undocumented) -export const empty: typeof ApolloLink.empty; - -// @public (undocumented) -export const execute: typeof ApolloLink.execute; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -export interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -export type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public (undocumented) -export type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -export const from: typeof ApolloLink.from; - -// @public (undocumented) -export interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -export interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // (undocumented) - path: Path; -} - -// @public (undocumented) -export type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -export interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -export type Path = ReadonlyArray; - -// @public (undocumented) -export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -export interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -export const split: typeof ApolloLink.split; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-link_error.api.md b/.api-reports/api-report-link_error.api.md index eed0c7e295c..2e9db05e90b 100644 --- a/.api-reports/api-report-link_error.api.md +++ b/.api-reports/api-report-link_error.api.md @@ -4,236 +4,35 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -export interface ErrorHandler { - // (undocumented) - (error: ErrorResponse): Observable | void; -} +import { ApolloLink } from '@apollo/client/link'; +import type { ErrorLike } from '@apollo/client'; +import { Observable } from 'rxjs'; // @public (undocumented) export namespace ErrorLink { export interface ErrorHandler { // (undocumented) - (error: ErrorResponse): Observable | void; + (options: ErrorHandlerOptions): Observable | void; + } + export interface ErrorHandlerOptions { + error: ErrorLike; + forward: ApolloLink.ForwardFunction; + operation: ApolloLink.Operation; + result?: ApolloLink.Result; + } + // (undocumented) + export namespace ErrorLinkDocumentationTypes { + export function ErrorHandler(options: ErrorHandlerOptions): Observable | void; } } -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public export class ErrorLink extends ApolloLink { constructor(errorHandler: ErrorLink.ErrorHandler); - // (undocumented) - request(operation: Operation, forward: NextLink): Observable | null; -} - -// @public (undocumented) -export interface ErrorResponse { - // (undocumented) - forward: NextLink; - // @deprecated - graphQLErrors?: ReadonlyArray; - // Warning: (ae-forgotten-export) The symbol "NetworkError" needs to be exported by the entry point index.d.ts - // - // @deprecated - networkError?: NetworkError; - // (undocumented) - operation: Operation; - // @deprecated - protocolErrors?: ReadonlyArray; - // @deprecated (undocumented) - response?: FormattedExecutionResult; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; } // @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type NetworkError = Error | ServerParseError | ServerError | null; - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -export function onError(errorHandler: ErrorHandler): ApolloLink; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} +export function onError(errorHandler: ErrorLink.ErrorHandler): ErrorLink; // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_http.api.md b/.api-reports/api-report-link_http.api.md index 62ec3e2d6ab..153f60ebe39 100644 --- a/.api-reports/api-report-link_http.api.md +++ b/.api-reports/api-report-link_http.api.md @@ -4,77 +4,70 @@ ```ts +import { ApolloLink } from '@apollo/client/link'; import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { InvariantError } from 'ts-invariant'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface Body_2 { - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query?: string; - // (undocumented) - variables?: Record; +import { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; +import type { print as print_2 } from 'graphql'; + +// @public (undocumented) +export namespace BaseHttpLink { + // (undocumented) + export interface Body { + // (undocumented) + extensions?: Record; + // (undocumented) + operationName?: string; + // (undocumented) + query?: string; + // (undocumented) + variables?: Record; + } + export interface ContextOptions { + credentials?: RequestCredentials; + fetchOptions?: RequestInit; + headers?: Record; + http?: BaseHttpLink.HttpOptions; + uri?: string | BaseHttpLink.UriFunction; + } + export interface HttpOptions { + accept?: string[]; + includeExtensions?: boolean; + includeQuery?: boolean; + preserveHeaderCase?: boolean; + } + export interface Options extends Shared.Options { + useGETForQueries?: boolean; + } + // (undocumented) + export type Printer = (node: ASTNode, originalPrint: typeof print_2) => string; + // (undocumented) + export namespace Shared { + export interface Options { + credentials?: RequestCredentials; + fetch?: typeof fetch; + fetchOptions?: RequestInit; + headers?: Record; + includeExtensions?: boolean; + includeUnusedVariables?: boolean; + preserveHeaderCase?: boolean; + print?: BaseHttpLink.Printer; + uri?: string | BaseHttpLink.UriFunction; + } + } + // (undocumented) + export type UriFunction = (operation: ApolloLink.Operation) => string; +} + +// @public +export class BaseHttpLink extends ApolloLink { + constructor(options?: BaseHttpLink.Options); } // @public (undocumented) export const checkFetcher: (fetcher: typeof fetch | undefined) => void; -// @public (undocumented) -export type ClientParseError = InvariantError & { - parseError: Error; -}; - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; +// @public @deprecated (undocumented) +export const createHttpLink: (options?: HttpLink.Options) => HttpLink; // @public @deprecated (undocumented) export const createSignalIfSupported: () => { @@ -86,57 +79,11 @@ export const createSignalIfSupported: () => { }; // @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const defaultPrinter: Printer; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} +export const defaultPrinter: BaseHttpLink.Printer; // @public (undocumented) export const fallbackHttpConfig: { - http: HttpQueryOptions; + http: BaseHttpLink.HttpOptions; headers: { accept: string; "content-type": string; @@ -146,28 +93,6 @@ export const fallbackHttpConfig: { }; }; -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - // @public (undocumented) interface HttpConfig { // (undocumented) @@ -175,106 +100,29 @@ interface HttpConfig { // (undocumented) headers?: Record; // (undocumented) - http?: HttpQueryOptions; + http?: BaseHttpLink.HttpOptions; // (undocumented) options?: any; } // @public (undocumented) -export class HttpLink extends ApolloLink { - constructor(options?: HttpOptions); - // (undocumented) - options: HttpOptions; -} - -// @public (undocumented) -export interface HttpOptions { - credentials?: string; - fetch?: typeof fetch; - fetchOptions?: any; - headers?: Record; - includeExtensions?: boolean; - includeUnusedVariables?: boolean; - preserveHeaderCase?: boolean; - print?: Printer; - uri?: string | UriFunction; - useGETForQueries?: boolean; -} - -// @public (undocumented) -interface HttpQueryOptions { - // (undocumented) - includeExtensions?: boolean; - // (undocumented) - includeQuery?: boolean; - // (undocumented) - preserveHeaderCase?: boolean; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; +export namespace HttpLink { + export interface ContextOptions extends BaseHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { + } + export interface Options extends BaseHttpLink.Options, ClientAwarenessLink.Options { + } } -// @public (undocumented) -export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -const print_2: ((ast: ASTNode) => string) & { - reset(): void; -}; - -// @public (undocumented) -interface Printer { - // Warning: (ae-forgotten-export) The symbol "print_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (node: ASTNode, originalPrint: typeof print_2): string; +// @public +export class HttpLink extends ApolloLink { + constructor(options?: HttpLink.Options); } // @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; +export function parseAndCheckHttpResponse(operations: ApolloLink.Operation | ApolloLink.Operation[]): (response: Response) => Promise; -// Warning: (ae-forgotten-export) The symbol "Body_2" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export function rewriteURIForGET(chosenURI: string, body: Body_2): { +export function rewriteURIForGET(chosenURI: string, body: BaseHttpLink.Body): { parseError: unknown; newURI?: undefined; } | { @@ -285,51 +133,19 @@ export function rewriteURIForGET(chosenURI: string, body: Body_2): { // Warning: (ae-forgotten-export) The symbol "HttpConfig" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function selectHttpOptionsAndBody(operation: Operation, fallbackConfig: HttpConfig, ...configs: Array): { +export function selectHttpOptionsAndBody(operation: ApolloLink.Operation, fallbackConfig: HttpConfig, ...configs: Array): { options: HttpConfig & Record; - body: Body_2; + body: BaseHttpLink.Body; }; // @public (undocumented) -export function selectHttpOptionsAndBodyInternal(operation: Operation, printer: Printer, ...configs: HttpConfig[]): { +export function selectHttpOptionsAndBodyInternal(operation: ApolloLink.Operation, printer: BaseHttpLink.Printer, ...configs: HttpConfig[]): { options: HttpConfig & Record; - body: Body_2; -}; - -// @public (undocumented) -export const selectURI: (operation: Operation, fallbackURI?: string | ((operation: Operation) => string)) => any; - -// @public (undocumented) -export const serializeFetchParameter: (p: any, label: string) => string; - -// @public (undocumented) -export type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; + body: BaseHttpLink.Body; }; // @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -export interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// Warnings were encountered during analysis: -// -// src/link/http/selectHttpOptionsAndBody.ts:128:32 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts +export const selectURI: (operation: ApolloLink.Operation, fallbackURI?: string | ((operation: ApolloLink.Operation) => string)) => any; // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_persisted-queries.api.md b/.api-reports/api-report-link_persisted-queries.api.md index 90f31cf3f46..341a25a9bfe 100644 --- a/.api-reports/api-report-link_persisted-queries.api.md +++ b/.api-reports/api-report-link_persisted-queries.api.md @@ -4,274 +4,61 @@ ```ts +import { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; +import type { ErrorLike } from '@apollo/client'; import type { FormattedExecutionResult } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface BaseOptions { - // (undocumented) - disable?: (error: ErrorResponse) => boolean; - // (undocumented) - retry?: (error: ErrorResponse) => boolean; - // (undocumented) - useGETForHashedQueries?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => ApolloLink & ({ - resetHashCache: () => void; -} & ({ - getMemoryInternals(): { - PersistedQueryLink: { - persistedQueryHashes: number; - }; - }; -} | { - getMemoryInternals?: undefined; -})); - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -type ErrorMeta = { - persistedQueryNotSupported: boolean; - persistedQueryNotFound: boolean; -}; - -// @public (undocumented) -export interface ErrorResponse { - // @deprecated (undocumented) - graphQLErrors?: ReadonlyArray; - // Warning: (ae-forgotten-export) The symbol "ErrorMeta" needs to be exported by the entry point index.d.ts - // - // (undocumented) - meta: ErrorMeta; - // Warning: (ae-forgotten-export) The symbol "NetworkError" needs to be exported by the entry point index.d.ts - // - // @deprecated (undocumented) - networkError?: NetworkError; - // (undocumented) - operation: Operation; - // @deprecated (undocumented) - response?: FormattedExecutionResult; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type NetworkError = Error | ServerParseError | ServerError | null; - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} // @public @deprecated (undocumented) -type Path = ReadonlyArray; +export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => PersistedQueryLink; // @public (undocumented) export namespace PersistedQueryLink { // (undocumented) - export interface GenerateHashOptions extends BaseOptions { - // Warning: (ae-forgotten-export) The symbol "GenerateHashFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - generateHash: GenerateHashFunction; + export namespace Base { + export interface Options { + disable?: (options: PersistedQueryLink.DisableFunctionOptions) => boolean; + retry?: (options: PersistedQueryLink.RetryFunctionOptions) => boolean; + useGETForHashedQueries?: boolean; + } + } + export interface DisableFunctionOptions extends PersistedQueryLink.RetryFunctionOptions { + } + export interface ErrorMeta { + persistedQueryNotFound: boolean; + persistedQueryNotSupported: boolean; + } + export type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike; + export interface GenerateHashOptions extends Base.Options { + generateHash: PersistedQueryLink.GenerateHashFunction; // (undocumented) sha256?: never; } + export type Options = PersistedQueryLink.SHA256Options | PersistedQueryLink.GenerateHashOptions; // (undocumented) - export type Options = SHA256Options | GenerateHashOptions; - // Warning: (ae-forgotten-export) The symbol "BaseOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - export interface SHA256Options extends BaseOptions { + export namespace PersistedQueryLinkDocumentationTypes { + export function GenerateHashFunction(document: DocumentNode): string | PromiseLike; + export function SHA256Function(queryString: string): string | PromiseLike; + } + export interface RetryFunctionOptions { + error: ErrorLike; + meta: PersistedQueryLink.ErrorMeta; + operation: ApolloLink.Operation; + result?: FormattedExecutionResult; + } + export type SHA256Function = (queryString: string) => string | PromiseLike; + export interface SHA256Options extends Base.Options { // (undocumented) generateHash?: never; - // Warning: (ae-forgotten-export) The symbol "SHA256Function" needs to be exported by the entry point index.d.ts - // - // (undocumented) - sha256: SHA256Function; + sha256: PersistedQueryLink.SHA256Function; } - {}; } -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -type SHA256Function = (...args: any[]) => string | PromiseLike; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; +// @public +export class PersistedQueryLink extends ApolloLink { + constructor(options: PersistedQueryLink.Options); // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; + resetHashCache: () => void; } // @public (undocumented) diff --git a/.api-reports/api-report-link_remove-typename.api.md b/.api-reports/api-report-link_remove-typename.api.md index 8bcf62cafa9..10a9a29634b 100644 --- a/.api-reports/api-report-link_remove-typename.api.md +++ b/.api-reports/api-report-link_remove-typename.api.md @@ -4,201 +4,28 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import { ApolloLink } from '@apollo/client/link'; -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) +// @public export const KEEP = "__KEEP"; -// @public (undocumented) -interface KeepTypenameConfig { - // (undocumented) - [key: string]: typeof KEEP | KeepTypenameConfig; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - // @public @deprecated (undocumented) -type Path = ReadonlyArray; +export function removeTypenameFromVariables(options?: RemoveTypenameFromVariablesLink.Options): RemoveTypenameFromVariablesLink; -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export function removeTypenameFromVariables(options?: RemoveTypenameFromVariablesOptions): ApolloLink & ({ - getMemoryInternals(): { - removeTypenameFromVariables: { - getVariableDefinitions: number; - }; - }; -} | { - getMemoryInternals?: undefined; -}); - -// @public (undocumented) -export interface RemoveTypenameFromVariablesOptions { - // Warning: (ae-forgotten-export) The symbol "KeepTypenameConfig" needs to be exported by the entry point index.d.ts - // - // (undocumented) - except?: KeepTypenameConfig; +export namespace RemoveTypenameFromVariablesLink { + export interface KeepTypenameConfig { + // (undocumented) + [key: string]: typeof KEEP | RemoveTypenameFromVariablesLink.KeepTypenameConfig; + } + export interface Options { + except?: RemoveTypenameFromVariablesLink.KeepTypenameConfig; + } } -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; +// @public +export class RemoveTypenameFromVariablesLink extends ApolloLink { + constructor(options?: RemoveTypenameFromVariablesLink.Options); } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_retry.api.md b/.api-reports/api-report-link_retry.api.md index 50d19738dbf..4262eefa0c0 100644 --- a/.api-reports/api-report-link_retry.api.md +++ b/.api-reports/api-report-link_retry.api.md @@ -4,218 +4,39 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public -interface DelayFunction { - // (undocumented) - (count: number, operation: Operation, error: any): number; -} - -// @public (undocumented) -interface DelayFunctionOptions { - initial?: number; - jitter?: boolean; - max?: number; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public -interface RetryFunction { - // (undocumented) - (count: number, operation: Operation, error: any): boolean | Promise; -} - -// @public (undocumented) -interface RetryFunctionOptions { - max?: number; - retryIf?: (error: any, operation: Operation) => boolean | Promise; -} +import { ApolloLink } from '@apollo/client/link'; +import type { ErrorLike } from '@apollo/client'; +import { Observable } from 'rxjs'; // @public (undocumented) export namespace RetryLink { - // (undocumented) + export type AttemptsFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => boolean | Promise; + export interface AttemptsOptions { + max?: number; + retryIf?: (error: ErrorLike, operation: ApolloLink.Operation) => boolean | Promise; + } + export type DelayFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => number; + export interface DelayOptions { + initial?: number; + jitter?: boolean; + max?: number; + } export interface Options { - // Warning: (ae-forgotten-export) The symbol "RetryFunctionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RetryFunction" needs to be exported by the entry point index.d.ts - attempts?: RetryFunctionOptions | RetryFunction; - // Warning: (ae-forgotten-export) The symbol "DelayFunctionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DelayFunction" needs to be exported by the entry point index.d.ts - delay?: DelayFunctionOptions | DelayFunction; + attempts?: RetryLink.AttemptsOptions | RetryLink.AttemptsFunction; + delay?: RetryLink.DelayOptions | RetryLink.DelayFunction; + } + // (undocumented) + export namespace RetryLinkDocumentationTypes { + export function AttemptsFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): boolean | Promise; + export function DelayFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): number; } } -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public export class RetryLink extends ApolloLink { constructor(options?: RetryLink.Options); // (undocumented) - request(operation: Operation, nextLink: NextLink): Observable; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; + request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_schema.api.md b/.api-reports/api-report-link_schema.api.md index 4bfa65619ca..dd12280f67f 100644 --- a/.api-reports/api-report-link_schema.api.md +++ b/.api-reports/api-report-link_schema.api.md @@ -4,186 +4,33 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; +import { ApolloLink } from '@apollo/client/link'; import type { GraphQLSchema } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; +import { Observable } from 'rxjs'; // @public (undocumented) export namespace SchemaLink { - // (undocumented) export interface Options { - context?: ResolverContext | ResolverContextFunction; + context?: SchemaLink.ResolverContext | SchemaLink.ResolverContextFunction; rootValue?: any; schema: GraphQLSchema; validate?: boolean; } - // (undocumented) export type ResolverContext = Record; + export type ResolverContextFunction = (operation: ApolloLink.Operation) => SchemaLink.ResolverContext | PromiseLike; // (undocumented) - export type ResolverContextFunction = (operation: Operation) => ResolverContext | PromiseLike; + export namespace SchemaLinkDocumentationTypes { + export function ResolverContextFunction(operation: ApolloLink.Operation): SchemaLink.ResolverContext | PromiseLike; + } } -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public export class SchemaLink extends ApolloLink { constructor(options: SchemaLink.Options); // (undocumented) context: SchemaLink.Options["context"]; // (undocumented) - request(operation: Operation): Observable; + request(operation: ApolloLink.Operation): Observable; // (undocumented) rootValue: SchemaLink.Options["rootValue"]; // (undocumented) @@ -192,18 +39,6 @@ export class SchemaLink extends ApolloLink { validate: boolean; } -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-link_subscriptions.api.md b/.api-reports/api-report-link_subscriptions.api.md index 7795e357967..cf2076f956e 100644 --- a/.api-reports/api-report-link_subscriptions.api.md +++ b/.api-reports/api-report-link_subscriptions.api.md @@ -4,183 +4,17 @@ ```ts +import { ApolloLink } from '@apollo/client/link'; import type { Client } from 'graphql-ws'; -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import { Observable } from 'rxjs'; -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public export class GraphQLWsLink extends ApolloLink { constructor(client: Client); // (undocumented) readonly client: Client; // (undocumented) - request(operation: Operation): Observable; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; + request(operation: ApolloLink.Operation): Observable; } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-link_utils.api.md b/.api-reports/api-report-link_utils.api.md index 285de36eb1b..19414a3a1a5 100644 --- a/.api-reports/api-report-link_utils.api.md +++ b/.api-reports/api-report-link_utils.api.md @@ -4,84 +4,17 @@ ```ts +import type { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -// Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export function createOperation(starting: any, operation: GraphQLRequest): Operation; - -// @public (undocumented) -interface DefaultContext extends Record { -} +export function createOperation(request: ApolloLink.Request, { client }: ApolloLink.ExecuteContext): ApolloLink.Operation; // @public (undocumented) export function filterOperationVariables(variables: Record, query: DocumentNode): { [x: string]: any; }; -// @public @deprecated (undocumented) -export function fromError(errorValue: any): Observable; - -// @public @deprecated (undocumented) -export function fromPromise(promise: Promise): Observable; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -export type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public @deprecated (undocumented) -export const throwServerError: (response: Response, result: any, message: string) => never; - -// @public @deprecated (undocumented) -export function toPromise(observable: Observable): Promise; - -// @public (undocumented) -export function transformOperation(operation: GraphQLRequest): GraphQLRequest; - -// @public (undocumented) -export function validateOperation(operation: GraphQLRequest): GraphQLRequest; - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-link_ws.api.md b/.api-reports/api-report-link_ws.api.md index 0b067ab255c..89b7036af6f 100644 --- a/.api-reports/api-report-link_ws.api.md +++ b/.api-reports/api-report-link_ws.api.md @@ -4,197 +4,25 @@ ```ts +import { ApolloLink } from '@apollo/client/link'; import type { ClientOptions } from 'subscriptions-transport-ws'; -import type { DocumentNode } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import type { Observable } from 'rxjs'; import { SubscriptionClient } from 'subscriptions-transport-ws'; -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface GraphQLRequest> { - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - // @public (undocumented) export namespace WebSocketLink { - export interface WebSocketParams { + export interface Configuration { options?: ClientOptions; uri: string; webSocketImpl?: any; } } -// Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) +// @public @deprecated export class WebSocketLink extends ApolloLink { constructor(paramsOrClient: WebSocketLink.Configuration | SubscriptionClient); // (undocumented) - request(operation: Operation): Observable | null; -} - -export interface WebSocketParams { - options?: ClientOptions; - uri: string; - webSocketImpl?: any; + request(operation: ApolloLink.Operation): Observable; } // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-local-state.api.md b/.api-reports/api-report-local-state.api.md new file mode 100644 index 00000000000..747567da303 --- /dev/null +++ b/.api-reports/api-report-local-state.api.md @@ -0,0 +1,119 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloClient } from '@apollo/client'; +import type { DefaultContext } from '@apollo/client'; +import type { DocumentNode } from 'graphql'; +import type { FieldNode } from 'graphql'; +import type { FormattedExecutionResult } from 'graphql'; +import type { FragmentMap } from '@apollo/client/utilities/internal'; +import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; +import type { OperationVariables } from '@apollo/client'; +import type { RemoveIndexSignature } from '@apollo/client/utilities/internal'; +import type { TypedDocumentNode } from '@apollo/client'; + +// @public (undocumented) +type InferContextValueFromResolvers = TResolvers extends { + [typename: string]: infer TFieldResolvers; +} ? TFieldResolvers extends ({ + [field: string]: LocalState.Resolver; +}) ? unknown extends TContext ? DefaultContext : TContext : DefaultContext : DefaultContext; + +// @public (undocumented) +export namespace LocalState { + // (undocumented) + export type ContextFunction = (options: ContextFunctionOptions) => TContext; + // (undocumented) + export interface ContextFunctionOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + document: DocumentNode; + // (undocumented) + phase: "exports" | "resolve"; + // (undocumented) + requestContext: DefaultContext; + // (undocumented) + variables: OperationVariables; + } + // Warning: (ae-forgotten-export) The symbol "MaybeRequireContextFunction" needs to be exported by the entry point index.d.ts + export type Options = { + context?: ContextFunction; + resolvers?: TResolvers; + } & MaybeRequireContextFunction; + // (undocumented) + export type Path = Array; + export type Resolver> = (rootValue: TParent, args: TArgs, context: { + requestContext: TContext; + client: ApolloClient; + phase: "exports" | "resolve"; + }, info: { + field: FieldNode; + fragmentMap: FragmentMap; + path: Path; + }) => TResult | Promise; + export interface Resolvers { + // (undocumented) + [typename: string]: { + [field: string]: Resolver; + }; + } + // (undocumented) + export type RootValueFunction = (context: RootValueFunctionContext) => TRootValue; + // (undocumented) + export interface RootValueFunctionContext { + // (undocumented) + client: ApolloClient; + // (undocumented) + context: DefaultContext; + // (undocumented) + document: DocumentNode; + // (undocumented) + phase: "exports" | "resolve"; + // (undocumented) + variables: OperationVariables; + } +} + +// Warning: (ae-forgotten-export) The symbol "InferContextValueFromResolvers" needs to be exported by the entry point index.d.ts +// +// @public +export class LocalState, TContext = InferContextValueFromResolvers> { + constructor(...[options]: {} extends TResolvers ? [ + options?: LocalState.Options> + ] : [ + options: LocalState.Options> & { + resolvers: TResolvers; + } + ]); + addResolvers(resolvers: TResolvers): void; + // (undocumented) + execute({ document, client, context, remoteResult, variables, onlyRunForcedResolvers, returnPartialData, }: { + document: DocumentNode | TypedDocumentNode; + client: ApolloClient; + context: DefaultContext | undefined; + remoteResult: FormattedExecutionResult | undefined; + variables: TVariables | undefined; + onlyRunForcedResolvers?: boolean; + returnPartialData?: boolean; + }): Promise>; + // (undocumented) + getExportedVariables({ document, client, context, variables, }: { + document: DocumentNode | TypedDocumentNode; + client: ApolloClient; + context: DefaultContext | undefined; + variables: Partial>; + }): Promise; +} + +// @public (undocumented) +type MaybeRequireContextFunction = {} extends RemoveIndexSignature ? {} : { + context: LocalState.ContextFunction; +}; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-masking.api.md b/.api-reports/api-report-masking.api.md index 609e6d6469b..21efc419692 100644 --- a/.api-reports/api-report-masking.api.md +++ b/.api-reports/api-report-masking.api.md @@ -4,203 +4,17 @@ ```ts -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { ApolloCache } from '@apollo/client'; +import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; +import type { DocumentNode } from '@apollo/client'; +import type { HKT } from '@apollo/client/utilities'; +import type { IsAny } from '@apollo/client/utilities/internal'; +import type { Prettify } from '@apollo/client/utilities/internal'; +import type { Primitive } from '@apollo/client/utilities/internal'; +import type { RemoveIndexSignature } from '@apollo/client/utilities/internal'; +import type { TypedDocumentNode } from '@apollo/client'; +import type { TypeOverrides } from '@apollo/client'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// @public (undocumented) -namespace Cache_2 { - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface BatchOptions, TUpdateResult = void> { - // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts // @@ -220,137 +34,12 @@ type CombineIntersection = Exclude>; -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts // // @public (undocumented) type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; -// @public (undocumented) -export interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @internal (undocumented) +// @internal @deprecated (undocumented) export const disableWarningsSlot: { readonly id: string; hasValue(): boolean; @@ -371,81 +60,71 @@ type ExtractByMatchingTypeNames = ApplyHKTImplementationWithDefault; + // @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; +export namespace GraphQLCodegenDataMasking { // (undocumented) - typename?: string; + export type FragmentType = [ + TData + ] extends [{ + " $fragmentName"?: infer TKey; + }] ? TKey extends string ? { + " $fragmentRefs"?: { + [key in TKey]: TData; + }; + } : never : never; // (undocumented) - variables?: Record; -} - -// @public (undocumented) -export type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @public (undocumented) -interface InvalidateModifier { + export namespace HKTImplementation { + // (undocumented) + export interface FragmentType extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: GraphQLCodegenDataMasking.FragmentType; + } + // (undocumented) + export interface MaybeMasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: GraphQLCodegenDataMasking.MaybeMasked; + } + // (undocumented) + export interface Unmasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: GraphQLCodegenDataMasking.Unmasked; + } + } + export type MaybeMasked = TData; // (undocumented) - [_invalidateModifier]: true; + export interface TypeOverrides { + // (undocumented) + FragmentType: HKTImplementation.FragmentType; + // (undocumented) + MaybeMasked: HKTImplementation.MaybeMasked; + // (undocumented) + Unmasked: HKTImplementation.Unmasked; + } + // Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts + export type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs> : TData : TData; } -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// @public -export type Masked = TData & { - __masked?: true; -}; - -// @public -export type MaskedDocumentNode = TypedDocumentNode, TVariables>; - -// @internal (undocumented) -export function maskFragment(data: TData, document: TypedDocumentNode | DocumentNode, cache: ApolloCache, fragmentName?: string): TData; +// @internal @deprecated (undocumented) +export function maskFragment(data: TData, document: TypedDocumentNode | DocumentNode, cache: ApolloCache, fragmentName?: string): TData; -// @internal (undocumented) -export function maskOperation(data: TData, document: DocumentNode | TypedDocumentNode, cache: ApolloCache): TData; +// @internal @deprecated (undocumented) +export function maskOperation(data: TData, document: DocumentNode | TypedDocumentNode, cache: ApolloCache): TData; -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// // @public -export type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; +export type MaybeMasked = ApplyHKTImplementationWithDefault; // Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts // @@ -477,146 +156,63 @@ Merged ] extends [never] ? Curr : MergeObjects>; // @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; +namespace PreserveTypes { // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// @public (undocumented) -type OperationVariables = Record; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // + type FragmentType<_TData> = never; // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; + namespace HKTImplementation { + // (undocumented) + interface FragmentType extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: never; + } + // (undocumented) + interface MaybeMasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + // (undocumented) + interface Unmasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + } // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { + type MaybeMasked = TData; // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { + interface TypeOverrides { + // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + FragmentType: HKTImplementation.FragmentType; + // (undocumented) + MaybeMasked: HKTImplementation.MaybeMasked; + // (undocumented) + Unmasked: HKTImplementation.Unmasked; + } // (undocumented) - readonly __ref: string; + type Unmasked = TData; } // @public (undocumented) type RemoveFragmentName = T extends any ? Omit : T; -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - // Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts // // @public (undocumented) type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - // @public (undocumented) type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// // @public -export type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; +export type Unmasked = ApplyHKTImplementationWithDefault; // @public (undocumented) type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { @@ -625,36 +221,6 @@ type UnwrapFragmentRefs = true extends IsAny ? TData : TData exten [K in keyof TData]: UnwrapFragmentRefs; } : TData : never; -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-react.api.md b/.api-reports/api-report-react.api.md index 5e5f19acfc1..9c4f9cd1703 100644 --- a/.api-reports/api-report-react.api.md +++ b/.api-reports/api-report-react.api.md @@ -4,2743 +4,1068 @@ ```ts -import type { ASTNode } from 'graphql'; +import type { ApolloCache } from '@apollo/client'; +import type { ApolloClient } from '@apollo/client'; +import type { DataState } from '@apollo/client'; +import type { DataValue } from '@apollo/client'; +import type { DefaultContext } from '@apollo/client'; +import type { DocumentationTypes } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; +import type { ErrorLike } from '@apollo/client'; +import type { ErrorPolicy } from '@apollo/client'; +import type { FetchMoreFunction } from '@apollo/client/react/internal'; +import type { FetchPolicy } from '@apollo/client'; +import type { FragmentType } from '@apollo/client/masking'; +import type { GetDataState } from '@apollo/client'; +import type { HookWrappers } from '@apollo/client/react/internal'; +import type { IgnoreModifier } from '@apollo/client/cache'; +import type { InternalRefetchQueriesInclude } from '@apollo/client'; +import type { InternalTypes } from '@apollo/client'; +import type { MaybeMasked } from '@apollo/client'; +import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client/masking'; +import type { MissingTree } from '@apollo/client/cache'; +import type { MutationFetchPolicy } from '@apollo/client'; +import type { MutationQueryReducersMap } from '@apollo/client'; +import type { MutationUpdaterFunction } from '@apollo/client'; +import { NetworkStatus } from '@apollo/client'; +import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; +import type { NormalizedExecutionResult } from '@apollo/client'; +import type { ObservableQuery } from '@apollo/client'; +import type { OnQueryUpdated } from '@apollo/client'; +import type { OperationVariables } from '@apollo/client'; +import { PreloadedQueryRef } from '@apollo/client/react/internal'; +import type { PreloadedQueryRef as PreloadedQueryRef_2 } from '@apollo/client/react'; +import type { Prettify } from '@apollo/client/utilities/internal'; +import { QueryRef } from '@apollo/client/react/internal'; +import type { QueryRef as QueryRef_2 } from '@apollo/client/react'; +import type { ReactiveVar } from '@apollo/client'; import type * as ReactTypes from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { VariableDefinitionNode } from 'graphql'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = Context, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const ApolloConsumer: ReactTypes.FC; - -// @public (undocumented) -interface ApolloConsumerProps { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children: (client: ApolloClient) => ReactTypes.ReactNode; -} - -// @public (undocumented) -export interface ApolloContextValue { - // (undocumented) - client?: ApolloClient; - // Warning: (ae-forgotten-export) The symbol "RenderPromises" needs to be exported by the entry point index.d.ts - // - // (undocumented) - renderPromises?: RenderPromises; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloProviderProps" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const ApolloProvider: ReactTypes.FC>; - -// @public (undocumented) -interface ApolloProviderProps { - // (undocumented) - children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; - // (undocumented) - client: ApolloClient; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type BackgroundQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface BackgroundQueryHookOptions extends Pick, "client" | "variables" | "errorPolicy" | "context" | "canonizeResults" | "returnPartialData" | "refetchWritePolicy"> { - // (undocumented) - fetchPolicy?: BackgroundQueryHookFetchPolicy; - // (undocumented) - queryKey?: string | number | any[]; - // @deprecated - skip?: boolean; -} - -// @public (undocumented) -type BackgroundQueryHookOptionsNoInfer = BackgroundQueryHookOptions, NoInfer_2>; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface BaseMutationOptions = ApolloCache> extends MutationSharedOptions { - client?: ApolloClient; - // @deprecated - ignoreResults?: boolean; - notifyOnNetworkStatusChange?: boolean; - onCompleted?: (data: MaybeMasked, clientOptions?: BaseMutationOptions) => void; - onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void; -} - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: Context; - ssr?: boolean; -} - -// @public @deprecated (undocumented) -export interface BaseSubscriptionOptions { - client?: ApolloClient; - context?: Context; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - extensions?: Record; - // Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: FetchPolicy; - ignoreResults?: boolean; - onComplete?: () => void; - onData?: (options: OnDataOptions) => any; - onError?: (error: ApolloError) => void; - // @deprecated - onSubscriptionComplete?: () => void; - // @deprecated - onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; - shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); - skip?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -export type CommonOptions = TOptions & { - client?: ApolloClient; -}; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -export interface Context extends Record { -} - -// @public -export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public (undocumented) -enum DocumentType_2 { - // (undocumented) - Mutation = 1, - // (undocumented) - Query = 0, - // (undocumented) - Subscription = 2 -} -export { DocumentType_2 as DocumentType } - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchMoreFunction = (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TVariables; - }) => Unmasked; -}) => Promise>>; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: Context; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type From = StoreObject | Reference | FragmentType> | string | null; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -export function getApolloContext(): ReactTypes.Context; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: Context; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -export interface IDocumentDefinition { - // (undocumented) - name: string; - // (undocumented) - type: DocumentType_2; - // (undocumented) - variables: ReadonlyArray; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// @public @deprecated (undocumented) -export interface InteropLazyQueryExecResult extends QueryResult { - // @deprecated - called: boolean; - // @deprecated - client: ApolloClient; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - // @deprecated - loading: boolean; - // @deprecated - networkStatus: NetworkStatus; - // @deprecated - observable: ObservableQuery; - // @deprecated - previousData?: MaybeMasked; - // @deprecated - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - // @deprecated - startPolling: (pollInterval: number) => void; - // @deprecated - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - subscribeToMore: SubscribeToMoreFunction; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - // - // @deprecated - updateQuery: (mapFn: UpdateQueryMapFn) => void; - // @deprecated - variables: TVariables | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = Context, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -export interface InteropQueryResult extends QueryResult { - // @deprecated - called: boolean; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = Context, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = Context, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -export type LazyQueryExecFunction = (options?: Partial>) => Promise>; - -// @public (undocumented) -export interface LazyQueryHookExecOptions extends LazyQueryHookOptions { - // (undocumented) - query?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface LazyQueryHookOptions extends BaseQueryOptions { - // @deprecated - context?: Context; - // @internal @deprecated (undocumented) - defaultOptions?: Partial>; - // @deprecated - initialFetchPolicy?: WatchQueryFetchPolicy; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; -} - -// @public @deprecated (undocumented) -export type LazyQueryResult = QueryResult; - -// @public (undocumented) -export type LazyQueryResultTuple = [ -execute: LazyQueryExecFunction, -result: QueryResult -]; - -// @public (undocumented) -export type LoadableQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface LoadableQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: Context; - errorPolicy?: ErrorPolicy; - fetchPolicy?: LoadableQueryHookFetchPolicy; - queryKey?: string | number | any[]; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type LoadQueryFunction = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// @public (undocumented) -export interface MutationDataOptions = ApolloCache> extends BaseMutationOptions { - // (undocumented) - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// @public (undocumented) -export type MutationFunction = ApolloCache> = (options?: MutationFunctionOptions) => Promise>>; - -// @public (undocumented) -export interface MutationFunctionOptions = ApolloCache> extends BaseMutationOptions { - mutation?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface MutationHookOptions = ApolloCache> extends BaseMutationOptions { -} - -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// @public (undocumented) -export interface MutationResult { - called: boolean; - client: ApolloClient; - data?: MaybeMasked | null; - error?: ApolloError; - loading: boolean; - reset: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -export type MutationTuple = ApolloCache> = [ -mutate: (options?: MutationFunctionOptions) => Promise>>, -result: MutationResult -]; - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; -export { NoInfer_2 as NoInfer } - -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -export interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -export interface OnDataOptions { - // (undocumented) - client: ApolloClient; - // (undocumented) - data: SubscriptionResult; -} - -// @public -type OnlyRequiredProperties = { - [K in keyof T as {} extends Pick ? never : K]: T[K]; -}; - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -export interface OnSubscriptionDataOptions { - // (undocumented) - client: ApolloClient; - // (undocumented) - subscriptionData: SubscriptionResult; -} - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => Context; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: Context) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -export function operationName(type: DocumentType_2): string; - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -export function parser(document: DocumentNode): IDocumentDefinition; - -// @public (undocumented) -export namespace parser { - var // (undocumented) - resetCache: () => void; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public -export interface PreloadedQueryRef extends QueryRef { - // @deprecated - toPromise(): Promise>; -} - -// @public (undocumented) -export type PreloadQueryFetchPolicy = Extract; - -// @public -export interface PreloadQueryFunction { - // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptionsArg" needs to be exported by the entry point index.d.ts - >(query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg, TOptions>): PreloadedQueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef | undefined, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - }): PreloadedQueryRef, TVariables>; - (query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg>): PreloadedQueryRef; - // (undocumented) - toPromise>(queryRef: TQueryRef): Promise; -} - -// @public (undocumented) -export type PreloadQueryOptions = { - canonizeResults?: boolean; - context?: Context; - errorPolicy?: ErrorPolicy; - fetchPolicy?: PreloadQueryFetchPolicy; - returnPartialData?: boolean; - refetchWritePolicy?: RefetchWritePolicy; -} & VariablesOption; - -// @public (undocumented) -type PreloadQueryOptionsArg = [TVariables] extends [never] ? [ -options?: PreloadQueryOptions & TOptions -] : {} extends OnlyRequiredProperties ? [ -options?: PreloadQueryOptions> & Omit -] : [ -options: PreloadQueryOptions> & Omit -]; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const QUERY_REF_BRAND: unique symbol; - -// @public (undocumented) -interface QueryData { - // (undocumented) - fetchData(): Promise; - // (undocumented) - getOptions(): any; -} - -// @public (undocumented) -export interface QueryDataOptions extends QueryFunctionOptions { - // (undocumented) - children?: (result: QueryResult) => ReactTypes.ReactNode; - query: DocumentNode | TypedDocumentNode; -} - -// @public @deprecated (undocumented) -export interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// @public (undocumented) -export interface QueryHookOptions extends QueryFunctionOptions { -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public @deprecated (undocumented) -export interface QueryLazyOptions { - context?: Context; - variables?: TVariables; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} +import type { Reference } from '@apollo/client/cache'; +import type { Reference as Reference_2 } from '@apollo/client'; +import type { RefetchFunction } from '@apollo/client/react/internal'; +import type { RefetchWritePolicy } from '@apollo/client'; +import type { StoreObject } from '@apollo/client/cache'; +import type { StoreObject as StoreObject_2 } from '@apollo/client'; +import type { SubscribeToMoreFunction } from '@apollo/client'; +import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode as TypedDocumentNode_2 } from '@apollo/client'; +import type { Unmasked } from '@apollo/client'; +import type { UpdateQueryMapFn } from '@apollo/client'; +import type { VariablesOption } from '@apollo/client/utilities/internal'; +import type { WatchQueryFetchPolicy } from '@apollo/client'; +import type { wrapperSymbol } from '@apollo/client/react/internal'; // @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); +export interface ApolloContextValue { // (undocumented) - queryDeduplication: boolean; + [wrapperSymbol]?: HookWrappers; // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: Context; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public -export interface QueryRef { - // @internal (undocumented) - [QUERY_REF_BRAND]?(variables: TVariables): TData; -} - -// @public @deprecated (undocumented) -export interface QueryReference extends QueryRef { - // @deprecated (undocumented) - toPromise?: unknown; + client?: ApolloClient; } // @public (undocumented) -export interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; +export namespace ApolloProvider { + // (undocumented) + export interface Props { + // (undocumented) + children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; + // (undocumented) + client: ApolloClient; + } } // @public (undocumented) -type QueryStoreValue = Pick; +export const ApolloProvider: ReactTypes.FC; // @public @deprecated (undocumented) -export type QueryTuple = LazyQueryResultTuple; - -// @public (undocumented) -type ReactiveListener = (value: T) => any; +export type BackgroundQueryHookFetchPolicy = useBackgroundQuery.FetchPolicy; -// @public (undocumented) -interface ReactiveVar { - // (undocumented) - (newValue?: T): T; - // (undocumented) - attachCache(cache: ApolloCache): this; - // (undocumented) - forgetCache(cache: ApolloCache): boolean; - // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - onNextChange(listener: ReactiveListener): () => void; -} +// @public @deprecated (undocumented) +export type BackgroundQueryHookOptions = useBackgroundQuery.Options; -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} +// @public +export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} +type From = StoreObject_2 | Reference_2 | FragmentType> | string | null; // @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} +export function getApolloContext(): ReactTypes.Context; -// @public (undocumented) -type RefetchFunction = ObservableQueryFields["refetch"]; +// @public @deprecated (undocumented) +export type LazyQueryExecFunction = useLazyQuery.ExecFunction; -// @public (undocumented) -export type RefetchQueriesFunction = (...args: any[]) => InternalRefetchQueriesInclude; +// @public @deprecated (undocumented) +export type LazyQueryHookExecOptions = useLazyQuery.ExecOptions; -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; +// @public @deprecated (undocumented) +export type LazyQueryHookOptions = useLazyQuery.Options; -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; +// @public @deprecated (undocumented) +export type LazyQueryResult = useLazyQuery.Result; -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} +// @public @deprecated (undocumented) +export type LazyQueryResultTuple = useLazyQuery.ResultTuple; -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; +// @public @deprecated (undocumented) +export type LoadableQueryFetchPolicy = useLoadableQuery.FetchPolicy; -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} +// @public @deprecated (undocumented) +export type LoadableQueryHookOptions = useLoadableQuery.Options; -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; +// @public @deprecated (undocumented) +export type LoadQueryFunction = useLoadableQuery.LoadQueryFunction; // @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; +type MakeRequiredVariablesOptional> = Prettify<{ + [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; +} & Omit>; -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; +// @public @deprecated (undocumented) +export type MutationFunctionOptions = useMutation.MutationFunctionOptions; -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; +// @public @deprecated (undocumented) +export type MutationHookOptions = useMutation.Options; -// @public (undocumented) -type RemoveMaskedMarker = Omit; +// @public @deprecated (undocumented) +export type MutationResult = useMutation.Result; -// @public (undocumented) -class RenderPromises { - // (undocumented) - addObservableQueryPromise(obsQuery: ObservableQuery): ReactTypes.ReactNode; - // Warning: (ae-forgotten-export) The symbol "QueryData" needs to be exported by the entry point index.d.ts - // - // (undocumented) - addQueryPromise(queryInstance: QueryData, finish?: () => ReactTypes.ReactNode): ReactTypes.ReactNode; - // (undocumented) - consumeAndAwaitPromises(): Promise; - // (undocumented) - getSSRObservable(props: QueryDataOptions): ObservableQuery | null; - // (undocumented) - hasPromises(): boolean; - // (undocumented) - registerSSRObservable(observable: ObservableQuery): void; - // (undocumented) - stop(): void; -} +// @public @deprecated (undocumented) +export type MutationTuple = useMutation.ResultTuple; -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; +// @public @deprecated (undocumented) +export type OnDataOptions = useSubscription.OnDataOptions; // @public @deprecated (undocumented) -export const resetApolloContext: typeof getApolloContext; +export type OnSubscriptionDataOptions = useSubscription.OnSubscriptionDataOptions; -// @public (undocumented) -type ResetFunction = () => void; +export { PreloadedQueryRef } // @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; +export type PreloadQueryFetchPolicy = Extract; -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; +// @public +export interface PreloadQueryFunction { + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; + }): PreloadedQueryRef_2; + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + errorPolicy: "ignore" | "all"; + }): PreloadedQueryRef_2; + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + returnPartialData: true; + }): PreloadedQueryRef_2; + (query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ + options?: PreloadQueryOptions> + ] : [options: PreloadQueryOptions>]): PreloadedQueryRef_2; + toPromise>(queryRef: TQueryRef): Promise; } // @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: Context; +export type PreloadQueryOptions = { + context?: DefaultContext; errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - refetchWritePolicy?: RefetchWritePolicy; + fetchPolicy?: PreloadQueryFetchPolicy; returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = Context, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -export type SkipToken = typeof skipToken; - -// @public (undocumented) -export const skipToken: unique symbol; - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: Context; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -export interface SubscriptionCurrentObservable { - // (undocumented) - query?: Observable; - // (undocumented) - subscription?: Subscription; -} + refetchWritePolicy?: RefetchWritePolicy; +} & VariablesOption; // @public @deprecated (undocumented) -export interface SubscriptionDataOptions extends BaseSubscriptionOptions { - // (undocumented) - children?: null | ((result: SubscriptionResult) => ReactTypes.ReactNode); - // (undocumented) - subscription: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface SubscriptionHookOptions extends BaseSubscriptionOptions { -} - -// @public (undocumented) -interface SubscriptionOptions { - context?: Context; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} +export type QueryHookOptions = useQuery.Options; -// @public (undocumented) -export interface SubscriptionResult { - data?: MaybeMasked; - error?: ApolloError; - loading: boolean; - // @internal @deprecated (undocumented) - variables?: TVariables; -} +export { QueryRef } -// @public (undocumented) -export type SuspenseQueryHookFetchPolicy = Extract; +// @public @deprecated (undocumented) +export type QueryResult = useQuery.Result; // @public (undocumented) -export interface SuspenseQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: Context; - errorPolicy?: ErrorPolicy; - fetchPolicy?: SuspenseQueryHookFetchPolicy; - queryKey?: string | number | any[]; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - // @deprecated - skip?: boolean; - variables?: TVariables; -} +export const reactCompilerVersion: string; -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; +type ResetFunction = () => void; // @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; +export type SkipToken = typeof skipToken; // @public (undocumented) -type Transaction = (c: ApolloCache) => void; +export const skipToken: unique symbol; -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} +// @public @deprecated (undocumented) +export type SubscriptionHookOptions = useSubscription.Options; -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; +// @public @deprecated (undocumented) +export type SubscriptionResult = useSubscription.Result; -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; +// @public @deprecated (undocumented) +export type SuspenseQueryHookFetchPolicy = useSuspenseQuery.FetchPolicy; -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +// @public @deprecated (undocumented) +export type SuspenseQueryHookOptions = useSuspenseQuery.Options; // @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; +export function useApolloClient(override?: ApolloClient): ApolloClient; -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// // @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public (undocumented) -export function useApolloClient(override?: ApolloClient): ApolloClient; +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; + fetchPolicy: "no-cache"; +}): [ +QueryRef_2, +useBackgroundQuery.Result +]; -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptionsNoInfer" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function useBackgroundQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer & TOptions): [ -(QueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)), -UseBackgroundQueryResult +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: false; + errorPolicy: "ignore" | "all"; +}): [ +QueryRef_2, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; errorPolicy: "ignore" | "all"; }): [ -QueryRef | undefined, TVariables>, -UseBackgroundQueryResult +QueryRef_2, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { errorPolicy: "ignore" | "all"; }): [ -QueryRef, -UseBackgroundQueryResult +QueryRef_2, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; - returnPartialData: true; + returnPartialData: false; }): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult +QueryRef_2 | undefined, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + skip: boolean; + returnPartialData: boolean; }): [ -QueryRef, TVariables>, -UseBackgroundQueryResult +QueryRef_2 | undefined, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: false; +}): [ +QueryRef_2, +useBackgroundQuery.Result +]; + +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; +}): [ +QueryRef_2, +useBackgroundQuery.Result +]; + +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { skip: boolean; }): [ -QueryRef | undefined, -UseBackgroundQueryResult +QueryRef_2 | undefined, +useBackgroundQuery.Result ]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer): [QueryRef, UseBackgroundQueryResult]; +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken): [undefined, useBackgroundQuery.Result]; -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken): [undefined, UseBackgroundQueryResult]; +// @public +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { + returnPartialData: false; +})): [ +QueryRef_2 | undefined, +useBackgroundQuery.Result +]; // @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { + returnPartialData: boolean; })): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult +QueryRef_2 | undefined, +useBackgroundQuery.Result ]; // @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | BackgroundQueryHookOptionsNoInfer): [ -QueryRef | undefined, -UseBackgroundQueryResult +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useBackgroundQuery.Options> +] : [options: useBackgroundQuery.Options>]): [ +QueryRef_2, +useBackgroundQuery.Result ]; // @public (undocumented) -export type UseBackgroundQueryResult = { - subscribeToMore: SubscribeToMoreFunction; - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; -}; +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken | useBackgroundQuery.Options> +] : [options: SkipToken | useBackgroundQuery.Options>]): [ +QueryRef_2 | undefined, +useBackgroundQuery.Result +]; // @public (undocumented) -export function useFragment(options: UseFragmentOptions): UseFragmentResult; +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options>): [ +QueryRef_2 | undefined, +useBackgroundQuery.Result +]; // @public (undocumented) -export interface UseFragmentOptions extends Omit, NoInfer_2>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - client?: ApolloClient; +export namespace useBackgroundQuery { + import _self = useBackgroundQuery; + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + // @deprecated + skip?: boolean; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useBackgroundQuery { + // (undocumented) + export interface Options extends Base.Options, DocumentationTypes.VariableOptions { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useBackgroundQuery { + // (undocumented) + export interface Result extends useBackgroundQuery.Result { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options): [ + QueryRef_2 | undefined, + useBackgroundQuery.Result + ]; + } // (undocumented) - from: StoreObject | Reference | FragmentType> | string | null; + export type FetchPolicy = Extract; // (undocumented) - optimistic?: boolean; + export type Options = Base.Options & VariablesOption; + // (undocumented) + export interface Result { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } } -// @public (undocumented) -export type UseFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing?: MissingTree; -}; +// @public @deprecated (undocumented) +export type UseBackgroundQueryResult = useBackgroundQuery.Result; // @public -export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer_2>): LazyQueryResultTuple; +export function useFragment(options: useFragment.Options): useFragment.Result; // @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; +export namespace useFragment { + import _self = useFragment; + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useFragment { + // (undocumented) + export interface Options extends useFragment.Options { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useFragment { + // (undocumented) + export interface Result { + // (undocumented) + complete: boolean; + // (undocumented) + data: MaybeMasked_2 | DataValue.Partial>; + missing?: MissingTree; + } + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useFragment({ fragment, from, fragmentName, variables, optimistic, client, }: useFragment.Options): useFragment.Result; + } + // (undocumented) + export interface Options { + client?: ApolloClient; + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + from: StoreObject | Reference | FragmentType> | string | null; + optimistic?: boolean; + variables?: NoInfer_2; + } + // (undocumented) + export type Result = ({ + complete: true; + missing?: never; + } & GetDataState, "complete">) | ({ + complete: false; + missing?: MissingTree; + } & GetDataState, "partial">); +} + +// @public @deprecated (undocumented) +export type UseFragmentOptions = useFragment.Options; + +// @public @deprecated (undocumented) +export type UseFragmentResult = useFragment.Result; + +// @public +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { + returnPartialData: true; +}): useLazyQuery.ResultTuple; + +// @public +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useLazyQuery.ResultTuple; + +// @public +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery.Options, NoInfer_2>): useLazyQuery.ResultTuple; // @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { +export namespace useLazyQuery { + import _self = useLazyQuery; + // (undocumented) + export namespace Base { + // (undocumented) + export interface Result { + client: ApolloClient; + error?: ErrorLike; + fetchMore: (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; + loading: boolean; + networkStatus: NetworkStatus; + observable: ObservableQuery; + previousData?: MaybeMasked; + refetch: (variables?: Partial) => Promise>>; + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn) => void; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useLazyQuery { + // (undocumented) + export interface Options extends useLazyQuery.Options { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useLazyQuery { + // (undocumented) + export interface Result extends Base.Result, DocumentationTypes.DataState, DocumentationTypes.VariableOptions { + called: boolean; + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useLazyQuery { + // (undocumented) + export interface ExecOptions extends DocumentationTypes.VariableOptions { + context?: DefaultContext; + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useLazyQuery { + import ResultTuple = _self.ResultTuple; + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options): useLazyQuery.ResultTuple; + } + // (undocumented) + export type ExecFunction = (...args: {} extends TVariables ? [ + options?: useLazyQuery.ExecOptions + ] : [options: useLazyQuery.ExecOptions]) => ObservableQuery.ResultPromise>; + // (undocumented) + export type ExecOptions = { + context?: DefaultContext; + } & VariablesOption; + // (undocumented) + export interface Options { + client?: ApolloClient; + errorPolicy?: ErrorPolicy; + fetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: InternalTypes.NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + } + // (undocumented) + export type Result["dataState"] = DataState["dataState"]> = Base.Result & (({ + called: true; + variables: TVariables; + } & GetDataState, TStates>) | { + called: false; + variables: Partial; + data: undefined; + dataState: "empty"; + }); + // (undocumented) + export type ResultTuple["dataState"] = DataState["dataState"]> = [ + execute: ExecFunction, + result: useLazyQuery.Result + ]; +} + +// @public +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult | undefined, TVariables>; +}): useLoadableQuery.Result; -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { +// @public +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult; +}): useLoadableQuery.Result; -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { +// @public +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { returnPartialData: true; -}): UseLoadableQueryResult, TVariables>; +}): useLoadableQuery.Result; // @public -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery.Options): useLoadableQuery.Result; // @public (undocumented) -export type UseLoadableQueryResult = [ -loadQuery: LoadQueryFunction, -queryRef: QueryRef | null, -handlers: { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; - reset: ResetFunction; +export namespace useLoadableQuery { + // (undocumented) + export namespace DocumentationTypes { + export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options): useLoadableQuery.Result; + } + // (undocumented) + export type FetchPolicy = Extract; + // (undocumented) + export interface Handlers { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + // Warning: (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts + reset: ResetFunction; + subscribeToMore: SubscribeToMoreFunction; + } + // (undocumented) + export type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + } + // (undocumented) + export type Result["dataState"] = DataState["dataState"]> = [ + loadQuery: LoadQueryFunction, + queryRef: QueryRef_2 | null, + handlers: Handlers + ]; +} + +// @public @deprecated (undocumented) +export type UseLoadableQueryResult = useLoadableQuery.Result; + +// Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional" needs to be exported by the entry point index.d.ts +// +// @public +export function useMutation = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options, NoInfer_2, TCache, { + [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; +}>): useMutation.ResultTuple, TCache>; + +// @public (undocumented) +export namespace useMutation { + // (undocumented) + export namespace DocumentationTypes { + export function useMutation(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options): useMutation.ResultTuple; + } + // (undocumented) + export type MutationFunction = (...[options]: {} extends TVariables ? [ + options?: MutationFunctionOptions & { + variables?: TVariables; + } + ] : [ + options: MutationFunctionOptions & { + variables: TVariables; + } + ]) => Promise>>; + // (undocumented) + export type MutationFunctionOptions = Options; + // (undocumented) + export interface Options = Partial> { + awaitRefetchQueries?: boolean; + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + fetchPolicy?: MutationFetchPolicy; + keepRootFields?: boolean; + notifyOnNetworkStatusChange?: boolean; + onCompleted?: (data: MaybeMasked, clientOptions?: Options) => void; + onError?: (error: ErrorLike, clientOptions?: Options) => void; + onQueryUpdated?: OnQueryUpdated; + optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked> | IgnoreModifier); + refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; + update?: MutationUpdaterFunction; + updateQueries?: MutationQueryReducersMap; + variables?: TConfiguredVariables; + } + // (undocumented) + export interface Result { + called: boolean; + client: ApolloClient; + data: MaybeMasked | null | undefined; + error: ErrorLike | undefined; + loading: boolean; + reset: () => void; + } + // (undocumented) + export type ResultTuple = [ + mutate: MutationFunction, + result: Result + ]; } -]; // @public -export function useMutation = ApolloCache>(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions, NoInfer_2, TContext, TCache>): MutationTuple; +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { + returnPartialData: true; +}): useQuery.Result; + +// @public +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useQuery.Result; // @public -export function useQuery(query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions, NoInfer_2>): InteropQueryResult; +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useQuery.Options, NoInfer_2> +] : [options: useQuery.Options, NoInfer_2>]): useQuery.Result; + +// @public (undocumented) +export namespace useQuery { + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + fetchPolicy?: WatchQueryFetchPolicy; + initialFetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: InternalTypes.NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + skip?: boolean; + skipPollAttempt?: () => boolean; + ssr?: boolean; + } + } + // (undocumented) + export namespace Base { + // (undocumented) + export interface Result { + client: ApolloClient; + error?: ErrorLike; + fetchMore: (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; + loading: boolean; + networkStatus: NetworkStatus; + observable: ObservableQuery; + previousData?: MaybeMasked_2; + refetch: (variables?: Partial) => Promise>>; + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn) => void; + variables: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useQuery { + // (undocumented) + export interface Options extends Base.Options, DocumentationTypes.VariableOptions { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useQuery { + // (undocumented) + export interface Result extends Base.Result, DocumentationTypes.DataState { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options): useQuery.Result; + } + // (undocumented) + export type Options = Base.Options & VariablesOption; + // (undocumented) + export type Result["dataState"] = DataState["dataState"]> = Base.Result & GetDataState, TStates>; +} + +// @public (undocumented) +export namespace useQuery { + var // (undocumented) + ssrDisabledResult: ObservableQuery.Result; +} // @public -export function useQueryRefHandlers(queryRef: QueryRef): UseQueryRefHandlersResult; +export function useQueryRefHandlers(queryRef: QueryRef_2["dataState"]>): useQueryRefHandlers.Result; // @public (undocumented) -export interface UseQueryRefHandlersResult { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; +export namespace useQueryRefHandlers { + // (undocumented) + export namespace DocumentationTypes { + export function useQueryRefHandlers(queryRef: QueryRef_2): useQueryRefHandlers.Result; + } + // (undocumented) + export interface Result { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } } -// Warning: (ae-forgotten-export) The symbol "ReactiveVar" needs to be exported by the entry point index.d.ts -// +// @public @deprecated (undocumented) +export type UseQueryRefHandlersResult = useQueryRefHandlers.Result; + // @public export function useReactiveVar(rv: ReactiveVar): T; -// @public (undocumented) -export function useReadQuery(queryRef: QueryRef): UseReadQueryResult; +// @public +export function useReadQuery["dataState"]>(queryRef: QueryRef_2): useReadQuery.Result; // @public (undocumented) -export interface UseReadQueryResult { - data: MaybeMasked; - error: ApolloError | undefined; - networkStatus: NetworkStatus; +export namespace useReadQuery { + // (undocumented) + export namespace Base { + // (undocumented) + export interface Result { + error: ErrorLike | undefined; + networkStatus: NetworkStatus; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useReadQuery { + // (undocumented) + export interface Result extends Base.Result, DocumentationTypes.DataState { + } + } + export function useReadQuery(queryRef: QueryRef_2): useReadQuery.Result; + } + // (undocumented) + export type Result["dataState"] = DataState["dataState"]> = Base.Result & GetDataState, TStates>; } +// @public @deprecated (undocumented) +export type UseReadQueryResult = useReadQuery.Result; + // @public -export function useSubscription(subscription: DocumentNode | TypedDocumentNode, options?: SubscriptionHookOptions, NoInfer_2>): { - restart: () => void; - loading: boolean; - data?: TData | undefined; - error?: ApolloError; - variables?: TVariables | undefined; -}; +export function useSubscription(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ +options?: useSubscription.Options, NoInfer_2> +] : [options: useSubscription.Options, NoInfer_2>]): useSubscription.Result; // @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { +export namespace useSubscription { + import _self = useSubscription; + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + extensions?: Record; + fetchPolicy?: FetchPolicy; + ignoreResults?: boolean; + onComplete?: () => void; + onData?: (options: OnDataOptions) => any; + onError?: (error: ErrorLike) => void; + shouldResubscribe?: boolean | ((options: Options) => boolean); + skip?: boolean; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useSubscription { + // (undocumented) + export interface Options extends Base.Options, DocumentationTypes.VariableOptions { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useSubscription { + // (undocumented) + export interface Result extends useSubscription.Result { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useSubscription(options?: useSubscription.Options): useSubscription.Result; + } + // (undocumented) + export interface OnDataOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + data: OnDataResult; + } + // (undocumented) + export type OnDataResult = Omit, "restart">; + // (undocumented) + export interface OnSubscriptionDataOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + subscriptionData: OnDataResult; + } + // (undocumented) + export type Options = Base.Options & VariablesOption; + // (undocumented) + export interface Result { + data?: MaybeMasked_2; + error?: ErrorLike; + loading: boolean; + restart: () => void; + } +} + +// @public +export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: NonNullable>; -}): UseSuspenseFragmentResult; +}): useSuspenseFragment.Result; -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { +// @public +export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: null; -}): UseSuspenseFragmentResult; +}): useSuspenseFragment.Result; -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { +// @public +export function useSuspenseFragment(options: useSuspenseFragment.Options & { from: From; -}): UseSuspenseFragmentResult; +}): useSuspenseFragment.Result; -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; +// @public +export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; // @public (undocumented) -export type UseSuspenseFragmentOptions = { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: From; - optimistic?: boolean; - client?: ApolloClient; -} & VariablesOption>; +export namespace useSuspenseFragment { + import _self = useSuspenseFragment; + // (undocumented) + export namespace Base { + // (undocumented) + export type Options = { + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + from: From; + optimistic?: boolean; + client?: ApolloClient; + }; + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useSuspenseFragment { + // (undocumented) + export interface Options extends Base.Options, DocumentationTypes.VariableOptions { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export namespace useSuspenseFragment { + // (undocumented) + export interface Result extends useSuspenseFragment.Result { + } + } + } + // (undocumented) + export namespace DocumentationTypes { + export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; + } + // (undocumented) + export type Options = Base.Options & VariablesOption>; + // (undocumented) + export interface Result { + // (undocumented) + data: DataValue.Complete>; + } +} -// @public (undocumented) -export type UseSuspenseFragmentResult = { - data: MaybeMasked; -}; +// @public @deprecated (undocumented) +export type UseSuspenseFragmentOptions = useSuspenseFragment.Options; -// @public (undocumented) -export function useSuspenseQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2> & TOptions): UseSuspenseQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? TOptions["skip"] extends boolean ? DeepPartial | undefined : DeepPartial : TOptions["skip"] extends boolean ? TData | undefined : TData, TVariables>; +// @public @deprecated (undocumented) +export type UseSuspenseFragmentResult = useSuspenseFragment.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult | undefined, TVariables>; +}): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult; +}): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; returnPartialData: true; -}): UseSuspenseQueryResult | undefined, TVariables>; +}): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { returnPartialData: true; -}): UseSuspenseQueryResult, TVariables>; +}): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { skip: boolean; -}): UseSuspenseQueryResult; +}): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (SuspenseQueryHookOptions, NoInfer_2> & { +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useSuspenseQuery.Options> & { returnPartialData: true; -})): UseSuspenseQueryResult | undefined, TVariables>; +})): useSuspenseQuery.Result; -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useSuspenseQuery.Options> +] : [options: useSuspenseQuery.Options>]): useSuspenseQuery.Result; + +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken | useSuspenseQuery.Options> +] : [options: SkipToken | useSuspenseQuery.Options>]): useSuspenseQuery.Result; + +// @public +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useSuspenseQuery.Options>): useSuspenseQuery.Result; // @public (undocumented) -export interface UseSuspenseQueryResult { +export namespace useSuspenseQuery { + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext; + errorPolicy?: ErrorPolicy; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + refetchWritePolicy?: RefetchWritePolicy; + returnPartialData?: boolean; + // @deprecated + skip?: boolean; + } + } // (undocumented) - client: ApolloClient; + export namespace Base { + // (undocumented) + export interface Result { + client: ApolloClient; + error: ErrorLike | undefined; + fetchMore: FetchMoreFunction; + networkStatus: NetworkStatus; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } + } // (undocumented) - data: MaybeMasked; + export namespace DocumentationTypes { + // (undocumented) + export namespace useSuspenseQuery { + // (undocumented) + export interface Options extends Base.Options, DocumentationTypes.VariableOptions { + } + } + } // (undocumented) - error: ApolloError | undefined; + export namespace DocumentationTypes { + // (undocumented) + export namespace useSuspenseQuery { + // (undocumented) + export interface Result extends Base.Result, DocumentationTypes.DataState { + } + } + } // (undocumented) - fetchMore: FetchMoreFunction; + export namespace DocumentationTypes { + export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useSuspenseQuery.Options): useSuspenseQuery.Result; + } // (undocumented) - networkStatus: NetworkStatus; + export type FetchPolicy = Extract; // (undocumented) - refetch: RefetchFunction; + export type Options = Base.Options & VariablesOption; // (undocumented) - subscribeToMore: SubscribeToMoreFunction; -} - -// @public (undocumented) -export type VariablesOption = [ -TVariables -] extends [never] ? { - variables?: Record; -} : Record extends OnlyRequiredProperties ? { - variables?: TVariables; -} : { - variables: TVariables; -}; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; + export type Result["dataState"] = DataState["dataState"]> = Base.Result & GetDataState, TStates>; } -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} +// @public @deprecated (undocumented) +export type UseSuspenseQueryResult = useSuspenseQuery.Result; // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:52:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:76:4 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useLoadableQuery.ts:125:9 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useSuspenseFragment.ts:70:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts +// src/react/hooks/useSuspenseFragment.ts:111:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-react_compiled.api.md b/.api-reports/api-report-react_compiled.api.md new file mode 100644 index 00000000000..9ec5e67c9c5 --- /dev/null +++ b/.api-reports/api-report-react_compiled.api.md @@ -0,0 +1,2377 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloCache } from '@apollo/client/cache'; +import type { ApolloCache as ApolloCache_2 } from '@apollo/client'; +import type { ApolloClient } from '@apollo/client'; +import { ApolloLink } from '@apollo/client/link'; +import type { ApolloQueryResult as ApolloQueryResult_2 } from '@apollo/client'; +import type { ApplyHKTImplementationWithDefault } from '@apollo/client/utilities/internal'; +import type { Cache as Cache_2 } from '@apollo/client/cache'; +import type { ClientAwarenessLink } from '@apollo/client/link/client-awareness'; +import type { DataProxy } from '@apollo/client/cache'; +import type { DataState as DataState_2 } from '@apollo/client'; +import type { DeepPartial } from '@apollo/client/utilities'; +import type { DefaultContext as DefaultContext_2 } from '@apollo/client'; +import type { DocumentationTypes } from '@apollo/client/utilities/internal'; +import type { DocumentNode } from 'graphql'; +import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; +import { DocumentTransform } from '@apollo/client/utilities'; +import type { ErrorLike as ErrorLike_2 } from '@apollo/client'; +import type { ErrorPolicy as ErrorPolicy_2 } from '@apollo/client'; +import type { FetchMoreFunction } from '@apollo/client/react/internal'; +import type { FetchMoreOptions as FetchMoreOptions_2 } from '@apollo/client'; +import type { FetchPolicy as FetchPolicy_2 } from '@apollo/client'; +import type { FetchResult } from '@apollo/client/link'; +import type { FormattedExecutionResult } from 'graphql'; +import type { FragmentType } from '@apollo/client/masking'; +import { getApolloClientMemoryInternals } from '@apollo/client/utilities/internal'; +import type { GetDataState as GetDataState_2 } from '@apollo/client'; +import { gql } from '@apollo/client'; +import type { GraphQLRequest } from '@apollo/client/link'; +import type { HKT } from '@apollo/client/utilities'; +import type { HookWrappers } from '@apollo/client/react/internal'; +import type { IgnoreModifier } from '@apollo/client/cache'; +import type { Incremental } from '@apollo/client/incremental'; +import type { InternalRefetchQueriesInclude as InternalRefetchQueriesInclude_2 } from '@apollo/client'; +import type { InteropObservable } from 'rxjs'; +import type { IsAny } from '@apollo/client/utilities/internal'; +import type { LocalState } from '@apollo/client/local-state'; +import type { MaybeMasked } from '@apollo/client/masking'; +import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client'; +import type { MissingTree } from '@apollo/client/cache'; +import type { MutateResult as MutateResult_2 } from '@apollo/client'; +import type { MutationFetchPolicy as MutationFetchPolicy_2 } from '@apollo/client'; +import type { MutationQueryReducersMap as MutationQueryReducersMap_2 } from '@apollo/client'; +import type { MutationUpdaterFunction as MutationUpdaterFunction_2 } from '@apollo/client'; +import { NetworkStatus as NetworkStatus_2 } from '@apollo/client'; +import type { NextNotification } from 'rxjs'; +import type { NoInfer as NoInfer_2 } from '@apollo/client/utilities/internal'; +import type { NormalizedExecutionResult as NormalizedExecutionResult_2 } from '@apollo/client'; +import { Observable } from 'rxjs'; +import type { ObservableNotification } from 'rxjs'; +import type { ObservableQuery as ObservableQuery_2 } from '@apollo/client'; +import type { Observer } from 'rxjs'; +import type { OnQueryUpdated as OnQueryUpdated_2 } from '@apollo/client'; +import { OperationTypeNode } from 'graphql'; +import type { OperationVariables } from '@apollo/client'; +import { PreloadedQueryRef } from '@apollo/client/react/internal'; +import type { Prettify } from '@apollo/client/utilities/internal'; +import { QueryRef } from '@apollo/client/react/internal'; +import type { QueryResult as QueryResult_3 } from '@apollo/client'; +import type { ReactiveVar } from '@apollo/client'; +import type * as ReactTypes from 'react'; +import type { Reference } from '@apollo/client/cache'; +import type { Reference as Reference_2 } from '@apollo/client'; +import type { RefetchFunction } from '@apollo/client/react/internal'; +import type { RefetchWritePolicy as RefetchWritePolicy_2 } from '@apollo/client'; +import type { StoreObject } from '@apollo/client/cache'; +import type { StoreObject as StoreObject_2 } from '@apollo/client'; +import type { Subscribable } from 'rxjs'; +import type { SubscribeToMoreFunction } from '@apollo/client'; +import type { Subscription } from 'rxjs'; +import { Trie } from '@wry/trie'; +import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode as TypedDocumentNode_2 } from '@apollo/client'; +import type { Unmasked } from '@apollo/client/masking'; +import type { Unmasked as Unmasked_2 } from '@apollo/client'; +import type { UpdateQueryMapFn as UpdateQueryMapFn_2 } from '@apollo/client'; +import type { VariablesOption } from '@apollo/client/utilities/internal'; +import type { WatchFragmentOptions } from '@apollo/client/cache'; +import type { WatchFragmentResult } from '@apollo/client/cache'; +import type { WatchQueryFetchPolicy } from '@apollo/client'; +import type { WatchQueryOptions } from '@apollo/client'; +import type { wrapperSymbol } from '@apollo/client/react/internal'; + +// @public +class ApolloClient_2 implements DataProxy { + // (undocumented) + __actionHookForDevTools(cb: () => any): void; + // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.compiled.d.ts + constructor(options: ApolloClientOptions); + // (undocumented) + __requestRaw(payload: GraphQLRequest): Observable>; + // (undocumented) + cache: ApolloCache; + clearStore(): Promise; + // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + get defaultContext(): Partial; + // (undocumented) + defaultOptions: DefaultOptions; + // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + readonly devtoolsConfig: DevtoolsOptions; + // @deprecated (undocumented) + disableNetworkFetches: never; + get documentTransform(): DocumentTransform; + extract(optimistic?: boolean): unknown; + getMemoryInternals?: typeof getApolloClientMemoryInternals; + // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.compiled.d.ts + getObservableQueries(include?: RefetchQueriesInclude): Set>; + // (undocumented) + link: ApolloLink; + get localState(): LocalState | undefined; + set localState(localState: LocalState); + // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "MutateResult" needs to be exported by the entry point index.compiled.d.ts + mutate(options: MutationOptions): Promise>>; + onClearStore(cb: () => Promise): () => void; + onResetStore(cb: () => Promise): () => void; + set prioritizeCacheValues(value: boolean); + get prioritizeCacheValues(): boolean; + // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryResult_2" needs to be exported by the entry point index.compiled.d.ts + query(options: QueryOptions): Promise>>; + // (undocumented) + queryDeduplication: boolean; + readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; + readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; + // @deprecated + reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; + refetchObservableQueries(includeStandby?: boolean): Promise[]>; + // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.compiled.d.ts + refetchQueries>>(options: RefetchQueriesOptions): RefetchQueriesResult; + resetStore(): Promise[] | null>; + restore(serializedState: unknown): ApolloCache; + setLink(newLink: ApolloLink): void; + stop(): void; + // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "SubscriptionObservable" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "SubscribeResult" needs to be exported by the entry point index.compiled.d.ts + subscribe(options: SubscriptionOptions): SubscriptionObservable>>; + // (undocumented) + version: string; + watchFragment(options: WatchFragmentOptions): Observable>; + // Warning: (ae-forgotten-export) The symbol "OperationVariables_2" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions_2" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.compiled.d.ts + watchQuery(options: WatchQueryOptions_2): ObservableQuery; + writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; + writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; +} + +// @public (undocumented) +interface ApolloClientOptions { + assumeImmutableResults?: boolean; + cache: ApolloCache; + // (undocumented) + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + dataMasking?: boolean; + // (undocumented) + defaultContext?: Partial; + defaultOptions?: DefaultOptions; + devtools?: DevtoolsOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; + incrementalHandler?: Incremental.Handler; + link: ApolloLink; + // (undocumented) + localState?: LocalState; + queryDeduplication?: boolean; + ssrForceFetchDelay?: number; + ssrMode?: boolean; +} + +// Warning: (ae-forgotten-export) The symbol "ApolloConsumer_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +export const ApolloConsumer: ReactTypes.FC; + +// @public (undocumented) +namespace ApolloConsumer_2 { + // (undocumented) + interface Props { + // (undocumented) + children: (client: ApolloClient) => ReactTypes.ReactNode; + } +} + +// @public (undocumented) +const ApolloConsumer: ReactTypes.FC; + +// @public (undocumented) +export interface ApolloContextValue { + // (undocumented) + [wrapperSymbol]?: HookWrappers; + // (undocumented) + client?: ApolloClient; +} + +// @public (undocumented) +export namespace ApolloProvider { + // (undocumented) + export interface Props { + // (undocumented) + children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; + // (undocumented) + client: ApolloClient; + } +} + +// @public (undocumented) +export const ApolloProvider: ReactTypes.FC; + +// Warning: (ae-forgotten-export) The symbol "DataState" needs to be exported by the entry point index.compiled.d.ts +// Warning: (ae-forgotten-export) The symbol "GetDataState" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +type ApolloQueryResult["dataState"] = DataState["dataState"]> = { + error?: ErrorLike; + loading: boolean; + networkStatus: NetworkStatus; + partial: boolean; +} & GetDataState; + +// Warning: (ae-forgotten-export) The symbol "useBackgroundQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type BackgroundQueryHookFetchPolicy = useBackgroundQuery_2.FetchPolicy; + +// @public @deprecated (undocumented) +export type BackgroundQueryHookOptions = useBackgroundQuery_2.Options; + +// @public +export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; + +// @public (undocumented) +type DataState = { + data: DataValue.Complete; + dataState: "complete"; +} | { + data: DataValue.Streaming; + dataState: "streaming"; +} | { + data: DataValue.Partial; + dataState: "partial"; +} | { + data: undefined; + dataState: "empty"; +}; + +// @public (undocumented) +namespace DataValue { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts + type Complete = ApplyHKTImplementationWithDefault; + type Partial = ApplyHKTImplementationWithDefault; + type Streaming = ApplyHKTImplementationWithDefault; +} + +// @public (undocumented) +interface DefaultContext extends Record { + // (undocumented) + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + queryDeduplication?: boolean; +} + +// @public (undocumented) +interface DefaultOptions { + // (undocumented) + mutate?: Partial>; + // (undocumented) + query?: Partial>; + // (undocumented) + watchQuery?: Partial>; +} + +// @public (undocumented) +interface DevtoolsOptions { + enabled?: boolean; + name?: string; +} + +// @public +interface ErrorLike { + // (undocumented) + message: string; + // (undocumented) + name: string; + // (undocumented) + stack?: string; +} + +// @public +type ErrorPolicy = "none" | "ignore" | "all"; + +// @public (undocumented) +type FetchMoreOptions = { + query?: DocumentNode | TypedDocumentNode; + variables?: Partial>; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + updateQuery?: (previousQueryResult: Unmasked, options: { + fetchMoreResult: Unmasked; + variables: TFetchVars; + }) => Unmasked; +}; + +// @public +type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; + +// @public (undocumented) +type From = StoreObject_2 | Reference_2 | FragmentType> | string | null; + +// @public (undocumented) +type From_2 = StoreObject_2 | Reference_2 | FragmentType> | string | null; + +// @public (undocumented) +export function getApolloContext(): ReactTypes.Context; + +// @public (undocumented) +type GetDataState["dataState"]> = Extract, { + dataState: TState; +}>; + +export { gql } + +// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.compiled.d.ts +// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; + +// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; + +// @public (undocumented) +interface InternalRefetchQueriesOptions extends Omit, "include"> { + // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + include?: InternalRefetchQueriesInclude; + // (undocumented) + removeOptimistic?: string; +} + +// @public (undocumented) +type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; + +// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; + +// Warning: (ae-forgotten-export) The symbol "useLazyQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type LazyQueryExecFunction = useLazyQuery_2.ExecFunction; + +// @public @deprecated (undocumented) +export type LazyQueryHookExecOptions = useLazyQuery_2.ExecOptions; + +// @public @deprecated (undocumented) +export type LazyQueryHookOptions = useLazyQuery_2.Options; + +// @public @deprecated (undocumented) +export type LazyQueryResult = useLazyQuery_2.Result; + +// @public @deprecated (undocumented) +export type LazyQueryResultTuple = useLazyQuery_2.ResultTuple; + +// Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type LoadableQueryFetchPolicy = useLoadableQuery_2.FetchPolicy; + +// @public @deprecated (undocumented) +export type LoadableQueryHookOptions = useLoadableQuery_2.Options; + +// @public @deprecated (undocumented) +export type LoadQueryFunction = useLoadableQuery_2.LoadQueryFunction; + +// @public (undocumented) +type MakeRequiredVariablesOptional> = Prettify<{ + [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; +} & Omit>; + +// @public (undocumented) +type MakeRequiredVariablesOptional_2> = Prettify<{ + [K in keyof TVariables as K extends keyof TConfiguredVariables ? K : never]?: TVariables[K]; +} & Omit>; + +// @public (undocumented) +interface MaskFragmentOptions { + // (undocumented) + data: TData; + // (undocumented) + fragment: DocumentNode; + // (undocumented) + fragmentName?: string; +} + +// @public (undocumented) +interface MaskOperationOptions { + cause?: object; + // (undocumented) + data: TData; + // (undocumented) + document: DocumentNode; + // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + fetchPolicy?: WatchQueryFetchPolicy_2; +} + +// @public (undocumented) +interface MutateResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; +} + +// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +type MutationFetchPolicy = Extract; + +// Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type MutationFunctionOptions = useMutation_2.MutationFunctionOptions; + +// @public @deprecated (undocumented) +export type MutationHookOptions = useMutation_2.Options; + +// @public (undocumented) +type MutationOptions = { + optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked> | IgnoreModifier); + updateQueries?: MutationQueryReducersMap; + refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; + awaitRefetchQueries?: boolean; + update?: MutationUpdaterFunction; + onQueryUpdated?: OnQueryUpdated; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: MutationFetchPolicy; + keepRootFields?: boolean; + mutation: DocumentNode | TypedDocumentNode; +} & VariablesOption>; + +// @public (undocumented) +type MutationQueryReducer = (previousResult: Record, options: { + mutationResult: NormalizedExecutionResult>; + queryName: string | undefined; + queryVariables: Record; +}) => Record; + +// @public (undocumented) +type MutationQueryReducersMap = { + [queryName: string]: MutationQueryReducer; +}; + +// @public @deprecated (undocumented) +export type MutationResult = useMutation_2.Result; + +// @public (undocumented) +interface MutationStoreValue { + // (undocumented) + error: Error | null; + // (undocumented) + loading: boolean; + // (undocumented) + mutation: DocumentNode; + // (undocumented) + variables: Record; +} + +// @public @deprecated (undocumented) +export type MutationTuple = useMutation_2.ResultTuple; + +// @public (undocumented) +type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { + context?: DefaultContext; + variables?: TVariables; +}) => void; + +// @public +enum NetworkStatus { + error = 8, + fetchMore = 3, + loading = 1, + poll = 6, + ready = 7, + refetch = 4, + setVariables = 2, + streaming = 9 +} + +// @public (undocumented) +interface NextFetchPolicyContext { + // (undocumented) + initialFetchPolicy: WatchQueryFetchPolicy_2; + // (undocumented) + observable: ObservableQuery; + // (undocumented) + options: WatchQueryOptions_2; + // (undocumented) + reason: "after-fetch" | "variables-changed"; +} + +// @public +type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; + +// @public (undocumented) +interface ObservableAndInfo { + // (undocumented) + fromLink: boolean; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + observable: Observable>; +} + +// @public (undocumented) +namespace ObservableQuery { + // @internal @deprecated + interface CacheWatchOptions extends Cache_2.WatchOptions { + // @deprecated + lastOwnDiff?: Cache_2.DiffResult; + } + // (undocumented) + type Options = { + fetchPolicy: WatchQueryFetchPolicy_2; + nextFetchPolicy?: WatchQueryFetchPolicy_2 | ((this: WatchQueryOptions_2, currentFetchPolicy: WatchQueryFetchPolicy_2, context: NextFetchPolicyContext) => WatchQueryFetchPolicy_2); + initialFetchPolicy: WatchQueryFetchPolicy_2; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode | TypedDocumentNode; + variables: TVariables; + }; + interface ResultPromise extends Promise { + retain(): this; + } +} + +// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +class ObservableQuery implements Subscribable>>, InteropObservable>> { + // (undocumented) + ["@@observable"]: () => Subscribable>>; + // (undocumented) + [Symbol.observable]: () => Subscribable>>; + constructor({ queryManager, options, transformedQuery, }: { + queryManager: QueryManager; + options: WatchQueryOptions_2; + transformedQuery?: DocumentNode | TypedDocumentNode; + queryId?: string; + }); + // @internal @deprecated (undocumented) + applyOptions(newOptions: Partial>): void; + // Warning: (ae-forgotten-export) The symbol "FetchMoreOptions" needs to be exported by the entry point index.compiled.d.ts + fetchMore(options: FetchMoreOptions): Promise>; + // @internal @deprecated (undocumented) + getCacheDiff({ optimistic }?: { + optimistic?: boolean | undefined; + }): Cache_2.DiffResult; + // (undocumented) + getCurrentResult(): ApolloQueryResult>; + // (undocumented) + hasObservers(): boolean; + // @internal @deprecated + _lastWrite?: unknown; + // @internal @deprecated (undocumented) + notify(scheduled?: boolean): void; + // (undocumented) + readonly options: ObservableQuery.Options; + // (undocumented) + pipe: Observable>>["pipe"]; + // (undocumented) + get query(): TypedDocumentNode; + // (undocumented) + readonly queryName?: string; + refetch(variables?: Partial): ObservableQuery.ResultPromise>; + reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; + // @internal @deprecated + reset(): void; + setVariables(variables: TVariables): Promise>; + startPolling(pollInterval: number): void; + stop(): void; + stopPolling(): void; + // (undocumented) + subscribe: (observer: Partial>>> | ((value: ApolloQueryResult>) => void)) => Subscription; + // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.compiled.d.ts + subscribeToMore(options: SubscribeToMoreOptions): () => void; + // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.compiled.d.ts + updateQuery(mapFn: UpdateQueryMapFn): void; + get variables(): TVariables; +} + +// Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type OnDataOptions = useSubscription_2.OnDataOptions; + +// @public (undocumented) +type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; + +// @public @deprecated (undocumented) +export type OnSubscriptionDataOptions = useSubscription_2.OnSubscriptionDataOptions; + +// @public (undocumented) +type OperationVariables_2 = Record; + +// @public (undocumented) +namespace OverridableTypes { + // (undocumented) + interface Complete extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + // (undocumented) + interface Defaults { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + Complete: Complete; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + Partial: Partial; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + Streaming: Streaming; + } + // (undocumented) + interface Partial extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: DeepPartial; + } + // (undocumented) + interface Streaming extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + {}; +} + +export { PreloadedQueryRef } + +// @public (undocumented) +export type PreloadQueryFetchPolicy = Extract; + +// @public +export interface PreloadQueryFunction { + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; + }): PreloadedQueryRef; + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + errorPolicy: "ignore" | "all"; + }): PreloadedQueryRef; + (query: DocumentNode_2 | TypedDocumentNode_2, options: PreloadQueryOptions> & { + returnPartialData: true; + }): PreloadedQueryRef; + (query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ + options?: PreloadQueryOptions> + ] : [options: PreloadQueryOptions>]): PreloadedQueryRef; + toPromise>(queryRef: TQueryRef): Promise; +} + +// @public (undocumented) +export type PreloadQueryOptions = { + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: PreloadQueryFetchPolicy; + returnPartialData?: boolean; + refetchWritePolicy?: RefetchWritePolicy_2; +} & VariablesOption; + +// Warning: (ae-forgotten-export) The symbol "useQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type QueryHookOptions = useQuery_2.Options; + +// @public (undocumented) +class QueryManager { + // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.compiled.d.ts + constructor(options: QueryManagerOptions); + // (undocumented) + readonly assumeImmutableResults: boolean; + // (undocumented) + broadcastQueries(): void; + // (undocumented) + get cache(): ApolloCache; + // (undocumented) + clearStore(options?: Cache_2.ResetOptions): Promise; + // Warning: (ae-forgotten-export) The symbol "ApolloClient_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + readonly client: ApolloClient_2; + readonly clientOptions: ApolloClientOptions; + // (undocumented) + readonly dataMasking: boolean; + // (undocumented) + readonly defaultContext: Partial; + // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + defaultOptions: DefaultOptions; + // (undocumented) + readonly documentTransform: DocumentTransform; + // (undocumented) + protected fetchCancelFns: Map any>; + // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + fetchObservableWithInfo(options: WatchQueryOptions_2, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, }: { + networkStatus?: NetworkStatus; + query?: DocumentNode; + fetchQueryOperator?: (source: Observable) => Observable; + onCacheHit?: () => void; + observableQuery?: ObservableQuery | undefined; + }): ObservableAndInfo; + // (undocumented) + fetchQuery(options: WatchQueryOptions_2, networkStatus?: NetworkStatus): Promise>; + // (undocumented) + generateRequestId(): number; + // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + getDocumentInfo(document: DocumentNode): TransformCacheEntry; + // (undocumented) + getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; + // (undocumented) + getVariables(document: DocumentNode, variables?: TVariables): TVariables; + // (undocumented) + readonly incrementalHandler: Incremental.Handler; + // (undocumented) + protected inFlightLinkObservables: Trie<{ + observable?: Observable>; + restart?: () => void; + }>; + // (undocumented) + get link(): ApolloLink; + // (undocumented) + localState: LocalState | undefined; + // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + maskFragment(options: MaskFragmentOptions): TData; + // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + maskOperation(options: MaskOperationOptions): MaybeMasked; + // (undocumented) + mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions & { + errorPolicy: ErrorPolicy; + fetchPolicy: MutationFetchPolicy; + }): Promise>>; + // (undocumented) + mutationStore?: { + [mutationId: string]: MutationStoreValue; + }; + obsQueries: Set>; + prioritizeCacheValues: boolean; + // (undocumented) + query(options: QueryOptions): Promise>>; + // (undocumented) + refetchObservableQueries(includeStandby?: boolean): Promise[]>; + // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; + // (undocumented) + readonly ssrMode: boolean; + // (undocumented) + startGraphQLSubscription(options: SubscriptionOptions): SubscriptionObservable>; + stop(): void; + // (undocumented) + transform(document: DocumentNode): DocumentNode; + // (undocumented) + watchQuery(options: WatchQueryOptions_2): ObservableQuery; +} + +// @public (undocumented) +interface QueryManagerOptions { + // (undocumented) + assumeImmutableResults: boolean; + // (undocumented) + client: ApolloClient_2; + // (undocumented) + clientOptions: ApolloClientOptions; + // (undocumented) + dataMasking: boolean; + // (undocumented) + defaultContext: Partial | undefined; + // (undocumented) + defaultOptions: DefaultOptions; + // (undocumented) + documentTransform: DocumentTransform | null | undefined; + // (undocumented) + incrementalHandler: Incremental.Handler; + // (undocumented) + localState: LocalState | undefined; + // (undocumented) + onBroadcast: undefined | (() => void); + // (undocumented) + queryDeduplication: boolean; + // (undocumented) + ssrMode: boolean; +} + +// @public (undocumented) +namespace QueryNotification { + // (undocumented) + type FromCache = NextNotification> & { + source: "cache"; + }; + // (undocumented) + type FromNetwork = ObservableNotification> & { + source: "network"; + }; + // (undocumented) + type NewNetworkStatus = NextNotification<{ + resetError?: boolean; + }> & { + source: "newNetworkStatus"; + }; + // (undocumented) + type SetResult = NextNotification> & { + source: "setResult"; + }; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; +} + +// @public +type QueryOptions = { + query: DocumentNode | TypedDocumentNode; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: FetchPolicy; +} & VariablesOption>; + +export { QueryRef } + +// @public @deprecated (undocumented) +export type QueryResult = useQuery_2.Result; + +// @public (undocumented) +interface QueryResult_2 { + data: TData | undefined; + error?: ErrorLike; +} + +// @public (undocumented) +export const reactCompilerVersion: string = "19.1.0-rc.2"; + +// @public (undocumented) +type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; + +// @public (undocumented) +type RefetchQueriesIncludeShorthand = "all" | "active"; + +// @public (undocumented) +interface RefetchQueriesOptions { + // (undocumented) + include?: RefetchQueriesInclude; + // (undocumented) + onQueryUpdated?: OnQueryUpdated | null; + // (undocumented) + optimistic?: boolean; + // (undocumented) + updateCache?: (cache: TCache) => void; +} + +// @public (undocumented) +type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? QueryResult_2[] : TResult extends PromiseLike ? U[] : TResult[]; + +// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +interface RefetchQueriesResult extends Promise> { + // (undocumented) + queries: ObservableQuery[]; + // (undocumented) + results: InternalRefetchQueriesResult[]; +} + +// @public (undocumented) +type RefetchQueryDescriptor = string | DocumentNode; + +// @public (undocumented) +type RefetchWritePolicy = "merge" | "overwrite"; + +// @public (undocumented) +type ResetFunction = () => void; + +// @public (undocumented) +type ResetFunction_2 = () => void; + +// @public (undocumented) +export type SkipToken = typeof skipToken; + +// @public (undocumented) +export const skipToken: unique symbol; + +// @public (undocumented) +type SkipToken_2 = typeof skipToken_2; + +// @public (undocumented) +const skipToken_2: unique symbol; + +// @public (undocumented) +interface SubscribeResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; +} + +// @public (undocumented) +interface SubscribeToMoreOptions { + // (undocumented) + context?: DefaultContext; + // (undocumented) + document: DocumentNode | TypedDocumentNode; + // (undocumented) + onError?: (error: ErrorLike) => void; + // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + updateQuery?: SubscribeToMoreUpdateQueryFn; + // (undocumented) + variables?: TSubscriptionVariables; +} + +// @public (undocumented) +type SubscribeToMoreUpdateQueryFn = { + ( + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { + subscriptionData: { + data: Unmasked; + }; + }): Unmasked | void; +}; + +// @public @deprecated (undocumented) +export type SubscriptionHookOptions = useSubscription_2.Options; + +// @public +interface SubscriptionObservable extends Observable { + restart: () => void; +} + +// @public (undocumented) +type SubscriptionOptions = { + query: DocumentNode | TypedDocumentNode; + fetchPolicy?: FetchPolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + extensions?: Record; +} & VariablesOption>; + +// @public @deprecated (undocumented) +export type SubscriptionResult = useSubscription_2.Result; + +// Warning: (ae-forgotten-export) The symbol "useSuspenseQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type SuspenseQueryHookFetchPolicy = useSuspenseQuery_2.FetchPolicy; + +// @public @deprecated (undocumented) +export type SuspenseQueryHookOptions = useSuspenseQuery_2.Options; + +// @public (undocumented) +interface TransformCacheEntry { + // (undocumented) + asQuery: DocumentNode; + // (undocumented) + clientQuery: DocumentNode | null; + // (undocumented) + defaultVars: OperationVariables_2; + // (undocumented) + hasClientExports: boolean; + // (undocumented) + hasForcedResolvers: boolean; + // (undocumented) + hasIncrementalDirective: boolean; + // (undocumented) + hasNonreactiveDirective: boolean; + // (undocumented) + nonReactiveQuery: DocumentNode; + // (undocumented) + operationType: OperationTypeNode | undefined; + // (undocumented) + serverQuery: DocumentNode | null; + // (undocumented) + violation?: Error | undefined; +} + +// @public (undocumented) +interface UpdateQueryMapFn { + // (undocumented) + ( + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; +} + +// @public (undocumented) +type UpdateQueryOptions = { + variables?: TVariables; +} & ({ + complete: true; + previousData: Unmasked; +} | { + complete: false; + previousData: DeepPartial> | undefined; +}); + +// @public (undocumented) +export function useApolloClient(override?: ApolloClient): ApolloClient; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; + fetchPolicy: "no-cache"; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: false; + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + skip: boolean; + returnPartialData: false; +}): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + skip: boolean; + returnPartialData: boolean; +}): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: false; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + returnPartialData: boolean; +}): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery.Options> & { + skip: boolean; +}): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken): [undefined, useBackgroundQuery.Result]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { + returnPartialData: false; +})): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useBackgroundQuery.Options> & { + returnPartialData: boolean; +})): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useBackgroundQuery.Options> +] : [options: useBackgroundQuery.Options>]): [ +QueryRef, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken | useBackgroundQuery.Options> +] : [options: SkipToken | useBackgroundQuery.Options>]): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export function useBackgroundQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useBackgroundQuery.Options>): [ +QueryRef | undefined, +useBackgroundQuery.Result +]; + +// @public (undocumented) +export namespace useBackgroundQuery { + // (undocumented) + export type FetchPolicy = Extract; + // (undocumented) + export type Options = { + client?: ApolloClient; + refetchWritePolicy?: RefetchWritePolicy_2; + errorPolicy?: ErrorPolicy_2; + context?: DefaultContext_2; + returnPartialData?: boolean; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + skip?: boolean; + } & VariablesOption; + // (undocumented) + export type Result = { + subscribeToMore: SubscribeToMoreFunction; + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + }; +} + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + returnPartialData: boolean; + fetchPolicy: "no-cache"; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + returnPartialData: false; + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + returnPartialData: boolean; + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + errorPolicy: "ignore" | "all"; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + skip: boolean; + returnPartialData: false; +}): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + skip: boolean; + returnPartialData: boolean; +}): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + returnPartialData: false; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + returnPartialData: boolean; +}): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useBackgroundQuery_2.Options> & { + skip: boolean; +}): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// Warning: (ae-forgotten-export) The symbol "SkipToken_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2): [undefined, useBackgroundQuery_2.Result]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useBackgroundQuery_2.Options> & { + returnPartialData: false; +})): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useBackgroundQuery_2.Options> & { + returnPartialData: boolean; +})): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useBackgroundQuery_2.Options> +] : [options: useBackgroundQuery_2.Options>]): [ +QueryRef, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken_2 | useBackgroundQuery_2.Options> +] : [options: SkipToken_2 | useBackgroundQuery_2.Options>]): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +function useBackgroundQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | useBackgroundQuery_2.Options>): [ +QueryRef | undefined, +useBackgroundQuery_2.Result +]; + +// @public (undocumented) +namespace useBackgroundQuery_2 { + // (undocumented) + type FetchPolicy = Extract; + // (undocumented) + type Options = { + client?: ApolloClient; + refetchWritePolicy?: RefetchWritePolicy_2; + errorPolicy?: ErrorPolicy_2; + context?: DefaultContext_2; + returnPartialData?: boolean; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + skip?: boolean; + } & VariablesOption; + // (undocumented) + type Result = { + subscribeToMore: SubscribeToMoreFunction; + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + }; +} + +// @public @deprecated (undocumented) +export type UseBackgroundQueryResult = useBackgroundQuery_2.Result; + +// @public (undocumented) +export function useFragment(options: useFragment.Options): useFragment.Result; + +// @public (undocumented) +export namespace useFragment { + // (undocumented) + export interface Options { + client?: ApolloClient; + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + // (undocumented) + from: StoreObject | Reference | FragmentType> | string | null; + optimistic?: boolean; + variables?: NoInfer_2; + } + // (undocumented) + export type Result = { + data: MaybeMasked; + complete: true; + missing?: never; + } | { + data: DeepPartial>; + complete: false; + missing?: MissingTree; + }; +} + +// @public (undocumented) +function useFragment_2(options: useFragment_2.Options): useFragment_2.Result; + +// @public (undocumented) +namespace useFragment_2 { + // (undocumented) + interface Options { + client?: ApolloClient; + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + // (undocumented) + from: StoreObject | Reference | FragmentType> | string | null; + optimistic?: boolean; + variables?: NoInfer_2; + } + // (undocumented) + type Result = { + data: MaybeMasked; + complete: true; + missing?: never; + } | { + data: DeepPartial>; + complete: false; + missing?: MissingTree; + }; +} + +// Warning: (ae-forgotten-export) The symbol "useFragment_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type UseFragmentOptions = useFragment_2.Options; + +// @public @deprecated (undocumented) +export type UseFragmentResult = useFragment_2.Result; + +// @public (undocumented) +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { + returnPartialData: true; +}): useLazyQuery.ResultTuple; + +// @public (undocumented) +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options: useLazyQuery.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useLazyQuery.ResultTuple; + +// @public (undocumented) +export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery.Options, NoInfer_2>): useLazyQuery.ResultTuple; + +// @public (undocumented) +export namespace useLazyQuery { + // (undocumented) + export type ExecFunction = (...args: {} extends TVariables ? [ + options?: useLazyQuery.ExecOptions + ] : [options: useLazyQuery.ExecOptions]) => ObservableQuery_2.ResultPromise>; + // (undocumented) + export type ExecOptions = { + context?: DefaultContext_2; + } & VariablesOption; + // (undocumented) + export interface Options { + client?: ApolloClient; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + } + // (undocumented) + export type Result["dataState"] = DataState_2["dataState"]> = { + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn_2) => void; + refetch: (variables?: Partial) => Promise>>; + fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; + client: ApolloClient; + observable: ObservableQuery_2; + previousData?: MaybeMasked_2; + error?: ErrorLike_2; + loading: boolean; + networkStatus: NetworkStatus_2; + } & (({ + called: true; + variables: TVariables; + } & GetDataState_2, TStates>) | { + called: false; + variables: Partial; + data: undefined; + dataState: "empty"; + }); + // (undocumented) + export type ResultTuple["dataState"] = DataState_2["dataState"]> = [ + execute: ExecFunction, + result: useLazyQuery.Result + ]; +} + +// @public (undocumented) +function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options: useLazyQuery_2.Options, NoInfer_2> & { + returnPartialData: true; +}): useLazyQuery_2.ResultTuple; + +// @public (undocumented) +function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options: useLazyQuery_2.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useLazyQuery_2.ResultTuple; + +// @public (undocumented) +function useLazyQuery_2(query: DocumentNode | TypedDocumentNode, options?: useLazyQuery_2.Options, NoInfer_2>): useLazyQuery_2.ResultTuple; + +// @public (undocumented) +namespace useLazyQuery_2 { + // (undocumented) + type ExecFunction = (...args: {} extends TVariables ? [ + options?: useLazyQuery_2.ExecOptions + ] : [options: useLazyQuery_2.ExecOptions]) => ObservableQuery_2.ResultPromise>; + // (undocumented) + type ExecOptions = { + context?: DefaultContext_2; + } & VariablesOption; + // (undocumented) + interface Options { + client?: ApolloClient; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + } + // (undocumented) + type Result["dataState"] = DataState_2["dataState"]> = { + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn_2) => void; + refetch: (variables?: Partial) => Promise>>; + fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; + client: ApolloClient; + observable: ObservableQuery_2; + previousData?: MaybeMasked_2; + error?: ErrorLike_2; + loading: boolean; + networkStatus: NetworkStatus_2; + } & (({ + called: true; + variables: TVariables; + } & GetDataState_2, TStates>) | { + called: false; + variables: Partial; + data: undefined; + dataState: "empty"; + }); + // Warning: (ae-forgotten-export) The symbol "useLazyQuery_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type ResultTuple["dataState"] = DataState_2["dataState"]> = [ + execute: ExecFunction, + result: useLazyQuery_2.Result + ]; +} + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): useLoadableQuery.Result; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { + errorPolicy: "ignore" | "all"; +}): useLoadableQuery.Result; + +// @public (undocumented) +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery.Options & { + returnPartialData: true; +}): useLoadableQuery.Result; + +// @public +export function useLoadableQuery(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery.Options): useLoadableQuery.Result; + +// @public (undocumented) +export namespace useLoadableQuery { + // (undocumented) + export type FetchPolicy = Extract; + // (undocumented) + export type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + } + // (undocumented) + export type Result["dataState"] = DataState_2["dataState"]> = [ + loadQuery: LoadQueryFunction, + queryRef: QueryRef | null, + handlers: { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + reset: ResetFunction; + } + ]; +} + +// @public (undocumented) +function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): useLoadableQuery_2.Result; + +// @public (undocumented) +function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { + errorPolicy: "ignore" | "all"; +}): useLoadableQuery_2.Result; + +// @public (undocumented) +function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useLoadableQuery_2.Options & { + returnPartialData: true; +}): useLoadableQuery_2.Result; + +// @public +function useLoadableQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options?: useLoadableQuery_2.Options): useLoadableQuery_2.Result; + +// @public (undocumented) +namespace useLoadableQuery_2 { + // (undocumented) + type FetchPolicy = Extract; + // (undocumented) + type LoadQueryFunction = (...args: {} extends TVariables ? [variables?: TVariables] : [variables: TVariables]) => void; + // (undocumented) + interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + // Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + } + // Warning: (ae-forgotten-export) The symbol "useLoadableQuery_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type Result["dataState"] = DataState_2["dataState"]> = [ + loadQuery: LoadQueryFunction, + queryRef: QueryRef | null, + handlers: { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + reset: ResetFunction_2; + } + ]; +} + +// @public @deprecated (undocumented) +export type UseLoadableQueryResult = useLoadableQuery_2.Result; + +// Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional" needs to be exported by the entry point index.compiled.d.ts +// +// @public +export function useMutation = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation.Options, NoInfer_2, TCache, { + [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; +}>): useMutation.ResultTuple, TCache>; + +// @public (undocumented) +export namespace useMutation { + // (undocumented) + export type MutationFunction = (...[options]: {} extends TVariables ? [ + options?: MutationFunctionOptions & { + variables?: TVariables; + } + ] : [ + options: MutationFunctionOptions & { + variables: TVariables; + } + ]) => Promise>>; + // (undocumented) + export type MutationFunctionOptions = Options & { + mutation?: DocumentNode_2 | TypedDocumentNode; + }; + // (undocumented) + export interface Options = Partial> { + awaitRefetchQueries?: boolean; + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: MutationFetchPolicy_2; + keepRootFields?: boolean; + notifyOnNetworkStatusChange?: boolean; + onCompleted?: (data: MaybeMasked_2, clientOptions?: Options) => void; + onError?: (error: ErrorLike_2, clientOptions?: Options) => void; + onQueryUpdated?: OnQueryUpdated_2; + optimisticResponse?: Unmasked_2> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked_2> | IgnoreModifier); + refetchQueries?: ((result: NormalizedExecutionResult_2>) => InternalRefetchQueriesInclude_2) | InternalRefetchQueriesInclude_2; + update?: MutationUpdaterFunction_2; + updateQueries?: MutationQueryReducersMap_2; + variables?: TConfiguredVariables; + } + // (undocumented) + export interface Result { + called: boolean; + client: ApolloClient; + data: MaybeMasked_2 | null | undefined; + error: ErrorLike_2 | undefined; + loading: boolean; + reset: () => void; + } + // (undocumented) + export type ResultTuple = [ + mutate: MutationFunction, + result: Result + ]; +} + +// Warning: (ae-forgotten-export) The symbol "MakeRequiredVariablesOptional_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public +function useMutation_2 = {}>(mutation: DocumentNode_2 | TypedDocumentNode, options?: useMutation_2.Options, NoInfer_2, TCache, { + [K in keyof TConfiguredVariables]: K extends keyof TVariables ? TConfiguredVariables[K] : never; +}>): useMutation_2.ResultTuple, TCache>; + +// @public (undocumented) +namespace useMutation_2 { + // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type MutationFunction = (...[options]: {} extends TVariables ? [ + options?: MutationFunctionOptions & { + variables?: TVariables; + } + ] : [ + options: MutationFunctionOptions & { + variables: TVariables; + } + ]) => Promise>>; + // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type MutationFunctionOptions = Options & { + mutation?: DocumentNode_2 | TypedDocumentNode; + }; + // (undocumented) + interface Options = Partial> { + awaitRefetchQueries?: boolean; + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: MutationFetchPolicy_2; + keepRootFields?: boolean; + notifyOnNetworkStatusChange?: boolean; + onCompleted?: (data: MaybeMasked_2, clientOptions?: Options) => void; + onError?: (error: ErrorLike_2, clientOptions?: Options) => void; + onQueryUpdated?: OnQueryUpdated_2; + optimisticResponse?: Unmasked_2> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked_2> | IgnoreModifier); + refetchQueries?: ((result: NormalizedExecutionResult_2>) => InternalRefetchQueriesInclude_2) | InternalRefetchQueriesInclude_2; + update?: MutationUpdaterFunction_2; + updateQueries?: MutationQueryReducersMap_2; + variables?: TConfiguredVariables; + } + // (undocumented) + interface Result { + called: boolean; + client: ApolloClient; + data: MaybeMasked_2 | null | undefined; + error: ErrorLike_2 | undefined; + loading: boolean; + reset: () => void; + } + // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts + // Warning: (ae-forgotten-export) The symbol "useMutation_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type ResultTuple = [ + mutate: MutationFunction, + result: Result + ]; +} + +// @public (undocumented) +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { + returnPartialData: true; +}): useQuery.Result; + +// @public (undocumented) +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useQuery.Result; + +// @public (undocumented) +export function useQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useQuery.Options, NoInfer_2> +] : [options: useQuery.Options, NoInfer_2>]): useQuery.Result; + +// @public (undocumented) +export namespace useQuery { + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: WatchQueryFetchPolicy; + initialFetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + skip?: boolean; + skipPollAttempt?: () => boolean; + ssr?: boolean; + } + } + // (undocumented) + export namespace Base { + // (undocumented) + export interface Result { + client: ApolloClient; + error?: ErrorLike_2; + fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; + loading: boolean; + networkStatus: NetworkStatus_2; + observable: ObservableQuery_2; + previousData?: MaybeMasked; + refetch: (variables?: Partial) => Promise>>; + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn_2) => void; + variables: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface Options extends Base.Options { + variables?: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface Result extends Base.Result, DocumentationTypes.DataState { + } + } + // (undocumented) + export type Options = Base.Options & VariablesOption; + // (undocumented) + export type Result["dataState"] = DataState_2["dataState"]> = Base.Result & GetDataState_2, TStates>; +} + +// @public (undocumented) +export namespace useQuery { + var // (undocumented) + ssrDisabledResult: ApolloQueryResult_2; +} + +// @public (undocumented) +function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery_2.Options, NoInfer_2> & { + returnPartialData: true; +}): useQuery_2.Result; + +// @public (undocumented) +function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useQuery_2.Options, NoInfer_2> & { + returnPartialData: boolean; +}): useQuery_2.Result; + +// @public (undocumented) +function useQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useQuery_2.Options, NoInfer_2> +] : [options: useQuery_2.Options, NoInfer_2>]): useQuery_2.Result; + +// @public (undocumented) +namespace useQuery_2 { + // (undocumented) + namespace Base { + // (undocumented) + interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + fetchPolicy?: WatchQueryFetchPolicy; + initialFetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + notifyOnNetworkStatusChange?: boolean; + pollInterval?: number; + refetchWritePolicy?: RefetchWritePolicy_2; + returnPartialData?: boolean; + skip?: boolean; + skipPollAttempt?: () => boolean; + ssr?: boolean; + } + } + // (undocumented) + namespace Base { + // (undocumented) + interface Result { + client: ApolloClient; + error?: ErrorLike_2; + fetchMore: (fetchMoreOptions: FetchMoreOptions_2) => Promise>>; + loading: boolean; + networkStatus: NetworkStatus_2; + observable: ObservableQuery_2; + previousData?: MaybeMasked; + refetch: (variables?: Partial) => Promise>>; + startPolling: (pollInterval: number) => void; + stopPolling: () => void; + subscribeToMore: SubscribeToMoreFunction; + updateQuery: (mapFn: UpdateQueryMapFn_2) => void; + variables: TVariables; + } + } + // (undocumented) + namespace DocumentationTypes { + // (undocumented) + interface Options extends Base.Options { + variables?: TVariables; + } + } + // (undocumented) + namespace DocumentationTypes { + // (undocumented) + interface Result extends Base.Result, DocumentationTypes.DataState { + } + } + // Warning: (ae-forgotten-export) The symbol "useQuery_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type Options = Base.Options & VariablesOption; + // (undocumented) + type Result["dataState"] = DataState_2["dataState"]> = Base.Result & GetDataState_2, TStates>; +} + +// @public (undocumented) +namespace useQuery_2 { + var // (undocumented) + ssrDisabledResult: ApolloQueryResult_2; +} + +// @public +export function useQueryRefHandlers(queryRef: QueryRef["dataState"]>): useQueryRefHandlers.Result; + +// @public (undocumented) +export namespace useQueryRefHandlers { + // (undocumented) + export interface Result { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } +} + +// @public +function useQueryRefHandlers_2(queryRef: QueryRef["dataState"]>): useQueryRefHandlers_2.Result; + +// @public (undocumented) +namespace useQueryRefHandlers_2 { + // (undocumented) + interface Result { + fetchMore: FetchMoreFunction; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } +} + +// Warning: (ae-forgotten-export) The symbol "useQueryRefHandlers_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type UseQueryRefHandlersResult = useQueryRefHandlers_2.Result; + +// @public +export function useReactiveVar(rv: ReactiveVar): T; + +// @public (undocumented) +export function useReadQuery["dataState"]>(queryRef: QueryRef): useReadQuery.Result; + +// @public (undocumented) +export namespace useReadQuery { + // (undocumented) + export type Result["dataState"] = DataState_2["dataState"]> = { + error: ErrorLike_2 | undefined; + networkStatus: NetworkStatus_2; + } & GetDataState_2, TStates>; +} + +// @public (undocumented) +function useReadQuery_2["dataState"]>(queryRef: QueryRef): useReadQuery_2.Result; + +// @public (undocumented) +namespace useReadQuery_2 { + // (undocumented) + type Result["dataState"] = DataState_2["dataState"]> = { + error: ErrorLike_2 | undefined; + networkStatus: NetworkStatus_2; + } & GetDataState_2, TStates>; +} + +// Warning: (ae-forgotten-export) The symbol "useReadQuery_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type UseReadQueryResult = useReadQuery_2.Result; + +// @public +export function useSubscription(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ +options?: useSubscription.Options, NoInfer_2> +] : [options: useSubscription.Options, NoInfer_2>]): useSubscription.Result; + +// @public (undocumented) +export namespace useSubscription { + // (undocumented) + export namespace Base { + // (undocumented) + export interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + extensions?: Record; + fetchPolicy?: FetchPolicy_2; + ignoreResults?: boolean; + onComplete?: () => void; + onData?: (options: OnDataOptions) => any; + onError?: (error: ErrorLike_2) => void; + shouldResubscribe?: boolean | ((options: Options) => boolean); + skip?: boolean; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface Result extends Base.Options { + variables?: TVariables; + } + } + // (undocumented) + export interface OnDataOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + data: OnDataResult; + } + // (undocumented) + export type OnDataResult = Omit, "restart">; + // (undocumented) + export interface OnSubscriptionDataOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + subscriptionData: OnDataResult; + } + // (undocumented) + export type Options = Base.Options & VariablesOption; + // (undocumented) + export interface Result { + data?: MaybeMasked; + error?: ErrorLike_2; + loading: boolean; + // (undocumented) + restart: () => void; + } +} + +// @public +function useSubscription_2(subscription: DocumentNode | TypedDocumentNode, ...[options]: {} extends (TVariables) ? [ +options?: useSubscription_2.Options, NoInfer_2> +] : [options: useSubscription_2.Options, NoInfer_2>]): useSubscription_2.Result; + +// @public (undocumented) +namespace useSubscription_2 { + // (undocumented) + namespace Base { + // (undocumented) + interface Options { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + extensions?: Record; + fetchPolicy?: FetchPolicy_2; + ignoreResults?: boolean; + onComplete?: () => void; + // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts + onData?: (options: OnDataOptions) => any; + onError?: (error: ErrorLike_2) => void; + shouldResubscribe?: boolean | ((options: Options) => boolean); + skip?: boolean; + } + } + // (undocumented) + namespace DocumentationTypes { + // (undocumented) + interface Result extends Base.Options { + variables?: TVariables; + } + } + // (undocumented) + interface OnDataOptions { + // (undocumented) + client: ApolloClient; + // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + data: OnDataResult; + } + // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type OnDataResult = Omit, "restart">; + // (undocumented) + interface OnSubscriptionDataOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + subscriptionData: OnDataResult; + } + // Warning: (ae-forgotten-export) The symbol "useSubscription_2" needs to be exported by the entry point index.compiled.d.ts + // + // (undocumented) + type Options = Base.Options & VariablesOption; + // (undocumented) + interface Result { + data?: MaybeMasked; + error?: ErrorLike_2; + loading: boolean; + // (undocumented) + restart: () => void; + } +} + +// @public (undocumented) +export function useSuspenseFragment(options: useSuspenseFragment.Options & { + from: NonNullable>; +}): useSuspenseFragment.Result; + +// @public (undocumented) +export function useSuspenseFragment(options: useSuspenseFragment.Options & { + from: null; +}): useSuspenseFragment.Result; + +// @public (undocumented) +export function useSuspenseFragment(options: useSuspenseFragment.Options & { + from: From; +}): useSuspenseFragment.Result; + +// @public (undocumented) +export function useSuspenseFragment(options: useSuspenseFragment.Options): useSuspenseFragment.Result; + +// @public (undocumented) +export namespace useSuspenseFragment { + // (undocumented) + export type Options = { + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + from: From; + optimistic?: boolean; + client?: ApolloClient; + } & VariablesOption>; + // (undocumented) + export type Result = { + data: MaybeMasked; + }; +} + +// @public (undocumented) +function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { + from: NonNullable>; +}): useSuspenseFragment_2.Result; + +// @public (undocumented) +function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { + from: null; +}): useSuspenseFragment_2.Result; + +// @public (undocumented) +function useSuspenseFragment_2(options: useSuspenseFragment_2.Options & { + from: From_2; +}): useSuspenseFragment_2.Result; + +// @public (undocumented) +function useSuspenseFragment_2(options: useSuspenseFragment_2.Options): useSuspenseFragment_2.Result; + +// @public (undocumented) +namespace useSuspenseFragment_2 { + // (undocumented) + type Options = { + fragment: DocumentNode_2 | TypedDocumentNode_2; + fragmentName?: string; + from: From_2; + optimistic?: boolean; + client?: ApolloClient; + } & VariablesOption>; + // (undocumented) + type Result = { + data: MaybeMasked; + }; +} + +// Warning: (ae-forgotten-export) The symbol "useSuspenseFragment_2" needs to be exported by the entry point index.compiled.d.ts +// +// @public @deprecated (undocumented) +export type UseSuspenseFragmentOptions = useSuspenseFragment_2.Options; + +// @public @deprecated (undocumented) +export type UseSuspenseFragmentResult = useSuspenseFragment_2.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { + errorPolicy: "ignore" | "all"; +}): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { + skip: boolean; + returnPartialData: true; +}): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { + returnPartialData: true; +}): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery.Options> & { + skip: boolean; +}): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | (useSuspenseQuery.Options> & { + returnPartialData: true; +})): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useSuspenseQuery.Options> +] : [options: useSuspenseQuery.Options>]): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken | useSuspenseQuery.Options> +] : [options: SkipToken | useSuspenseQuery.Options>]): useSuspenseQuery.Result; + +// @public (undocumented) +export function useSuspenseQuery(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken | useSuspenseQuery.Options>): useSuspenseQuery.Result; + +// @public (undocumented) +export namespace useSuspenseQuery { + // (undocumented) + export type FetchPolicy = Extract; + // (undocumented) + export type Options = { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + returnPartialData?: boolean; + refetchWritePolicy?: RefetchWritePolicy_2; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + skip?: boolean; + } & VariablesOption; + // (undocumented) + export type Result["dataState"] = DataState_2["dataState"]> = { + client: ApolloClient; + error: ErrorLike_2 | undefined; + fetchMore: FetchMoreFunction; + networkStatus: NetworkStatus_2; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } & GetDataState_2, TStates>; +} + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { + returnPartialData: true; + errorPolicy: "ignore" | "all"; +}): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { + errorPolicy: "ignore" | "all"; +}): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { + skip: boolean; + returnPartialData: true; +}): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { + returnPartialData: true; +}): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: useSuspenseQuery_2.Options> & { + skip: boolean; +}): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | (useSuspenseQuery_2.Options> & { + returnPartialData: true; +})): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: useSuspenseQuery_2.Options> +] : [options: useSuspenseQuery_2.Options>]): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, ...[options]: {} extends TVariables ? [ +options?: SkipToken_2 | useSuspenseQuery_2.Options> +] : [options: SkipToken_2 | useSuspenseQuery_2.Options>]): useSuspenseQuery_2.Result; + +// @public (undocumented) +function useSuspenseQuery_2(query: DocumentNode_2 | TypedDocumentNode_2, options: SkipToken_2 | useSuspenseQuery_2.Options>): useSuspenseQuery_2.Result; + +// @public (undocumented) +namespace useSuspenseQuery_2 { + // (undocumented) + type FetchPolicy = Extract; + // (undocumented) + type Options = { + client?: ApolloClient; + context?: DefaultContext_2; + errorPolicy?: ErrorPolicy_2; + returnPartialData?: boolean; + refetchWritePolicy?: RefetchWritePolicy_2; + fetchPolicy?: FetchPolicy; + queryKey?: string | number | any[]; + skip?: boolean; + } & VariablesOption; + // (undocumented) + type Result["dataState"] = DataState_2["dataState"]> = { + client: ApolloClient; + error: ErrorLike_2 | undefined; + fetchMore: FetchMoreFunction; + networkStatus: NetworkStatus_2; + refetch: RefetchFunction; + subscribeToMore: SubscribeToMoreFunction; + } & GetDataState_2, TStates>; +} + +// @public @deprecated (undocumented) +export type UseSuspenseQueryResult = useSuspenseQuery_2.Result; + +// @public (undocumented) +type WatchQueryFetchPolicy_2 = FetchPolicy | "cache-and-network" | "standby"; + +// @public +type WatchQueryOptions_2 = { + fetchPolicy?: WatchQueryFetchPolicy_2; + nextFetchPolicy?: WatchQueryFetchPolicy_2 | ((this: WatchQueryOptions_2, currentFetchPolicy: WatchQueryFetchPolicy_2, context: NextFetchPolicyContext) => WatchQueryFetchPolicy_2); + initialFetchPolicy?: WatchQueryFetchPolicy_2; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode | TypedDocumentNode; +} & VariablesOption>; + +// Warnings were encountered during analysis: +// +// src/core/ObservableQuery.ts:65:3 - (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.compiled.d.ts +// src/core/ObservableQuery.ts:145:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.compiled.d.ts +// src/core/ObservableQuery.ts:157:5 - (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.compiled.d.ts +// src/core/ObservableQuery.ts:305:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.compiled.d.ts +// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.compiled.d.ts +// src/core/types.ts:309:3 - (ae-forgotten-export) The symbol "ErrorLike" needs to be exported by the entry point index.compiled.d.ts +// src/core/types.ts:313:3 - (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.compiled.d.ts +// src/core/types.ts:321:7 - (ae-forgotten-export) The symbol "DataValue" needs to be exported by the entry point index.compiled.d.ts +// src/core/types.ts:371:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:178:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:261:3 - (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:264:3 - (ae-forgotten-export) The symbol "NormalizedExecutionResult" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:274:3 - (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:277:3 - (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.compiled.d.ts +// src/core/watchQueryOptions.ts:286:3 - (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useBackgroundQuery.ts:64:5 - (ae-forgotten-export) The symbol "useBackgroundQuery_2" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useLoadableQuery.ts:70:7 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useLoadableQuery.ts:70:7 - (ae-forgotten-export) The symbol "ResetFunction_2" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useSuspenseFragment.ts:75:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useSuspenseFragment.ts:75:5 - (ae-forgotten-export) The symbol "From_2" needs to be exported by the entry point index.compiled.d.ts +// src/react/hooks/useSuspenseQuery.ts:66:5 - (ae-forgotten-export) The symbol "useSuspenseQuery_2" needs to be exported by the entry point index.compiled.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-react_components.api.md b/.api-reports/api-report-react_components.api.md deleted file mode 100644 index 61c7ba78709..00000000000 --- a/.api-reports/api-report-react_components.api.md +++ /dev/null @@ -1,2140 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import * as PropTypes from 'prop-types'; -import type * as ReactTypes from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription as Subscription_2 } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseMutationOptions = ApolloCache> extends MutationSharedOptions { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - client?: ApolloClient; - // @deprecated - ignoreResults?: boolean; - notifyOnNetworkStatusChange?: boolean; - onCompleted?: (data: MaybeMasked, clientOptions?: BaseMutationOptions) => void; - onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void; -} - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} - -// @public @deprecated (undocumented) -interface BaseSubscriptionOptions { - client?: ApolloClient; - context?: DefaultContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - extensions?: Record; - // Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: FetchPolicy; - ignoreResults?: boolean; - onComplete?: () => void; - // Warning: (ae-forgotten-export) The symbol "OnDataOptions" needs to be exported by the entry point index.d.ts - onData?: (options: OnDataOptions) => any; - onError?: (error: ApolloError) => void; - // @deprecated - onSubscriptionComplete?: () => void; - // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts - // - // @deprecated - onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; - shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); - skip?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public @deprecated (undocumented) -export function Mutation(props: MutationComponentOptions): ReactTypes.JSX.Element | null; - -// @public (undocumented) -export namespace Mutation { - var // (undocumented) - propTypes: PropTypes.InferProps>>; -} - -// @public (undocumented) -export interface Mutation { - // (undocumented) - propTypes: PropTypes.InferProps>; -} - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "BaseMutationOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export interface MutationComponentOptions = ApolloCache> extends BaseMutationOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFunction" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children: (mutateFunction: MutationFunction, result: MutationResult) => ReactTypes.JSX.Element | null; - // (undocumented) - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFunction = ApolloCache> = (options?: MutationFunctionOptions) => Promise>>; - -// @public (undocumented) -interface MutationFunctionOptions = ApolloCache> extends BaseMutationOptions { - mutation?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// @public (undocumented) -interface MutationResult { - called: boolean; - client: ApolloClient; - data?: MaybeMasked | null; - error?: ApolloError; - loading: boolean; - reset: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription_2; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription_2; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -interface OnDataOptions { - // (undocumented) - client: ApolloClient; - // Warning: (ae-forgotten-export) The symbol "SubscriptionResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - data: SubscriptionResult; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface OnSubscriptionDataOptions { - // (undocumented) - client: ApolloClient; - // (undocumented) - subscriptionData: SubscriptionResult; -} - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public @deprecated (undocumented) -export function Query(props: QueryComponentOptions): ReactTypes.JSX.Element | null; - -// @public (undocumented) -export namespace Query { - var // (undocumented) - propTypes: PropTypes.InferProps>; -} - -// @public (undocumented) -export interface Query { - // (undocumented) - propTypes: PropTypes.InferProps>; -} - -// Warning: (ae-forgotten-export) The symbol "QueryFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export interface QueryComponentOptions extends QueryFunctionOptions { - // Warning: (ae-forgotten-export) The symbol "QueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children: (result: QueryResult) => ReactTypes.JSX.Element | null; - // (undocumented) - query: DocumentNode | TypedDocumentNode; -} - -// Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "ObservableQueryFields" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public @deprecated (undocumented) -export function Subscription(props: SubscriptionComponentOptions): ReactTypes.JSX.Element | null; - -// @public (undocumented) -export namespace Subscription { - var // (undocumented) - propTypes: PropTypes.InferProps>; -} - -// @public (undocumented) -export interface Subscription { - // (undocumented) - propTypes: PropTypes.InferProps>; -} - -// Warning: (ae-forgotten-export) The symbol "BaseSubscriptionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export interface SubscriptionComponentOptions extends BaseSubscriptionOptions { - // (undocumented) - children?: null | ((result: SubscriptionResult) => ReactTypes.JSX.Element | null); - subscription: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// @public (undocumented) -interface SubscriptionResult { - data?: MaybeMasked; - error?: ApolloError; - loading: boolean; - // @internal @deprecated (undocumented) - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-react_context.api.md b/.api-reports/api-report-react_context.api.md deleted file mode 100644 index 3e9ab815b50..00000000000 --- a/.api-reports/api-report-react_context.api.md +++ /dev/null @@ -1,2059 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type * as ReactTypes from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -export const ApolloConsumer: ReactTypes.FC; - -// @public (undocumented) -export interface ApolloConsumerProps { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children: (client: ApolloClient) => ReactTypes.ReactNode; -} - -// @public (undocumented) -export interface ApolloContextValue { - // (undocumented) - client?: ApolloClient; - // Warning: (ae-forgotten-export) The symbol "RenderPromises" needs to be exported by the entry point index.d.ts - // - // (undocumented) - renderPromises?: RenderPromises; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -export const ApolloProvider: ReactTypes.FC>; - -// @public (undocumented) -export interface ApolloProviderProps { - // (undocumented) - children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; - // (undocumented) - client: ApolloClient; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -export function getApolloContext(): ReactTypes.Context; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -interface QueryData { - // (undocumented) - fetchData(): Promise; - // (undocumented) - getOptions(): any; -} - -// Warning: (ae-forgotten-export) The symbol "QueryFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryDataOptions extends QueryFunctionOptions { - // Warning: (ae-forgotten-export) The symbol "QueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children?: (result: QueryResult) => ReactTypes.ReactNode; - query: DocumentNode | TypedDocumentNode; -} - -// Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "ObservableQueryFields" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -class RenderPromises { - // (undocumented) - addObservableQueryPromise(obsQuery: ObservableQuery): ReactTypes.ReactNode; - // Warning: (ae-forgotten-export) The symbol "QueryData" needs to be exported by the entry point index.d.ts - // - // (undocumented) - addQueryPromise(queryInstance: QueryData, finish?: () => ReactTypes.ReactNode): ReactTypes.ReactNode; - // (undocumented) - consumeAndAwaitPromises(): Promise; - // Warning: (ae-forgotten-export) The symbol "QueryDataOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getSSRObservable(props: QueryDataOptions): ObservableQuery | null; - // (undocumented) - hasPromises(): boolean; - // (undocumented) - registerSSRObservable(observable: ObservableQuery): void; - // (undocumented) - stop(): void; -} - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public @deprecated (undocumented) -export const resetApolloContext: typeof getApolloContext; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-react_hoc.api.md b/.api-reports/api-report-react_hoc.api.md deleted file mode 100644 index 0277722dd49..00000000000 --- a/.api-reports/api-report-react_hoc.api.md +++ /dev/null @@ -1,2070 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type * as ReactTypes from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseMutationOptions = ApolloCache> extends MutationSharedOptions { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - client?: ApolloClient; - // @deprecated - ignoreResults?: boolean; - notifyOnNetworkStatusChange?: boolean; - onCompleted?: (data: MaybeMasked, clientOptions?: BaseMutationOptions) => void; - onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void; -} - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// @public (undocumented) -export type ChildDataProps = TProps & DataProps; - -// @public (undocumented) -export type ChildMutateProps = TProps & MutateProps; - -// @public (undocumented) -export type ChildProps = TProps & Partial> & Partial>; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -export interface DataProps { - // (undocumented) - data: DataValue; -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -export type DataValue = QueryControls & Partial; - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreOptions { - // (undocumented) - updateQuery?: (previousQueryResult: TData, options: { - fetchMoreResult?: TData; - variables?: TVariables; - }) => TData; -} - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public @deprecated (undocumented) -export function graphql> & Partial>>(document: DocumentNode, operationOptions?: OperationOption): (WrappedComponent: ReactTypes.ComponentType) => ReactTypes.ComponentClass; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -export interface MutateProps { - // Warning: (ae-forgotten-export) The symbol "MutationFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - mutate: MutationFunction; - // Warning: (ae-forgotten-export) The symbol "MutationResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - result: MutationResult; -} - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFunction = ApolloCache> = (options?: MutationFunctionOptions) => Promise>>; - -// Warning: (ae-forgotten-export) The symbol "BaseMutationOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationFunctionOptions = ApolloCache> extends BaseMutationOptions { - mutation?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// @public (undocumented) -interface MutationResult { - called: boolean; - client: ApolloClient; - data?: MaybeMasked | null; - error?: ApolloError; - loading: boolean; - reset: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -export interface OperationOption, TContext = DefaultContext, TCache extends ApolloCache = ApolloCache> { - // (undocumented) - alias?: string; - // (undocumented) - name?: string; - // Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - options?: BaseQueryOptions | BaseMutationOptions | ((props: TProps) => BaseQueryOptions | BaseMutationOptions); - // (undocumented) - props?: (props: OptionProps, lastProps?: TChildProps | void) => TChildProps; - // (undocumented) - shouldResubscribe?: (props: TProps, nextProps: TProps) => boolean; - // (undocumented) - skip?: boolean | ((props: TProps) => boolean); - // (undocumented) - withRef?: boolean; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public (undocumented) -export interface OptionProps extends Partial>, Partial> { - // (undocumented) - ownProps: TProps; -} - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -export interface QueryControls { - // (undocumented) - error?: ApolloError; - // Warning: (ae-forgotten-export) The symbol "FetchMoreOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & FetchMoreOptions) => Promise>; - // (undocumented) - loading: boolean; - // (undocumented) - networkStatus: number; - // (undocumented) - refetch: (variables?: TGraphQLVariables) => Promise>; - // (undocumented) - startPolling: (pollInterval: number) => void; - // (undocumented) - stopPolling: () => void; - // (undocumented) - subscribeToMore: (options: SubscribeToMoreOptions) => () => void; - // (undocumented) - updateQuery: (mapFn: UpdateQueryMapFn) => void; - // (undocumented) - variables: TGraphQLVariables; -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// @public @deprecated (undocumented) -export function withApollo(WrappedComponent: ReactTypes.ComponentType>>, operationOptions?: OperationOption): ReactTypes.ComponentClass>; - -// @public (undocumented) -export type WithApolloClient

= P & { - client?: ApolloClient; -}; - -// @public @deprecated (undocumented) -export function withMutation = {}, TGraphQLVariables extends OperationVariables = {}, TChildProps = MutateProps, TContext extends Record = DefaultContext, TCache extends ApolloCache = ApolloCache>(document: DocumentNode, operationOptions?: OperationOption): (WrappedComponent: ReactTypes.ComponentType) => ReactTypes.ComponentClass; - -// @public @deprecated (undocumented) -export function withQuery = Record, TData extends object = {}, TGraphQLVariables extends object = {}, TChildProps extends object = DataProps>(document: DocumentNode, operationOptions?: OperationOption): (WrappedComponent: ReactTypes.ComponentType) => ReactTypes.ComponentClass; - -// @public @deprecated (undocumented) -export function withSubscription>(document: DocumentNode, operationOptions?: OperationOption): (WrappedComponent: ReactTypes.ComponentType) => ReactTypes.ComponentClass; - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-react_hooks.api.md b/.api-reports/api-report-react_hooks.api.md deleted file mode 100644 index 70b57a6d948..00000000000 --- a/.api-reports/api-report-react_hooks.api.md +++ /dev/null @@ -1,2587 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type BackgroundQueryHookFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "QueryHookOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface BackgroundQueryHookOptions extends Pick, "client" | "variables" | "errorPolicy" | "context" | "canonizeResults" | "returnPartialData" | "refetchWritePolicy"> { - // Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: BackgroundQueryHookFetchPolicy; - // (undocumented) - queryKey?: string | number | any[]; - // @deprecated - skip?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type BackgroundQueryHookOptionsNoInfer = BackgroundQueryHookOptions, NoInfer_2>; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseMutationOptions = ApolloCache> extends MutationSharedOptions { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - client?: ApolloClient; - // @deprecated - ignoreResults?: boolean; - notifyOnNetworkStatusChange?: boolean; - onCompleted?: (data: MaybeMasked, clientOptions?: BaseMutationOptions) => void; - onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void; -} - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} - -// @public @deprecated (undocumented) -interface BaseSubscriptionOptions { - client?: ApolloClient; - context?: DefaultContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - extensions?: Record; - // Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: FetchPolicy; - ignoreResults?: boolean; - onComplete?: () => void; - // Warning: (ae-forgotten-export) The symbol "OnDataOptions" needs to be exported by the entry point index.d.ts - onData?: (options: OnDataOptions) => any; - onError?: (error: ApolloError) => void; - // @deprecated - onSubscriptionComplete?: () => void; - // Warning: (ae-forgotten-export) The symbol "OnSubscriptionDataOptions" needs to be exported by the entry point index.d.ts - // - // @deprecated - onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; - shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); - skip?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchMoreFunction = (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TVariables; - }) => Unmasked; -}) => Promise>>; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type From = StoreObject | Reference | FragmentType> | string | null; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "QueryResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface InteropLazyQueryExecResult extends QueryResult { - // @deprecated - called: boolean; - // @deprecated - client: ApolloClient; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - // @deprecated - loading: boolean; - // @deprecated - networkStatus: NetworkStatus; - // @deprecated - observable: ObservableQuery; - // @deprecated - previousData?: MaybeMasked; - // @deprecated - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - // @deprecated - startPolling: (pollInterval: number) => void; - // @deprecated - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - subscribeToMore: SubscribeToMoreFunction; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - // - // @deprecated - updateQuery: (mapFn: UpdateQueryMapFn) => void; - // @deprecated - variables: TVariables | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropQueryResult extends QueryResult { - // @deprecated - called: boolean; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// Warning: (ae-forgotten-export) The symbol "LazyQueryHookExecOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropLazyQueryExecResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type LazyQueryExecFunction = (options?: Partial>) => Promise>; - -// Warning: (ae-forgotten-export) The symbol "LazyQueryHookOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface LazyQueryHookExecOptions extends LazyQueryHookOptions { - // (undocumented) - query?: DocumentNode | TypedDocumentNode; -} - -// Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface LazyQueryHookOptions extends BaseQueryOptions { - // @deprecated - context?: DefaultContext; - // @internal @deprecated (undocumented) - defaultOptions?: Partial>; - // @deprecated - initialFetchPolicy?: WatchQueryFetchPolicy; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; -} - -// Warning: (ae-forgotten-export) The symbol "LazyQueryExecFunction" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type LazyQueryResultTuple = [ -execute: LazyQueryExecFunction, -result: QueryResult -]; - -// @public (undocumented) -type LoadableQueryHookFetchPolicy = Extract; - -// @public (undocumented) -interface LoadableQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "LoadableQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: LoadableQueryHookFetchPolicy; - queryKey?: string | number | any[]; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type LoadQueryFunction = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "BaseMutationOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationFunctionOptions = ApolloCache> extends BaseMutationOptions { - mutation?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -interface MutationHookOptions = ApolloCache> extends BaseMutationOptions { -} - -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// @public (undocumented) -interface MutationResult { - called: boolean; - client: ApolloClient; - data?: MaybeMasked | null; - error?: ApolloError; - loading: boolean; - reset: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// Warning: (ae-forgotten-export) The symbol "MutationFunctionOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MutationResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationTuple = ApolloCache> = [ -mutate: (options?: MutationFunctionOptions) => Promise>>, -result: MutationResult -]; - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -interface OnDataOptions { - // (undocumented) - client: ApolloClient; - // Warning: (ae-forgotten-export) The symbol "SubscriptionResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - data: SubscriptionResult; -} - -// @public -type OnlyRequiredProperties = { - [K in keyof T as {} extends Pick ? never : K]: T[K]; -}; - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface OnSubscriptionDataOptions { - // (undocumented) - client: ApolloClient; - // (undocumented) - subscriptionData: SubscriptionResult; -} - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const QUERY_REF_BRAND: unique symbol; - -// @public @deprecated (undocumented) -interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "QueryFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryHookOptions extends QueryFunctionOptions { -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public -interface QueryRef { - // @internal (undocumented) - [QUERY_REF_BRAND]?(variables: TVariables): TData; -} - -// Warning: (ae-forgotten-export) The symbol "ObservableQueryFields" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -type ReactiveListener = (value: T) => any; - -// @public (undocumented) -interface ReactiveVar { - // (undocumented) - (newValue?: T): T; - // (undocumented) - attachCache(cache: ApolloCache): this; - // (undocumented) - forgetCache(cache: ApolloCache): boolean; - // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - onNextChange(listener: ReactiveListener): () => void; -} - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchFunction = ObservableQueryFields["refetch"]; - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type ResetFunction = () => void; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -export type SkipToken = typeof skipToken; - -// @public (undocumented) -export const skipToken: unique symbol; - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// Warning: (ae-forgotten-export) The symbol "BaseSubscriptionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface SubscriptionHookOptions extends BaseSubscriptionOptions { -} - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// @public (undocumented) -interface SubscriptionResult { - data?: MaybeMasked; - error?: ApolloError; - loading: boolean; - // @internal @deprecated (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -type SuspenseQueryHookFetchPolicy = Extract; - -// @public (undocumented) -interface SuspenseQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "SuspenseQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: SuspenseQueryHookFetchPolicy; - queryKey?: string | number | any[]; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - // @deprecated - skip?: boolean; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public (undocumented) -export function useApolloClient(override?: ApolloClient): ApolloClient; - -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptionsNoInfer" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "QueryRef" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function useBackgroundQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer & TOptions): [ -(QueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)), -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): [ -QueryRef | undefined, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - errorPolicy: "ignore" | "all"; -}): [ -QueryRef, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; - returnPartialData: true; -}): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -}): [ -QueryRef, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; -}): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer): [QueryRef, UseBackgroundQueryResult]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken): [undefined, UseBackgroundQueryResult]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -})): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | BackgroundQueryHookOptionsNoInfer): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export type UseBackgroundQueryResult = { - subscribeToMore: SubscribeToMoreFunction; - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; -}; - -// @public (undocumented) -export function useFragment(options: UseFragmentOptions): UseFragmentResult; - -// @public (undocumented) -export interface UseFragmentOptions extends Omit, NoInfer_2>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - client?: ApolloClient; - // (undocumented) - from: StoreObject | Reference | FragmentType> | string | null; - // (undocumented) - optimistic?: boolean; -} - -// @public (undocumented) -export type UseFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing?: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "LazyQueryResultTuple" needs to be exported by the entry point index.d.ts -// -// @public -export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer_2>): LazyQueryResultTuple; - -// Warning: (ae-forgotten-export) The symbol "LoadableQueryHookOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - returnPartialData: true; -}): UseLoadableQueryResult, TVariables>; - -// @public -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; - -// @public (undocumented) -export type UseLoadableQueryResult = [ -loadQuery: LoadQueryFunction, -queryRef: QueryRef | null, -handlers: { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; - reset: ResetFunction; -} -]; - -// Warning: (ae-forgotten-export) The symbol "MutationHookOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MutationTuple" needs to be exported by the entry point index.d.ts -// -// @public -export function useMutation = ApolloCache>(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions, NoInfer_2, TContext, TCache>): MutationTuple; - -// Warning: (ae-forgotten-export) The symbol "InteropQueryResult" needs to be exported by the entry point index.d.ts -// -// @public -export function useQuery(query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions, NoInfer_2>): InteropQueryResult; - -// @public -export function useQueryRefHandlers(queryRef: QueryRef): UseQueryRefHandlersResult; - -// @public (undocumented) -export interface UseQueryRefHandlersResult { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; -} - -// Warning: (ae-forgotten-export) The symbol "ReactiveVar" needs to be exported by the entry point index.d.ts -// -// @public -export function useReactiveVar(rv: ReactiveVar): T; - -// @public (undocumented) -export function useReadQuery(queryRef: QueryRef): UseReadQueryResult; - -// @public (undocumented) -export interface UseReadQueryResult { - data: MaybeMasked; - error: ApolloError | undefined; - networkStatus: NetworkStatus; -} - -// Warning: (ae-forgotten-export) The symbol "SubscriptionHookOptions" needs to be exported by the entry point index.d.ts -// -// @public -export function useSubscription(subscription: DocumentNode | TypedDocumentNode, options?: SubscriptionHookOptions, NoInfer_2>): { - restart: () => void; - loading: boolean; - data?: TData | undefined; - error?: ApolloError; - variables?: TVariables | undefined; -}; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: NonNullable>; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: null; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: From; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; - -// Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type UseSuspenseFragmentOptions = { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: From; - optimistic?: boolean; - client?: ApolloClient; -} & VariablesOption>; - -// @public (undocumented) -export type UseSuspenseFragmentResult = { - data: MaybeMasked; -}; - -// Warning: (ae-forgotten-export) The symbol "SuspenseQueryHookOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function useSuspenseQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2> & TOptions): UseSuspenseQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? TOptions["skip"] extends boolean ? DeepPartial | undefined : DeepPartial : TOptions["skip"] extends boolean ? TData | undefined : TData, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; - returnPartialData: true; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -}): UseSuspenseQueryResult, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; -}): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -})): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; - -// @public (undocumented) -export interface UseSuspenseQueryResult { - // (undocumented) - client: ApolloClient; - // (undocumented) - data: MaybeMasked; - // (undocumented) - error: ApolloError | undefined; - // (undocumented) - fetchMore: FetchMoreFunction; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - refetch: RefetchFunction; - // (undocumented) - subscribeToMore: SubscribeToMoreFunction; -} - -// @public (undocumented) -type VariablesOption = [ -TVariables -] extends [never] ? { - variables?: Record; -} : Record extends OnlyRequiredProperties ? { - variables?: TVariables; -} : { - variables: TVariables; -}; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:52:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:76:4 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useLoadableQuery.ts:125:9 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useSuspenseFragment.ts:70:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-react_internal.api.md b/.api-reports/api-report-react_internal.api.md index 5fd524c66a7..4a24ecdb25c 100644 --- a/.api-reports/api-report-react_internal.api.md +++ b/.api-reports/api-report-react_internal.api.md @@ -4,2652 +4,277 @@ ```ts -import type { ASTNode } from 'graphql'; +import type { ApolloClient } from '@apollo/client'; +import type { createQueryPreloader } from '@apollo/client/react'; +import type { DataState } from '@apollo/client'; +import type { DecoratedPromise } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { MaybeMasked } from '@apollo/client/masking'; +import type { MaybeMasked as MaybeMasked_2 } from '@apollo/client'; +import type { Observable } from 'rxjs'; +import type { ObservableQuery } from '@apollo/client'; +import type { OperationVariables } from '@apollo/client'; +import type { useBackgroundQuery } from '@apollo/client/react'; +import type { useFragment } from '@apollo/client/react'; +import type { useQuery } from '@apollo/client/react'; +import type { useQueryRefHandlers } from '@apollo/client/react'; +import type { useReadQuery } from '@apollo/client/react'; +import type { useSuspenseFragment } from '@apollo/client/react'; +import type { useSuspenseQuery } from '@apollo/client/react'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "WrappedQueryRef" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; +export function assertWrappedQueryRef["dataState"]>(queryRef: QueryRef): asserts queryRef is WrappedQueryRef; -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} +export function assertWrappedQueryRef["dataState"]>(queryRef: QueryRef | undefined | null): asserts queryRef is WrappedQueryRef | undefined | null; -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} +// @public (undocumented) +export type CacheKey = [ +query: DocumentNode, +stringifiedVariables: string, +...queryKey: any[] +]; // @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} +export type FetchMoreFunction = (fetchMoreOptions: ObservableQuery.FetchMoreOptions) => Promise>>; // @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} +type FragmentCacheKey = [ +cacheId: string, +fragment: DocumentNode, +stringifiedVariables: string +]; // @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; +export interface FragmentKey { // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; + __fragmentKey?: string; } // @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // +class FragmentReference { + // Warning: (ae-forgotten-export) The symbol "FragmentReferenceOptions" needs to be exported by the entry point index.d.ts + constructor(client: ApolloClient, watchFragmentOptions: ApolloClient.WatchFragmentOptions & { + from: string; + }, options: FragmentReferenceOptions); // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts + readonly key: FragmentKey; + // Warning: (ae-forgotten-export) The symbol "Listener_2" needs to be exported by the entry point index.d.ts // // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // + listen(listener: Listener_2>): () => void; // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts + readonly observable: Observable>; + // Warning: (ae-forgotten-export) The symbol "FragmentRefPromise" needs to be exported by the entry point index.d.ts // // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; + promise: FragmentRefPromise>; // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; + retain(): () => void; } // @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // +interface FragmentReferenceOptions { // (undocumented) - networkStatus: NetworkStatus; + autoDisposeTimeoutMs?: number; // (undocumented) - partial?: boolean; + onDispose?: () => void; } -// Warning: (ae-forgotten-export) The symbol "WrappedQueryRef" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function assertWrappedQueryRef(queryRef: QueryRef): asserts queryRef is WrappedQueryRef; - // @public (undocumented) -export function assertWrappedQueryRef(queryRef: QueryRef | undefined | null): asserts queryRef is WrappedQueryRef | undefined | null; - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; +type FragmentRefPromise = DecoratedPromise; -// Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -type BackgroundQueryHookFetchPolicy = Extract; +type FunctionSignature = T extends (...args: infer A) => infer R ? (...args: A) => R : never; -// Warning: (ae-forgotten-export) The symbol "QueryHookOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "SuspenseCache" needs to be exported by the entry point index.d.ts // // @public (undocumented) -interface BackgroundQueryHookOptions extends Pick, "client" | "variables" | "errorPolicy" | "context" | "canonizeResults" | "returnPartialData" | "refetchWritePolicy"> { - // Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: BackgroundQueryHookFetchPolicy; - // (undocumented) - queryKey?: string | number | any[]; - // @deprecated - skip?: boolean; -} +export function getSuspenseCache(client: ApolloClient & { + [suspenseCacheSymbol]?: SuspenseCache; +}): SuspenseCache; -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "QueryRefPromise" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type BackgroundQueryHookOptionsNoInfer = BackgroundQueryHookOptions, NoInfer_2>; +export function getWrappedPromise["dataState"]>(queryRef: WrappedQueryRef): QueryRefPromise; -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "WrappableHooks" needs to be exported by the entry point index.d.ts // -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} +// @internal @deprecated +export type HookWrappers = { + [K in keyof WrappableHooks]?: (originalHook: WrappableHooks[K]) => WrappableHooks[K]; +}; // @public (undocumented) -namespace Cache_2 { +export class InternalQueryReference["dataState"] = DataState["dataState"]> { + // Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts + constructor(observable: ObservableQuery, options: InternalQueryReferenceOptions); // (undocumented) - interface BatchOptions, TUpdateResult = void> { - // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts + applyOptions(watchQueryOptions: ObservedOptions): QueryRefPromise; + // Warning: (ae-forgotten-export) The symbol "ObservedOptions" needs to be exported by the entry point index.d.ts // // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } + didChangeOptions(watchQueryOptions: ObservedOptions): boolean; // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } + get disposed(): boolean; // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } + fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts + readonly key: QueryKey; + // Warning: (ae-forgotten-export) The symbol "Listener" needs to be exported by the entry point index.d.ts // // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -export type CacheKey = [ -query: DocumentNode, -stringifiedVariables: string, -...queryKey: any[] -]; - -// @public (undocumented) -const enum CacheWriteBehavior { + listen(listener: Listener): () => void; // (undocumented) - FORBID = 0, + readonly observable: ObservableQuery; // (undocumented) - MERGE = 2, + promise: QueryRefPromise; // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); + refetch(variables: OperationVariables | undefined): Promise>; // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // + reinitialize(): void; // (undocumented) - beforeNext(callback: NextResultListener): void; + result: ObservableQuery.Result, TStates>; // (undocumented) - cancel: (reason: any) => void; + retain(): () => void; // (undocumented) - readonly promise: Promise; + softRetain(): () => void; // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// Warning: (ae-forgotten-export) The symbol "PreloadQueryFunction" needs to be exported by the entry point index.d.ts -// -// @public -function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; - -// @public (undocumented) -interface DataMasking { + get watchQueryOptions(): ObservableQuery.Options; } // @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } +interface InternalQueryReferenceOptions { // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // + autoDisposeTimeoutMs?: number; // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; + onDispose?: () => void; } -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; +type Listener["dataState"]> = (promise: QueryRefPromise) => void; -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; +type Listener_2 = (promise: FragmentRefPromise) => void; // @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; +const OBSERVED_CHANGED_OPTIONS: readonly ["context", "errorPolicy", "fetchPolicy", "refetchWritePolicy", "returnPartialData"]; -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "OBSERVED_CHANGED_OPTIONS" needs to be exported by the entry point index.d.ts // // @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; +type ObservedOptions = Pick; // @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; +const PRELOADED_QUERY_REF_BRAND: unique symbol; -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; +// @public +export interface PreloadedQueryRef["dataState"] = "complete" | "streaming"> extends QueryRef { + // @internal @deprecated (undocumented) + [PRELOADED_QUERY_REF_BRAND]: typeof PRELOADED_QUERY_REF_BRAND; +} // @public (undocumented) -type DeepPartialSet = {} & Set>; +const PROMISE_SYMBOL: unique symbol; // @public (undocumented) -interface DefaultContext extends Record { -} +const QUERY_REF_BRAND: unique symbol; // @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} +const QUERY_REFERENCE_SYMBOL: unique symbol; // @public (undocumented) -interface DeleteModifier { +export interface QueryKey { // (undocumented) - [_deleteModifier]: true; + __queryKey?: string; } -// @public (undocumented) -const _deleteModifier: unique symbol; +// @public +export interface QueryRef["dataState"] = "complete" | "streaming"> { + // @internal @deprecated (undocumented) + [QUERY_REF_BRAND]?(variables: TVariables): { + data: TData; + states: TStates; + }; +} // @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} +type QueryRefPromise["dataState"]> = DecoratedPromise, TStates>>; // @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; +export type RefetchFunction = (variables?: Partial) => Promise>; // @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; +class SuspenseCache { + constructor(options?: SuspenseCacheOptions); // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; + add(cacheKey: CacheKey, queryRef: InternalQueryReference): void; + // Warning: (ae-forgotten-export) The symbol "FragmentCacheKey" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "FragmentReference" needs to be exported by the entry point index.d.ts + // // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; + getFragmentRef(cacheKey: FragmentCacheKey, client: ApolloClient, options: ApolloClient.WatchFragmentOptions & { + from: string; + }): FragmentReference; // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; + getQueryRef["dataState"] = DataState["dataState"]>(cacheKey: CacheKey, createObservable: () => ObservableQuery): InternalQueryReference; } // @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; +export interface SuspenseCacheOptions { + autoDisposeTimeoutMs?: number; +} // @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} +const suspenseCacheSymbol: unique symbol; -// @public -type ErrorPolicy = "none" | "ignore" | "all"; +// @public (undocumented) +export function unwrapQueryRef["dataState"]>(queryRef: WrappedQueryRef): InternalQueryReference; // @public (undocumented) -type Exact = (x: T) => T; +export function unwrapQueryRef["dataState"]>(queryRef: Partial>): undefined | InternalQueryReference; -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { +// @public (undocumented) +export function updateWrappedQueryRef["dataState"]>(queryRef: WrappedQueryRef, promise: QueryRefPromise): void; + +// @public (undocumented) +interface WrappableHooks { + // Warning: (ae-forgotten-export) The symbol "FunctionSignature" needs to be exported by the entry point index.d.ts + // // (undocumented) - data?: never; + createQueryPreloader: FunctionSignature; // (undocumented) - errors?: never; + useBackgroundQuery: FunctionSignature; // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // + useFragment: FunctionSignature; // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { + useQuery: FunctionSignature; // (undocumented) - data: TData | null | undefined; + useQueryRefHandlers: FunctionSignature; // (undocumented) - errors?: ReadonlyArray; + useReadQuery: FunctionSignature; // (undocumented) - extensions?: TExtensions; + useSuspenseFragment: FunctionSignature; // (undocumented) - incremental?: never; + useSuspenseQuery: FunctionSignature; } -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; +// @internal @deprecated +interface WrappedQueryRef["dataState"] = "complete" | "streaming"> extends QueryRef { + // @deprecated (undocumented) + [PROMISE_SYMBOL]: QueryRefPromise; + // @deprecated (undocumented) + readonly [QUERY_REFERENCE_SYMBOL]: InternalQueryReference; +} // @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchMoreFunction = (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TVariables; - }) => Unmasked; -}) => Promise>>; - -// @public (undocumented) -type FetchMoreOptions = Parameters["fetchMore"]>[0]; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -type FragmentCacheKey = [ -cacheId: string, -fragment: DocumentNode, -stringifiedVariables: string -]; - -// @public (undocumented) -interface FragmentKey { - // (undocumented) - __fragmentKey?: string; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -class FragmentReference> { - // Warning: (ae-forgotten-export) The symbol "FragmentReferenceOptions" needs to be exported by the entry point index.d.ts - constructor(client: ApolloClient, watchFragmentOptions: WatchFragmentOptions & { - from: string; - }, options: FragmentReferenceOptions); - // Warning: (ae-forgotten-export) The symbol "FragmentKey" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly key: FragmentKey; - // Warning: (ae-forgotten-export) The symbol "Listener_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - listen(listener: Listener_2>): () => void; - // (undocumented) - readonly observable: Observable>; - // Warning: (ae-forgotten-export) The symbol "FragmentRefPromise" needs to be exported by the entry point index.d.ts - // - // (undocumented) - promise: FragmentRefPromise>; - // (undocumented) - retain(): () => void; -} - -// @public (undocumented) -interface FragmentReferenceOptions { - // (undocumented) - autoDisposeTimeoutMs?: number; - // (undocumented) - onDispose?: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "PromiseWithState" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FragmentRefPromise = PromiseWithState; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type From = StoreObject | Reference | FragmentType> | string | null; - -// @public (undocumented) -interface FulfilledPromise extends Promise { - // (undocumented) - status: "fulfilled"; - // (undocumented) - value: TValue; -} - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// Warning: (ae-forgotten-export) The symbol "SuspenseCache" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function getSuspenseCache(client: ApolloClient & { - [suspenseCacheSymbol]?: SuspenseCache; -}): SuspenseCache; - -// Warning: (ae-forgotten-export) The symbol "QueryRefPromise" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function getWrappedPromise(queryRef: WrappedQueryRef): QueryRefPromise; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "WrappableHooks" needs to be exported by the entry point index.d.ts -// -// @internal -export type HookWrappers = { - [K in keyof WrappableHooks]?: (originalHook: WrappableHooks[K]) => WrappableHooks[K]; -}; - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -export class InternalQueryReference { - // Warning: (ae-forgotten-export) The symbol "InternalQueryReferenceOptions" needs to be exported by the entry point index.d.ts - constructor(observable: ObservableQuery, options: InternalQueryReferenceOptions); - // (undocumented) - applyOptions(watchQueryOptions: ObservedOptions): QueryRefPromise; - // Warning: (ae-forgotten-export) The symbol "ObservedOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - didChangeOptions(watchQueryOptions: ObservedOptions): boolean; - // (undocumented) - get disposed(): boolean; - // Warning: (ae-forgotten-export) The symbol "FetchMoreOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchMore(options: FetchMoreOptions): Promise>; - // (undocumented) - readonly key: QueryKey; - // Warning: (ae-forgotten-export) The symbol "Listener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - listen(listener: Listener): () => void; - // (undocumented) - readonly observable: ObservableQuery; - // (undocumented) - promise: QueryRefPromise; - // (undocumented) - refetch(variables: OperationVariables | undefined): Promise>; - // (undocumented) - reinitialize(): void; - // (undocumented) - result: ApolloQueryResult>; - // (undocumented) - retain(): () => void; - // (undocumented) - softRetain(): () => void; - // (undocumented) - get watchQueryOptions(): WatchQueryOptions; -} - -// @public (undocumented) -interface InternalQueryReferenceOptions { - // (undocumented) - autoDisposeTimeoutMs?: number; - // (undocumented) - onDispose?: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "QueryResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface InteropQueryResult extends QueryResult { - // @deprecated - called: boolean; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -type Listener = (promise: QueryRefPromise) => void; - -// @public (undocumented) -type Listener_2 = (promise: FragmentRefPromise) => void; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -const OBSERVED_CHANGED_OPTIONS: readonly ["canonizeResults", "context", "errorPolicy", "fetchPolicy", "refetchWritePolicy", "returnPartialData"]; - -// Warning: (ae-forgotten-export) The symbol "OBSERVED_CHANGED_OPTIONS" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ObservedOptions = Pick; - -// @public -type OnlyRequiredProperties = { - [K in keyof T as {} extends Pick ? never : K]: T[K]; -}; - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -interface PendingPromise extends Promise { - // (undocumented) - status: "pending"; -} - -// @public -export interface PreloadedQueryRef extends QueryRef { - // @deprecated - toPromise(): Promise>; -} - -// @public (undocumented) -type PreloadQueryFetchPolicy = Extract; - -// @public -interface PreloadQueryFunction { - // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptionsArg" needs to be exported by the entry point index.d.ts - >(query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg, TOptions>): PreloadedQueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef | undefined, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - }): PreloadedQueryRef, TVariables>; - (query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg>): PreloadedQueryRef; - // (undocumented) - toPromise>(queryRef: TQueryRef): Promise; -} - -// Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type PreloadQueryOptions = { - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: PreloadQueryFetchPolicy; - returnPartialData?: boolean; - refetchWritePolicy?: RefetchWritePolicy; -} & VariablesOption; - -// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type PreloadQueryOptionsArg = [TVariables] extends [never] ? [ -options?: PreloadQueryOptions & TOptions -] : {} extends OnlyRequiredProperties ? [ -options?: PreloadQueryOptions> & Omit -] : [ -options: PreloadQueryOptions> & Omit -]; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const PROMISE_SYMBOL: unique symbol; - -// Warning: (ae-forgotten-export) The symbol "PendingPromise" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "FulfilledPromise" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RejectedPromise" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type PromiseWithState = PendingPromise | FulfilledPromise | RejectedPromise; - -// @public (undocumented) -const QUERY_REF_BRAND: unique symbol; - -// @public (undocumented) -const QUERY_REFERENCE_SYMBOL: unique symbol; - -// Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "QueryFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryHookOptions extends QueryFunctionOptions { -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -export interface QueryKey { - // (undocumented) - __queryKey?: string; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public -export interface QueryRef { - // @internal (undocumented) - [QUERY_REF_BRAND]?(variables: TVariables): TData; -} - -// @public @deprecated (undocumented) -export interface QueryReference extends QueryRef { - // @deprecated (undocumented) - toPromise?: unknown; -} - -// @public (undocumented) -type QueryRefPromise = PromiseWithState>>; - -// Warning: (ae-forgotten-export) The symbol "ObservableQueryFields" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchFunction = ObservableQueryFields["refetch"]; - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -interface RejectedPromise extends Promise { - // (undocumented) - reason: unknown; - // (undocumented) - status: "rejected"; -} - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type SkipToken = typeof skipToken; - -// @public (undocumented) -const skipToken: unique symbol; - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// @public (undocumented) -class SuspenseCache { - constructor(options?: SuspenseCacheOptions); - // (undocumented) - add(cacheKey: CacheKey, queryRef: InternalQueryReference): void; - // Warning: (ae-forgotten-export) The symbol "FragmentCacheKey" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FragmentReference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFragmentRef(cacheKey: FragmentCacheKey, client: ApolloClient, options: WatchFragmentOptions & { - from: string; - }): FragmentReference; - // (undocumented) - getQueryRef(cacheKey: CacheKey, createObservable: () => ObservableQuery): InternalQueryReference; -} - -// @public (undocumented) -export interface SuspenseCacheOptions { - autoDisposeTimeoutMs?: number; -} - -// @public (undocumented) -const suspenseCacheSymbol: unique symbol; - -// @public (undocumented) -type SuspenseQueryHookFetchPolicy = Extract; - -// @public (undocumented) -interface SuspenseQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "SuspenseQueryHookFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: SuspenseQueryHookFetchPolicy; - queryKey?: string | number | any[]; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - // @deprecated - skip?: boolean; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -export function unwrapQueryRef(queryRef: WrappedQueryRef): InternalQueryReference; - -// @public (undocumented) -export function unwrapQueryRef(queryRef: Partial>): undefined | InternalQueryReference; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -export function updateWrappedQueryRef(queryRef: WrappedQueryRef, promise: QueryRefPromise): void; - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptionsNoInfer" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UseBackgroundQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useBackgroundQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer & TOptions): [ -(QueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)), -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): [ -QueryRef | undefined, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - errorPolicy: "ignore" | "all"; -}): [ -QueryRef, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; - returnPartialData: true; -}): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -}): [ -QueryRef, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; -}): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer): [QueryRef, UseBackgroundQueryResult]; - -// Warning: (ae-forgotten-export) The symbol "SkipToken" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken): [undefined, UseBackgroundQueryResult]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -})): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | BackgroundQueryHookOptionsNoInfer): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -type UseBackgroundQueryResult = { - subscribeToMore: SubscribeToMoreFunction; - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; -}; - -// Warning: (ae-forgotten-export) The symbol "UseFragmentOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UseFragmentResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useFragment(options: UseFragmentOptions): UseFragmentResult; - -// @public (undocumented) -interface UseFragmentOptions extends Omit, NoInfer_2>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - client?: ApolloClient; - // (undocumented) - from: StoreObject | Reference | FragmentType> | string | null; - // (undocumented) - optimistic?: boolean; -} - -// @public (undocumented) -type UseFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing?: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "InteropQueryResult" needs to be exported by the entry point index.d.ts -// -// @public -function useQuery(query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions, NoInfer_2>): InteropQueryResult; - -// Warning: (ae-forgotten-export) The symbol "UseQueryRefHandlersResult" needs to be exported by the entry point index.d.ts -// -// @public -function useQueryRefHandlers(queryRef: QueryRef): UseQueryRefHandlersResult; - -// @public (undocumented) -interface UseQueryRefHandlersResult { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; -} - -// Warning: (ae-forgotten-export) The symbol "UseReadQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useReadQuery(queryRef: QueryRef): UseReadQueryResult; - -// @public (undocumented) -interface UseReadQueryResult { - data: MaybeMasked; - error: ApolloError | undefined; - networkStatus: NetworkStatus; -} - -// Warning: (ae-forgotten-export) The symbol "UseSuspenseFragmentOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UseSuspenseFragmentResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: NonNullable>; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: null; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: From; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; - -// @public (undocumented) -type UseSuspenseFragmentOptions = { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: From; - optimistic?: boolean; - client?: ApolloClient; -} & VariablesOption>; - -// @public (undocumented) -type UseSuspenseFragmentResult = { - data: MaybeMasked; -}; - -// Warning: (ae-forgotten-export) The symbol "SuspenseQueryHookOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UseSuspenseQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function useSuspenseQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2> & TOptions): UseSuspenseQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? TOptions["skip"] extends boolean ? DeepPartial | undefined : DeepPartial : TOptions["skip"] extends boolean ? TData | undefined : TData, TVariables>; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; - returnPartialData: true; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -}): UseSuspenseQueryResult, TVariables>; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; -}): UseSuspenseQueryResult; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -})): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; - -// @public (undocumented) -interface UseSuspenseQueryResult { - // (undocumented) - client: ApolloClient; - // (undocumented) - data: MaybeMasked; - // (undocumented) - error: ApolloError | undefined; - // (undocumented) - fetchMore: FetchMoreFunction; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - refetch: RefetchFunction; - // (undocumented) - subscribeToMore: SubscribeToMoreFunction; -} - -// @public (undocumented) -type VariablesOption = [ -TVariables -] extends [never] ? { - variables?: Record; -} : Record extends OnlyRequiredProperties ? { - variables?: TVariables; -} : { - variables: TVariables; -}; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; +export const wrapperSymbol: unique symbol; // @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -interface WrappableHooks { - // Warning: (ae-forgotten-export) The symbol "createQueryPreloader" needs to be exported by the entry point index.d.ts - // - // (undocumented) - createQueryPreloader: typeof createQueryPreloader; - // Warning: (ae-forgotten-export) The symbol "useBackgroundQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useBackgroundQuery: typeof useBackgroundQuery; - // Warning: (ae-forgotten-export) The symbol "useFragment" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useFragment: typeof useFragment; - // Warning: (ae-forgotten-export) The symbol "useQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useQuery: typeof useQuery; - // Warning: (ae-forgotten-export) The symbol "useQueryRefHandlers" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useQueryRefHandlers: typeof useQueryRefHandlers; - // Warning: (ae-forgotten-export) The symbol "useReadQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useReadQuery: typeof useReadQuery; - // Warning: (ae-forgotten-export) The symbol "useSuspenseFragment" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useSuspenseFragment: typeof useSuspenseFragment; - // Warning: (ae-forgotten-export) The symbol "useSuspenseQuery" needs to be exported by the entry point index.d.ts - // - // (undocumented) - useSuspenseQuery: typeof useSuspenseQuery; -} - -// @internal -interface WrappedQueryRef extends QueryRef { - // (undocumented) - [PROMISE_SYMBOL]: QueryRefPromise; - // (undocumented) - readonly [QUERY_REFERENCE_SYMBOL]: InternalQueryReference; - // (undocumented) - toPromise?(): Promise; -} - -// @public (undocumented) -export function wrapQueryRef(internalQueryRef: InternalQueryReference): WrappedQueryRef; - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:52:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:76:4 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useSuspenseFragment.ts:70:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts -// src/react/query-preloader/createQueryPreloader.ts:81:5 - (ae-forgotten-export) The symbol "PreloadQueryFetchPolicy" needs to be exported by the entry point index.d.ts -// src/react/query-preloader/createQueryPreloader.ts:121:3 - (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts +export function wrapQueryRef["dataState"]>(internalQueryRef: InternalQueryReference): WrappedQueryRef; // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-react_internal_compiler-runtime.api.md b/.api-reports/api-report-react_internal_compiler-runtime.api.md new file mode 100644 index 00000000000..8298b589f07 --- /dev/null +++ b/.api-reports/api-report-react_internal_compiler-runtime.api.md @@ -0,0 +1,12 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export const c: any; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-react_parser.api.md b/.api-reports/api-report-react_parser.api.md deleted file mode 100644 index 01d1c55a8e0..00000000000 --- a/.api-reports/api-report-react_parser.api.md +++ /dev/null @@ -1,48 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { DocumentNode } from 'graphql'; -import type { VariableDefinitionNode } from 'graphql'; - -// @public (undocumented) -enum DocumentType_2 { - // (undocumented) - Mutation = 1, - // (undocumented) - Query = 0, - // (undocumented) - Subscription = 2 -} -export { DocumentType_2 as DocumentType } - -// @public (undocumented) -export interface IDocumentDefinition { - // (undocumented) - name: string; - // (undocumented) - type: DocumentType_2; - // (undocumented) - variables: ReadonlyArray; -} - -// @public (undocumented) -export function operationName(type: DocumentType_2): string; - -// @public @deprecated (undocumented) -export function parser(document: DocumentNode): IDocumentDefinition; - -// @public (undocumented) -export namespace parser { - var // (undocumented) - resetCache: () => void; -} - -// @public (undocumented) -export function verifyDocumentType(document: DocumentNode, type: DocumentType_2): void; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-react_ssr.api.md b/.api-reports/api-report-react_ssr.api.md index a9dcb16f31d..24e1eda15a5 100644 --- a/.api-reports/api-report-react_ssr.api.md +++ b/.api-reports/api-report-react_ssr.api.md @@ -4,2041 +4,72 @@ ```ts -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; +import type { ApolloClient } from '@apollo/client'; import type * as ReactTypes from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; +// @public @deprecated (undocumented) +export function getDataFromTree(tree: ReactTypes.ReactNode, context?: { + [key: string]: any; +}): Promise; -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "GetMarkupFromTreeOptions" needs to be exported by the entry point index.d.ts // -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} +// @public @deprecated (undocumented) +export function getMarkupFromTree({ tree, context, renderFunction, }: GetMarkupFromTreeOptions): Promise; // @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; +type GetMarkupFromTreeOptions = { + tree: ReactTypes.ReactNode; + context?: { + [key: string]: any; }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; + renderFunction?: prerenderStatic.RenderToString | prerenderStatic.RenderToStringPromise; }; -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface BaseQueryOptions extends SharedWatchQueryOptions { - // Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; -} - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// // @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -interface DataMasking { -} +export function prerenderStatic({ tree, context, renderFunction, signal, ignoreResults, diagnostics, maxRerenders, }: prerenderStatic.Options): Promise; // @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // +export namespace prerenderStatic { // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; + export interface Diagnostics { + renderCount: number; } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; + export interface Options { + context?: { + client?: ApolloClient; + }; + diagnostics?: boolean; + ignoreResults?: boolean; + maxRerenders?: number; + renderFunction: RenderToString | RenderToStringPromise | PrerenderToWebStream | PrerenderToNodeStream | ((reactNode: ReactTypes.ReactNode) => ReturnType | ReturnType | ReturnType | ReturnType); + signal?: AbortSignal; + tree: ReactTypes.ReactNode; } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // + export type PrerenderToNodeStream = (reactNode: ReactTypes.ReactNode) => Promise<{ + prelude: AsyncIterable; + }>; // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } + export type PrerenderToWebStream = (reactNode: ReactTypes.ReactNode) => Promise<{ + prelude: ReadableStream; + }>; // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } + export type RenderToString = (element: ReactTypes.ReactNode) => string; // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // + export type RenderToStringPromise = (element: ReactTypes.ReactNode) => PromiseLike; // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { + export interface Result { + aborted: boolean; + diagnostics?: Diagnostics; + result: string; } } -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// // @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -export function getDataFromTree(tree: ReactTypes.ReactNode, context?: { - [key: string]: any; -}): Promise; - -// Warning: (ae-forgotten-export) The symbol "GetMarkupFromTreeOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function getMarkupFromTree({ tree, context, renderFunction, }: GetMarkupFromTreeOptions): Promise; - -// @public (undocumented) -type GetMarkupFromTreeOptions = { - tree: ReactTypes.ReactNode; - context?: { - [key: string]: any; - }; - renderFunction?: (tree: ReactTypes.ReactElement) => string | PromiseLike; -}; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public @deprecated (undocumented) -interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreFunction" needs to be exported by the entry point index.d.ts - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -interface QueryData { - // (undocumented) - fetchData(): Promise; - // (undocumented) - getOptions(): any; -} - -// Warning: (ae-forgotten-export) The symbol "QueryFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryDataOptions extends QueryFunctionOptions { - // Warning: (ae-forgotten-export) The symbol "QueryResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - children?: (result: QueryResult) => ReactTypes.ReactNode; - query: DocumentNode | TypedDocumentNode; -} - -// Warning: (ae-forgotten-export) The symbol "BaseQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "ObservableQueryFields" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -export class RenderPromises { - // (undocumented) - addObservableQueryPromise(obsQuery: ObservableQuery): ReactTypes.ReactNode; - // Warning: (ae-forgotten-export) The symbol "QueryData" needs to be exported by the entry point index.d.ts - // - // (undocumented) - addQueryPromise(queryInstance: QueryData, finish?: () => ReactTypes.ReactNode): ReactTypes.ReactNode; - // (undocumented) - consumeAndAwaitPromises(): Promise; - // Warning: (ae-forgotten-export) The symbol "QueryDataOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getSSRObservable(props: QueryDataOptions): ObservableQuery | null; - // (undocumented) - hasPromises(): boolean; - // (undocumented) - registerSSRObservable(observable: ObservableQuery): void; - // (undocumented) - stop(): void; -} - -// @public (undocumented) export function renderToStringWithData(component: ReactTypes.ReactElement): Promise; -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public (undocumented) -interface SubscribeToMoreFunction { - // (undocumented) - (options: SubscribeToMoreOptions): () => void; -} - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-testing.api.md b/.api-reports/api-report-testing.api.md index 408926bae4e..8af7cd7e04c 100644 --- a/.api-reports/api-report-testing.api.md +++ b/.api-reports/api-report-testing.api.md @@ -4,2100 +4,134 @@ ```ts -import type { ASTNode } from 'graphql'; +import { ApolloLink } from '@apollo/client/link'; import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import * as React_2 from 'react'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; +import { FormattedExecutionResult } from 'graphql'; +import { Observable } from 'rxjs'; +import type { OperationVariables } from '@apollo/client'; +import type { Unmasked } from '@apollo/client/masking'; -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} +// @internal @deprecated (undocumented) +type CovariantUnaryFunction = { + fn(arg: Arg): Ret; +}["fn"]; -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} +// @public @deprecated (undocumented) +export type MockedRequest> = MockLink.MockedRequest; -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; +// @public @deprecated (undocumented) +export type MockedResponse, TVariables extends OperationVariables = Record> = MockLink.MockedResponse; // @public (undocumented) -namespace Cache_2 { +export namespace MockLink { // (undocumented) - interface BatchOptions, TUpdateResult = void> { - // (undocumented) - onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; + export interface DefaultOptions { // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; + delay?: MockLink.Delay; } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } + export type Delay = number | DelayFunction; // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } + export type DelayFunction = (operation: ApolloLink.Operation) => number; // (undocumented) - interface ModifyOptions = Record> { + export interface MockedRequest { // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts + query: DocumentNode; + // Warning: (ae-forgotten-export) The symbol "VariableMatcher" needs to be exported by the entry point index.d.ts // // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; + variables?: TVariables | VariableMatcher; } // (undocumented) - interface ResetOptions { + export interface MockedResponse, out TVariables extends OperationVariables = Record> { // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // + delay?: number | MockLink.DelayFunction; // (undocumented) - callback: WatchCallback; + error?: Error; // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // + maxUsageCount?: number; // (undocumented) - lastDiff?: DiffResult; + request: MockedRequest; // (undocumented) - watcher?: object; + result?: ApolloLink.Result> | ResultFunction>, TVariables>; } // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { + export interface Options { // (undocumented) - dataId?: string; + defaultOptions?: DefaultOptions; // (undocumented) - result: Unmasked; + showWarnings?: boolean; } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, + // Warning: (ae-forgotten-export) The symbol "CovariantUnaryFunction" needs to be exported by the entry point index.d.ts + // // (undocumented) - OVERWRITE = 1 + export type ResultFunction> = CovariantUnaryFunction; } -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - // @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); +export class MockLink extends ApolloLink { + constructor(mockedResponses: ReadonlyArray, Record>>, options?: MockLink.Options); // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // + addMockedResponse(mockedResponse: MockLink.MockedResponse): void; // (undocumented) - beforeNext(callback: NextResultListener): void; + static defaultOptions: MockLink.DefaultOptions; // (undocumented) - cancel: (reason: any) => void; + operation: ApolloLink.Operation; // (undocumented) - readonly promise: Promise; + request(operation: ApolloLink.Operation): Observable; // (undocumented) - removeObserver(observer: Observer): void; + showWarnings: boolean; } -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @internal (undocumented) -type CovariantUnaryFunction = { - fn(arg: Arg): Ret; -}["fn"]; - -// Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "NormalizedCacheObject" needs to be exported by the entry point index.d.ts -// // @public @deprecated (undocumented) -export function createMockClient(data: TData, query: DocumentNode, variables?: {}): ApolloClient; +export type MockLinkOptions = MockLink.Options; // @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // +export namespace MockSubscriptionLink { // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { + export interface Result { + // (undocumented) + delay?: number; + // (undocumented) + error?: Error; + // (undocumented) + result?: ApolloLink.Result; } } -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - // @public (undocumented) -interface DefaultOptions { +export class MockSubscriptionLink extends ApolloLink { + constructor(); // (undocumented) - mutate?: Partial>; + onSetup(listener: any): void; // (undocumented) - query?: Partial>; + onUnsubscribe(listener: any): void; // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { + operation?: ApolloLink.Operation; // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); + request(operation: ApolloLink.Operation): Observable, Record>>; // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; + setups: any[]; // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; + simulateComplete(): void; // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; + simulateResult(result: MockSubscriptionLink.Result, complete?: boolean): void; // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; + unsubscribers: any[]; } -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - // @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} +export function realisticDelay({ min, max, }?: { + min?: number; + max?: number; +}): MockLink.DelayFunction; -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// // @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public @deprecated (undocumented) -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; -}; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// @public (undocumented) -interface MockApolloLink extends ApolloLink { - // (undocumented) - operation?: Operation; -} - -// Warning: (ae-forgotten-export) The symbol "MockedProviderState" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export class MockedProvider extends React_2.Component { - constructor(props: MockedProviderProps); - // (undocumented) - componentWillUnmount(): void; - // (undocumented) - render(): React_2.JSX.Element | null; -} - -// @public (undocumented) -export interface MockedProviderProps { - // @deprecated (undocumented) - addTypename?: boolean; - // (undocumented) - cache?: ApolloCache; - // (undocumented) - childProps?: object; - // (undocumented) - children?: any; - // @deprecated - connectToDevTools?: boolean; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - link?: ApolloLink; - // (undocumented) - mocks?: ReadonlyArray>; - // (undocumented) - resolvers?: Resolvers; - // (undocumented) - showWarnings?: boolean; -} - -// @public (undocumented) -interface MockedProviderState { - // (undocumented) - client: ApolloClient; -} - -// @public (undocumented) -export interface MockedResponse, out TVariables = Record> { - // (undocumented) - delay?: number; - // (undocumented) - error?: Error; - // (undocumented) - maxUsageCount?: number; - // @deprecated (undocumented) - newData?: ResultFunction>, TVariables>; - // (undocumented) - request: GraphQLRequest; - // (undocumented) - result?: FetchResult> | ResultFunction>, TVariables>; - // Warning: (ae-forgotten-export) The symbol "VariableMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) - variableMatcher?: VariableMatcher; -} - -// @public (undocumented) -interface MockedSubscriptionResult { - // (undocumented) - delay?: number; - // (undocumented) - error?: Error; - // (undocumented) - result?: FetchResult; -} - -// @public (undocumented) -export class MockLink extends ApolloLink { - constructor(mockedResponses: ReadonlyArray>, addTypename?: Boolean, options?: MockLinkOptions); - // (undocumented) - addMockedResponse(mockedResponse: MockedResponse): void; - // (undocumented) - addTypename: Boolean; - // (undocumented) - operation: Operation; - // (undocumented) - request(operation: Operation): Observable | null; - // (undocumented) - showWarnings: boolean; -} - -// @public (undocumented) -export interface MockLinkOptions { - // (undocumented) - showWarnings?: boolean; -} - -// @public @deprecated (undocumented) -export function mockObservableLink(): MockSubscriptionLink; - -// Warning: (ae-forgotten-export) The symbol "MockApolloLink" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export function mockSingleLink(...mockedResponses: Array): MockApolloLink; - -// @public (undocumented) -export class MockSubscriptionLink extends ApolloLink { - constructor(); - // (undocumented) - onSetup(listener: any): void; - // (undocumented) - onUnsubscribe(listener: any): void; - // (undocumented) - operation?: Operation; - // (undocumented) - request(operation: Operation): Observable; - // (undocumented) - setups: any[]; - // (undocumented) - simulateComplete(): void; - // Warning: (ae-forgotten-export) The symbol "MockedSubscriptionResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - simulateResult(result: MockedSubscriptionResult, complete?: boolean): void; - // (undocumented) - unsubscribers: any[]; -} - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// @public -interface NormalizedCacheObject { - // (undocumented) - [dataId: string]: StoreObject | undefined; - // (undocumented) - __META?: { - extraRootIds: string[]; - }; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// Warning: (ae-forgotten-export) The symbol "CovariantUnaryFunction" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type ResultFunction> = CovariantUnaryFunction; - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public @deprecated (undocumented) -export function subscribeAndCount(reject: (reason: any) => any, observable: Observable, cb: (handleCount: number, result: TResult) => any): Subscription; - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -export function tick(): Promise; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} +export type ResultFunction> = MockLink.ResultFunction; // @public (undocumented) type VariableMatcher> = CovariantUnaryFunction; -// @public (undocumented) -export function wait(ms: number): Promise; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// @public @deprecated (undocumented) -export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// @public @deprecated (undocumented) -export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// @public @deprecated (undocumented) -export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-testing_core.api.md b/.api-reports/api-report-testing_core.api.md deleted file mode 100644 index 3b52ea57538..00000000000 --- a/.api-reports/api-report-testing_core.api.md +++ /dev/null @@ -1,2060 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { ASTNode } from 'graphql'; -import type { DocumentNode } from 'graphql'; -import type { FieldNode } from 'graphql'; -import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import type { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type { Subscriber } from 'zen-observable-ts'; -import type { Subscription } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "StoreObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "Reference" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransform" needs to be exported by the entry point index.d.ts - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public -type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// Warning: (ae-forgotten-export) The symbol "StoreValue" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @internal (undocumented) -type CovariantUnaryFunction = { - fn(arg: Arg): Ret; -}["fn"]; - -// Warning: (ae-forgotten-export) The symbol "ApolloClient" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "NormalizedCacheObject" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export function createMockClient(data: TData, query: DocumentNode, variables?: {}): ApolloClient; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// Warning: (ae-forgotten-export) The symbol "Primitive" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - // Warning: (ae-forgotten-export) The symbol "DocumentTransformCacheKey" needs to be exported by the entry point index.d.ts - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// @public (undocumented) -function isReference(obj: any): obj is Reference; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - -// @public @deprecated (undocumented) -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; -}; - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// @public (undocumented) -interface MockApolloLink extends ApolloLink { - // (undocumented) - operation?: Operation; -} - -// @public (undocumented) -export interface MockedResponse, out TVariables = Record> { - // (undocumented) - delay?: number; - // (undocumented) - error?: Error; - // (undocumented) - maxUsageCount?: number; - // @deprecated (undocumented) - newData?: ResultFunction>, TVariables>; - // (undocumented) - request: GraphQLRequest; - // (undocumented) - result?: FetchResult> | ResultFunction>, TVariables>; - // Warning: (ae-forgotten-export) The symbol "VariableMatcher" needs to be exported by the entry point index.d.ts - // - // (undocumented) - variableMatcher?: VariableMatcher; -} - -// @public (undocumented) -interface MockedSubscriptionResult { - // (undocumented) - delay?: number; - // (undocumented) - error?: Error; - // (undocumented) - result?: FetchResult; -} - -// @public (undocumented) -export class MockLink extends ApolloLink { - constructor(mockedResponses: ReadonlyArray>, addTypename?: Boolean, options?: MockLinkOptions); - // (undocumented) - addMockedResponse(mockedResponse: MockedResponse): void; - // (undocumented) - addTypename: Boolean; - // (undocumented) - operation: Operation; - // (undocumented) - request(operation: Operation): Observable | null; - // (undocumented) - showWarnings: boolean; -} - -// @public (undocumented) -export interface MockLinkOptions { - // (undocumented) - showWarnings?: boolean; -} - -// @public @deprecated (undocumented) -export function mockObservableLink(): MockSubscriptionLink; - -// Warning: (ae-forgotten-export) The symbol "MockApolloLink" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export function mockSingleLink(...mockedResponses: Array): MockApolloLink; - -// @public (undocumented) -export class MockSubscriptionLink extends ApolloLink { - constructor(); - // (undocumented) - onSetup(listener: any): void; - // (undocumented) - onUnsubscribe(listener: any): void; - // (undocumented) - operation?: Operation; - // (undocumented) - request(operation: Operation): Observable; - // (undocumented) - setups: any[]; - // (undocumented) - simulateComplete(): void; - // Warning: (ae-forgotten-export) The symbol "MockedSubscriptionResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - simulateResult(result: MockedSubscriptionResult, complete?: boolean): void; - // (undocumented) - unsubscribers: any[]; -} - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; - -// @public -interface NormalizedCacheObject { - // (undocumented) - [dataId: string]: StoreObject | undefined; - // (undocumented) - __META?: { - extraRootIds: string[]; - }; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts - // - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): Subscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): Subscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} - -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -interface ReadFieldFunction { - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} - -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; -}; - -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// Warning: (ae-forgotten-export) The symbol "CovariantUnaryFunction" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type ResultFunction> = CovariantUnaryFunction; - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; -} - -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public (undocumented) -type Source = MaybeAsync>; - -// @public (undocumented) -type StorageType = Record; - -// @public (undocumented) -interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} - -// Warning: (ae-forgotten-export) The symbol "AsStoreObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; - -// @public (undocumented) -type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; - -// @public @deprecated (undocumented) -export function subscribeAndCount(reject: (reason: any) => any, observable: Observable, cb: (handleCount: number, result: TResult) => any): Subscription; - -// @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} - -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - -// @public (undocumented) -export function tick(): Promise; - -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - -// @public (undocumented) -type TransformFn = (document: DocumentNode) => DocumentNode; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public (undocumented) -type VariableMatcher> = CovariantUnaryFunction; - -// @public (undocumented) -export function wait(ms: number): Promise; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// @public @deprecated (undocumented) -export function withErrorSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// @public @deprecated (undocumented) -export function withLogSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// @public @deprecated (undocumented) -export function withWarningSpy(it: (...args: TArgs) => TResult, ...args: TArgs): TResult; - -// Warnings were encountered during analysis: -// -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:101:3 - (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:102:3 - (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:103:3 - (ae-forgotten-export) The symbol "isReference" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:104:3 - (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts -// src/cache/core/types/common.ts:105:3 - (ae-forgotten-export) The symbol "StorageType" 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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-testing_experimental.api.md b/.api-reports/api-report-testing_experimental.api.md deleted file mode 100644 index ffb001b9d15..00000000000 --- a/.api-reports/api-report-testing_experimental.api.md +++ /dev/null @@ -1,87 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import type { FieldNode } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { GraphQLSchema } from 'graphql'; - -// @alpha @deprecated -export const createSchemaFetch: (schema: GraphQLSchema, mockFetchOpts?: { - validate?: boolean; - delay?: { - min: number; - max: number; - }; -}) => ((uri?: any, options?: any) => Promise) & { - mockGlobal: () => { - restore: () => void; - } & Disposable; -}; - -// Warning: (ae-forgotten-export) The symbol "TestSchemaOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ProxiedSchema" needs to be exported by the entry point index.d.ts -// -// @alpha @deprecated -export const createTestSchema: (schemaWithTypeDefs: GraphQLSchema, options: TestSchemaOptions) => ProxiedSchema; - -// @public -interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// Warning: (ae-forgotten-export) The symbol "TestSchemaFns" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ProxiedSchema = GraphQLSchema & TestSchemaFns; - -// @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// @public (undocumented) -interface TestSchemaFns { - // (undocumented) - add: (addOptions: { - resolvers: Resolvers; - }) => ProxiedSchema; - // (undocumented) - fork: (forkOptions?: { - resolvers?: Resolvers; - }) => ProxiedSchema; - // (undocumented) - reset: () => void; -} - -// @public (undocumented) -interface TestSchemaOptions { - // (undocumented) - resolvers: Resolvers; - // (undocumented) - scalars?: { - [key: string]: any; - }; -} - -// Warnings were encountered during analysis: -// -// 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/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/testing/experimental/createTestSchema.ts:10:23 - (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-testing_internal.api.md b/.api-reports/api-report-testing_internal.api.md new file mode 100644 index 00000000000..2d436b2f688 --- /dev/null +++ b/.api-reports/api-report-testing_internal.api.md @@ -0,0 +1,300 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloClient } from '@apollo/client'; +import { ApolloLink } from '@apollo/client'; +import { ApolloLink as ApolloLink_2 } from '@apollo/client/link'; +import type { ApolloPayloadResult } from '@apollo/client'; +import type { ExecuteContext } from '@apollo/client/link'; +import { FetchResult } from '@apollo/client'; +import type { GraphQLFormattedError } from 'graphql-17-alpha2'; +import type { GraphQLRequest } from '@apollo/client'; +import { HttpLink } from '@apollo/client/link/http'; +import type { InitialIncrementalExecutionResult } from 'graphql-17-alpha2'; +import type { MaskedDocumentNode } from '@apollo/client/masking'; +import type { MockedProviderProps } from '@apollo/client/testing/react'; +import type { MockLink } from '@apollo/client/testing'; +import type { Observable } from 'rxjs'; +import { Observable as Observable_2 } from '@apollo/client'; +import { Operation } from '@apollo/client'; +import type { Queries } from '@testing-library/dom'; +import type { queries } from '@testing-library/dom'; +import * as React_2 from 'react'; +import type * as ReactDOMClient from 'react-dom/client'; +import type { RenderHookOptions } from '@testing-library/react'; +import type { RenderHookResult } from '@testing-library/react'; +import type { RenderOptions } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; +import type { Subscribable } from 'rxjs'; +import type { SubsequentIncrementalExecutionResult } from 'graphql-17-alpha2'; +import type { TypedDocumentNode } from '@apollo/client'; + +// @public (undocumented) +export function actAsync(scope: () => T | Promise): Promise; + +// @public (undocumented) +export function addDelayToMocks[]>(mocks: T, delay?: number, override?: boolean): { + request: MockLink.MockedRequest>; + maxUsageCount?: number; + result?: FetchResult | MockLink.ResultFunction, Record> | undefined; + error?: Error; + delay: number | MockLink.DelayFunction; +}[]; + +// @public (undocumented) +type ConsoleMethod = "log" | "info" | "warn" | "error" | "debug"; + +// @public (undocumented) +export function createClientWrapper(client: ApolloClient, Wrapper?: React_2.JSXElementConstructor<{ + children: React_2.ReactNode; +}>): React_2.JSXElementConstructor<{ + children: React_2.ReactNode; +}>; + +// @public (undocumented) +export function createMockWrapper(renderOptions: MockedProviderProps, Wrapper?: React_2.JSXElementConstructor<{ + children: React_2.ReactNode; +}>): React_2.JSXElementConstructor<{ + children: React_2.ReactNode; +}>; + +// @public (undocumented) +export function createOperationWithDefaultContext(context: any, operation: GraphQLRequest, executeContext?: ExecuteContext): Operation; + +// @public (undocumented) +export function enableFakeTimers(config?: FakeTimersConfig | LegacyFakeTimersConfig): Disposable; + +// @public (undocumented) +export function executeWithDefaultContext(link: ApolloLink_2, operation: GraphQLRequest, context?: ExecuteContext): Observable_2; + +// @public (undocumented) +type HydrateableContainer = Parameters<(typeof ReactDOMClient)["hydrateRoot"]>[0]; + +// @public (undocumented) +type HydrateableContainer_2 = Parameters<(typeof ReactDOMClient)["hydrateRoot"]>[0]; + +// @public (undocumented) +interface Letter { + // (undocumented) + __typename: "Letter"; + // (undocumented) + letter: string; + // (undocumented) + position: number; +} + +// @public (undocumented) +export interface MaskedVariablesCaseData { + // (undocumented) + character: { + __typename: "Character"; + id: string; + } & { + " $fragmentRefs"?: { + MaskedVariablesCaseFragment: MaskedVariablesCaseFragment; + }; + }; +} + +// @public (undocumented) +type MaskedVariablesCaseFragment = { + __typename: "Character"; + name: string; +} & { + " $fragmentName"?: "MaskedVariablesCaseFragment"; +}; + +// @public (undocumented) +export function mockDeferStream, TExtensions = Record>(): { + httpLink: HttpLink; + enqueueInitialChunk(chunk: InitialIncrementalExecutionResult): void; + enqueueSubsequentChunk(chunk: SubsequentIncrementalExecutionResult): void; + enqueueErrorChunk(errors: GraphQLFormattedError[]): void; +}; + +// @public (undocumented) +export function mockMultipartSubscriptionStream, TExtensions = Record>(): { + httpLink: HttpLink; + enqueueHeartbeat: () => void; + enqueuePayloadResult(payload: ApolloPayloadResult["payload"], hasNext?: boolean): void; + enqueueProtocolErrors(errors: ApolloPayloadResult["errors"]): void; +}; + +// @public (undocumented) +type ObservableEvent = { + type: "next"; + value: T; +} | { + type: "error"; + error: any; +} | { + type: "complete"; +}; + +// @public (undocumented) +export class ObservableStream { + // (undocumented) + [Symbol.dispose](): void; + constructor(observable: Observable | Subscribable); + // (undocumented) + getCurrent(): T | undefined; + // Warning: (ae-forgotten-export) The symbol "TakeOptions" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "ObservableEvent" needs to be exported by the entry point index.d.ts + // + // (undocumented) + peek({ timeout }?: TakeOptions): Promise>; + // (undocumented) + take({ timeout }?: TakeOptions): Promise<{ + type: "error"; + error: any; + } | { + type: "complete"; + } | { + type: "next"; + value: T; + }>; + // (undocumented) + takeComplete(options?: TakeOptions): Promise; + // (undocumented) + takeError(options?: TakeOptions): Promise; + // (undocumented) + takeNext(options?: TakeOptions): Promise; + // (undocumented) + unsubscribe(): void; +} + +// @public (undocumented) +export interface PaginatedCaseData { + // Warning: (ae-forgotten-export) The symbol "Letter" needs to be exported by the entry point index.d.ts + // + // (undocumented) + letters: Letter[]; +} + +// @public (undocumented) +export interface PaginatedCaseVariables { + // (undocumented) + limit?: number; + // (undocumented) + offset?: number; +} + +// Warning: (ae-forgotten-export) The symbol "RendererableContainer" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "HydrateableContainer" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function renderAsync(ui: React.ReactNode, options: RenderOptions): Promise>; + +// @public (undocumented) +export function renderAsync(ui: React.ReactNode, options?: Omit | undefined): Promise; + +// @public (undocumented) +type RendererableContainer = ReactDOMClient.Container; + +// @public (undocumented) +type RendererableContainer_2 = ReactDOMClient.Container; + +// Warning: (ae-forgotten-export) The symbol "RendererableContainer_2" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "HydrateableContainer_2" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function renderHookAsync(renderCallback: (initialProps: Props) => Result, options?: RenderHookOptions | undefined): Promise>; + +// @public +export function resetApolloContext(): void; + +// @public (undocumented) +export function setupMaskedVariablesCase(): { + mocks: MockLink.MockedResponse>[]; + query: MaskedDocumentNode; + unmaskedQuery: TypedDocumentNode; +}; + +// @public (undocumented) +export function setupPaginatedCase(): { + query: TypedDocumentNode; + link: ApolloLink; + data: { + __typename: string; + letter: string; + position: number; + }[]; +}; + +// @public (undocumented) +export function setupSimpleCase(): { + query: TypedDocumentNode>; + mocks: MockLink.MockedResponse>[]; +}; + +// @public (undocumented) +export function setupVariablesCase(): { + mocks: MockLink.MockedResponse[]; + query: TypedDocumentNode; +}; + +// @public (undocumented) +export interface SimpleCaseData { + // (undocumented) + greeting: string; +} + +// Warning: (ae-forgotten-export) The symbol "ConsoleMethod" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type Spies = Record>; + +// Warning: (ae-forgotten-export) The symbol "Spies" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function spyOnConsole(...spyOn: Keys): Spies & Disposable; + +// @public (undocumented) +export namespace spyOnConsole { + var // (undocumented) + takeSnapshots: (...spyOn: Keys) => Spies & Disposable; +} + +// @public (undocumented) +interface TakeOptions { + // (undocumented) + timeout?: number; +} + +// @public (undocumented) +export interface VariablesCaseData { + // (undocumented) + character: { + __typename: "Character"; + id: string; + name: string; + }; +} + +// @public (undocumented) +export interface VariablesCaseVariables { + // (undocumented) + id: string; +} + +// @public (undocumented) +export function wait(ms: number): Promise; + +// @internal @deprecated (undocumented) +export function withCleanup(item: T, cleanup: (item: T) => void): T & Disposable; + +// @public (undocumented) +export function withProdMode(): { + prevDEV: boolean; +} & Disposable; + +// Warnings were encountered during analysis: +// +// src/testing/internal/scenarios/index.ts:81:7 - (ae-forgotten-export) The symbol "MaskedVariablesCaseFragment" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-testing_react.api.md b/.api-reports/api-report-testing_react.api.md new file mode 100644 index 00000000000..a01f25c4a6b --- /dev/null +++ b/.api-reports/api-report-testing_react.api.md @@ -0,0 +1,56 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloCache } from '@apollo/client/cache'; +import { ApolloClient } from '@apollo/client'; +import type { ApolloLink } from '@apollo/client/link'; +import type { LocalState } from '@apollo/client/local-state'; +import { MockLink } from '@apollo/client/testing'; +import * as React_2 from 'react'; + +// Warning: (ae-forgotten-export) The symbol "MockedProviderState" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export class MockedProvider extends React_2.Component { + constructor(props: MockedProviderProps); + // (undocumented) + componentWillUnmount(): void; + // (undocumented) + render(): React_2.JSX.Element | null; +} + +// @public (undocumented) +export interface MockedProviderProps { + // (undocumented) + cache?: ApolloCache; + // (undocumented) + childProps?: object; + // (undocumented) + children?: any; + // (undocumented) + defaultOptions?: ApolloClient.DefaultOptions; + devtools?: ApolloClient.Options["devtools"]; + // (undocumented) + link?: ApolloLink; + // (undocumented) + localState?: LocalState; + // (undocumented) + mockLinkDefaultOptions?: MockLink.DefaultOptions; + // (undocumented) + mocks?: ReadonlyArray>; + // (undocumented) + showWarnings?: boolean; +} + +// @public (undocumented) +interface MockedProviderState { + // (undocumented) + client: ApolloClient; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-utilities.api.md b/.api-reports/api-report-utilities.api.md index b5b2d4d7859..c20f64a4e47 100644 --- a/.api-reports/api-report-utilities.api.md +++ b/.api-reports/api-report-utilities.api.md @@ -4,2782 +4,192 @@ ```ts -import type { ArgumentNode } from 'graphql'; import type { ASTNode } from 'graphql'; -import type { DirectiveNode } from 'graphql'; +import { canonicalStringify } from '@apollo/client/utilities/internal'; +import { DeepOmit } from '@apollo/client/utilities/internal'; import type { DocumentNode } from 'graphql'; +import type { DocumentNode as DocumentNode_2 } from '@apollo/client'; import type { FieldNode } from 'graphql'; +import type { FieldPolicy } from '@apollo/client/cache'; import type { FormattedExecutionResult } from 'graphql'; -import type { FragmentDefinitionNode } from 'graphql'; -import type { FragmentSpreadNode } from 'graphql'; -import type { GraphQLErrorExtensions } from 'graphql'; -import { GraphQLFormattedError } from 'graphql'; -import type { InlineFragmentNode } from 'graphql'; -import type { NameNode } from 'graphql'; -import { Observable } from 'zen-observable-ts'; -import type { Subscription as ObservableSubscription } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type { OperationDefinitionNode } from 'graphql'; -import type { SelectionNode } from 'graphql'; -import type { SelectionSetNode } from 'graphql'; -import { StrongCache } from '@wry/caches'; -import type { Subscriber } from 'zen-observable-ts'; -import { Trie } from '@wry/trie'; -import { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { ValueNode } from 'graphql'; -import type { VariableDefinitionNode } from 'graphql'; -import type { VariableNode } from 'graphql'; -import { WeakCache } from '@wry/caches'; - -// @public (undocumented) -export function addNonReactiveToNamedFragments(document: DocumentNode): DocumentNode; - -// @public (undocumented) -export const addTypenameToDocument: ((doc: TNode) => TNode) & { - added(field: FieldNode): boolean; -}; - -// Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type AllFieldsModifier> = Modifier> : never>; - -// Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class ApolloCache implements DataProxy { - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; - // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(): string[]; - // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getApolloCacheMemoryInternals; - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "Unmasked" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; - // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; - // (undocumented) - abstract removeOptimistic(id: string): void; - // (undocumented) - abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - transformForLink(document: DocumentNode): DocumentNode; - // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; - // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "WatchFragmentResult" needs to be exported by the entry point index.d.ts - watchFragment(options: WatchFragmentOptions): Observable>; - // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; - // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; - // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; -} - -// @public -class ApolloClient implements DataProxy { - // (undocumented) - __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); - // Warning: (ae-forgotten-export) The symbol "GraphQLRequest" needs to be exported by the entry point index.d.ts - // - // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "Resolvers" needs to be exported by the entry point index.d.ts - // - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // Warning: (ae-forgotten-export) The symbol "ApolloCache" needs to be exported by the entry point index.d.ts - // - // (undocumented) - cache: ApolloCache; - clearStore(): Promise; - // (undocumented) - get defaultContext(): Partial; - // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; - // @deprecated (undocumented) - disableNetworkFetches: boolean; - get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; - // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts - getMemoryInternals?: typeof getApolloClientMemoryInternals; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesInclude" needs to be exported by the entry point index.d.ts - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; - // Warning: (ae-forgotten-export) The symbol "ApolloLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - // Warning: (ae-forgotten-export) The symbol "DefaultContext" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MutationOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropMutateResult" needs to be exported by the entry point index.d.ts - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; - onClearStore(cb: () => Promise): () => void; - onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; - set prioritizeCacheValues(value: boolean); - // Warning: (ae-forgotten-export) The symbol "QueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropApolloQueryResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "MaybeMasked" needs to be exported by the entry point index.d.ts - query(options: QueryOptions): Promise>>; - // (undocumented) - queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "RefetchQueriesResult" needs to be exported by the entry point index.d.ts - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; - // Warning: (ae-forgotten-export) The symbol "FragmentMatcher" needs to be exported by the entry point index.d.ts - // - // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; - stop(): void; - // Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InteropSubscribeResult" needs to be exported by the entry point index.d.ts - subscribe(options: SubscriptionOptions): Observable>>; - // Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; - // (undocumented) - version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - // Warning: (ae-forgotten-export) The symbol "WatchQueryOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ObservableQuery" needs to be exported by the entry point index.d.ts - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // Warning: (ae-forgotten-export) The symbol "UriFunction" needs to be exported by the entry point index.d.ts - // - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; -} - -// @public (undocumented) -class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // Warning: (ae-forgotten-export) The symbol "ServerParseError" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ServerError" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors?: ReadonlyArray; -} - -// @public (undocumented) -class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - static empty(): ApolloLink; - // Warning: (ae-forgotten-export) The symbol "FetchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // Warning: (ae-forgotten-export) The symbol "RequestHandler" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal - getMemoryInternals?: () => unknown; - // @internal - readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // Warning: (ae-forgotten-export) The symbol "NextLink" needs to be exported by the entry point index.d.ts - // - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal - readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // Warning: (ae-forgotten-export) The symbol "Operation" needs to be exported by the entry point index.d.ts - // - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; -} - -// @public (undocumented) -interface ApolloPayloadResult, TExtensions = Record> { - // (undocumented) - errors?: ReadonlyArray; - // Warning: (ae-forgotten-export) The symbol "SingleExecutionResult" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ExecutionPatchResult" needs to be exported by the entry point index.d.ts - // - // (undocumented) - payload: SingleExecutionResult | ExecutionPatchResult | null; -} - -// @public (undocumented) -interface ApolloQueryResult { - data: T; - // Warning: (ae-forgotten-export) The symbol "ApolloError" needs to be exported by the entry point index.d.ts - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // Warning: (ae-forgotten-export) The symbol "NetworkStatus" needs to be exported by the entry point index.d.ts - // - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} - -// @public (undocumented) -type ApolloReducerConfig = { - dataIdFromObject?: KeyFieldsFunction; - addTypename?: boolean; -}; - -// @public (undocumented) -export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; - -// @public -export type AsStoreObject = { - [K in keyof T]: T[K]; -}; - -// @public @deprecated (undocumented) -export function asyncMap(observable: Observable, mapFn: (value: V) => R | PromiseLike, catchFn?: (error: any) => R | PromiseLike): Observable; - -// @internal -export const AutoCleanedStrongCache: typeof StrongCache; - -// @internal (undocumented) -export type AutoCleanedStrongCache = StrongCache; - -// @internal -export const AutoCleanedWeakCache: typeof WeakCache; - -// @internal (undocumented) -export type AutoCleanedWeakCache = WeakCache; - -// Warning: (ae-forgotten-export) The symbol "InMemoryCache" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; - -// @public (undocumented) -export function buildQueryFromSelectionSet(document: DocumentNode): DocumentNode; - -// @public (undocumented) -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; - // (undocumented) - optimistic?: string | boolean; - // (undocumented) - removeOptimistic?: string; - // (undocumented) - update(cache: TCache): TUpdateResult; - } - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface DiffOptions extends Omit, "rootId"> { - } - // (undocumented) - interface EvictOptions { - // (undocumented) - args?: Record; - // (undocumented) - broadcast?: boolean; - // (undocumented) - fieldName?: string; - // (undocumented) - id?: string; - } - // (undocumented) - interface ModifyOptions = Record> { - // (undocumented) - broadcast?: boolean; - // Warning: (ae-forgotten-export) The symbol "Modifiers" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "AllFieldsModifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fields: Modifiers | AllFieldsModifier; - // (undocumented) - id?: string; - // (undocumented) - optimistic?: boolean; - } - // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; - // (undocumented) - optimistic: boolean; - // (undocumented) - previousResult?: any; - // (undocumented) - returnPartialData?: boolean; - // (undocumented) - rootId?: string; - } - // (undocumented) - interface ResetOptions { - // (undocumented) - discardWatches?: boolean; - } - // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WatchOptions extends DiffOptions { - // Warning: (ae-forgotten-export) The symbol "Cache_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - callback: WatchCallback; - // (undocumented) - immediate?: boolean; - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - lastDiff?: DiffResult; - // (undocumented) - watcher?: object; - } - // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { - // (undocumented) - dataId?: string; - // (undocumented) - result: Unmasked; - } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} - -// @public (undocumented) -class CacheGroup { - constructor(caching: boolean, parent?: CacheGroup | null); - // (undocumented) - readonly caching: boolean; - // (undocumented) - depend(dataId: string, storeFieldName: string): void; - // (undocumented) - dirty(dataId: string, storeFieldName: string): void; - // (undocumented) - keyMaker: Trie; - // (undocumented) - resetCaching(): void; -} - -// @public -export interface CacheSizes { - "cache.fragmentQueryDocuments": number; - "documentTransform.cache": number; - "fragmentRegistry.findFragmentSpreads": number; - "fragmentRegistry.lookup": number; - "fragmentRegistry.transform": number; - "inMemoryCache.executeSelectionSet": number; - "inMemoryCache.executeSubSelectedArray": number; - "inMemoryCache.maybeBroadcastWatch": number; - "PersistedQueryLink.persistedQueryHashes": number; - "queryManager.getDocumentInfo": number; - "removeTypenameFromVariables.getVariableDefinitions": number; - canonicalStringify: number; - parser: number; - print: number; -} - -// @public -export const cacheSizes: Partial; - -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - -// @public -export const canonicalStringify: ((value: any) => string) & { - reset(): void; -}; - -// @public (undocumented) -type CanReadFunction = (value: StoreValue) => boolean; - -// @public (undocumented) -export const canUseAsyncIteratorSymbol: false | typeof Symbol.asyncIterator; - -// @public (undocumented) -export const canUseDOM: boolean; - -// @public (undocumented) -export const canUseLayoutEffect: boolean; - -// @public (undocumented) -export const canUseSymbol: boolean; - -// @public (undocumented) -export const canUseWeakMap: boolean; - -// @public (undocumented) -export const canUseWeakSet: boolean; - -// @public (undocumented) -export function checkDocument(doc: DocumentNode): DocumentNode; - -// @public -export function cloneDeep(value: T): T; - -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; - -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// -// @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public -export function compact(...objects: TArgs): TupleToIntersection; - -// @public (undocumented) -export class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; - // (undocumented) - removeObserver(observer: Observer): void; -} - -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type ConcastSourcesArray = Array>; - -// @public (undocumented) -export type ConcastSourcesIterable = Iterable>; - -// Warning: (ae-forgotten-export) The symbol "KeyArgs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "FieldPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function concatPagination(keyArgs?: KeyArgs): FieldPolicy; - -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; - -// @public (undocumented) -export function createFragmentMap(fragments?: FragmentDefinitionNode[]): FragmentMap; - -// Warning: (ae-forgotten-export) The symbol "FulfilledPromise" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function createFulfilledPromise(value: TValue): FulfilledPromise; - -// Warning: (ae-forgotten-export) The symbol "RejectedPromise" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function createRejectedPromise(reason: unknown): RejectedPromise; - -// @public (undocumented) -interface DataMasking { -} - -// @public (undocumented) -namespace DataProxy { - // (undocumented) - type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // Warning: (ae-forgotten-export) The symbol "DataProxy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -export class DeepMerger { - constructor(reconciler?: ReconcilerFunction); - // (undocumented) - isObject: typeof isNonNullObject; - // (undocumented) - merge(target: any, source: any, ...context: TContextArgs): any; - // (undocumented) - shallowCopyForMerge(value: T): T; -} - -// Warning: (ae-forgotten-export) The symbol "DeepOmitPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepOmitArray" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type DeepOmit = T extends DeepOmitPrimitive ? T : { - [P in keyof T as P extends K ? never : P]: T[P] extends infer TP ? TP extends DeepOmitPrimitive ? TP : TP extends any[] ? DeepOmitArray : DeepOmit : never; -}; - -// @public (undocumented) -type DeepOmitArray = { - [P in keyof T]: DeepOmit; -}; - -// @public (undocumented) -type DeepOmitPrimitive = Primitive | Function; - -// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; - -// @public (undocumented) -type DeepPartialMap = {} & Map, DeepPartial>; - -// @public (undocumented) -type DeepPartialObject = { - [K in keyof T]?: DeepPartial; -}; - -// @public (undocumented) -type DeepPartialPrimitive = Primitive | Date | RegExp; - -// @public (undocumented) -type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; - -// @public (undocumented) -type DeepPartialReadonlySet = {} & ReadonlySet>; - -// @public (undocumented) -type DeepPartialSet = {} & Set>; - -// @public (undocumented) -export const enum defaultCacheSizes { - // (undocumented) - "cache.fragmentQueryDocuments" = 1000, - // (undocumented) - "documentTransform.cache" = 2000, - // (undocumented) - "fragmentRegistry.findFragmentSpreads" = 4000, - // (undocumented) - "fragmentRegistry.lookup" = 1000, - // (undocumented) - "fragmentRegistry.transform" = 2000, - // (undocumented) - "inMemoryCache.executeSelectionSet" = 50000, - // (undocumented) - "inMemoryCache.executeSubSelectedArray" = 10000, - // (undocumented) - "inMemoryCache.maybeBroadcastWatch" = 5000, - // (undocumented) - "PersistedQueryLink.persistedQueryHashes" = 2000, - // (undocumented) - "queryManager.getDocumentInfo" = 2000, - // (undocumented) - "removeTypenameFromVariables.getVariableDefinitions" = 2000, - // (undocumented) - canonicalStringify = 1000, - // (undocumented) - parser = 1000, - // (undocumented) - print = 2000 -} - -// @public (undocumented) -interface DefaultContext extends Record { -} - -// @public (undocumented) -interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} - -// @public (undocumented) -interface DeleteModifier { - // (undocumented) - [_deleteModifier]: true; -} - -// @public (undocumented) -const _deleteModifier: unique symbol; - -// @public @deprecated (undocumented) -export const DEV: boolean; - -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} - -// @public (undocumented) -export type DirectiveInfo = { - [fieldName: string]: { - [argName: string]: any; - }; -}; - -// @public (undocumented) -export type Directives = { - [directiveName: string]: { - [argName: string]: any; - }; -}; - -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - -// @public (undocumented) -export class DocumentTransform { - // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts - constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) - concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) - static identity(): DocumentTransform; - // @internal - readonly left?: DocumentTransform; - resetCache(): void; - // @internal - readonly right?: DocumentTransform; - // (undocumented) - static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { - left: DocumentTransform; - right: DocumentTransform; - }; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; -} - -// @public (undocumented) -export type DocumentTransformCacheKey = ReadonlyArray; - -// @public (undocumented) -interface DocumentTransformOptions { - cache?: boolean; - getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "NormalizedCache" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -abstract class EntityStore implements NormalizedCache { - constructor(policies: Policies, group: CacheGroup); - // Warning: (ae-forgotten-export) The symbol "Layer" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // Warning: (ae-forgotten-export) The symbol "CanReadFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // Warning: (ae-forgotten-export) The symbol "NormalizedCacheObject" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected data: NormalizedCacheObject; - // (undocumented) - delete(dataId: string, fieldName?: string, args?: Record): boolean; - // (undocumented) - evict(options: Cache_2.EvictOptions, limit: EntityStore): boolean; - // (undocumented) - extract(): NormalizedCacheObject; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - gc(): string[]; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "SafeReadonly" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: (objectOrReference: StoreObject | Reference | undefined, storeFieldName: string) => SafeReadonly; - // (undocumented) - getRootIdSet(ids?: Set): Set; - // Warning: (ae-forgotten-export) The symbol "StorageType" needs to be exported by the entry point index.d.ts - // - // (undocumented) - abstract getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // Warning: (ae-forgotten-export) The symbol "CacheGroup" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; - makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; - makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; - // @deprecated (undocumented) - makeCacheKey(...args: any[]): object; - // (undocumented) - merge(older: string | StoreObject, newer: StoreObject | string): void; - // (undocumented) - modify(dataId: string, fields: Modifier | Modifiers>): boolean; - // Warning: (ae-forgotten-export) The symbol "Policies" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly policies: Policies; - // (undocumented) - release(rootId: string): number; - // (undocumented) - abstract removeLayer(layerId: string): EntityStore; - // (undocumented) - replace(newData: NormalizedCacheObject | null): void; - // (undocumented) - retain(rootId: string): number; - // (undocumented) - toObject(): NormalizedCacheObject; - // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - toReference: ToReferenceFunction; -} - -// @public (undocumented) -namespace EntityStore { - // (undocumented) - class Root extends EntityStore { - constructor({ policies, resultCaching, seed, }: { - policies: Policies; - resultCaching?: boolean; - seed?: NormalizedCacheObject; - }); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - removeLayer(): Root; - // (undocumented) - readonly storageTrie: Trie; - // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly stump: Stump; - } -} - -// @public -type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // Warning: (ae-forgotten-export) The symbol "IncrementalPayload" needs to be exported by the entry point index.d.ts - // - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - incremental?: never; -} - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; - -// @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; - -// @public (undocumented) -interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - -// @public -type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; - -// @public (undocumented) -type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; - -// @public (undocumented) -interface FieldFunctionOptions, TVars = Record> { - // (undocumented) - args: TArgs | null; - // (undocumented) - cache: InMemoryCache; - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - field: FieldNode | null; - // (undocumented) - fieldName: string; - // (undocumented) - isReference: typeof isReference; - // Warning: (ae-forgotten-export) The symbol "MergeObjectsFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - mergeObjects: MergeObjectsFunction; - // Warning: (ae-forgotten-export) The symbol "ReadFieldFunction" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField: ReadFieldFunction; - // (undocumented) - storage: StorageType; - // (undocumented) - storeFieldName: string; - // (undocumented) - toReference: ToReferenceFunction; - // (undocumented) - variables?: TVars; -} - -// Warning: (ae-forgotten-export) The symbol "FieldFunctionOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FieldMergeFunction = (existing: SafeReadonly | undefined, incoming: SafeReadonly, options: TOptions) => SafeReadonly; - -// @public (undocumented) -type FieldPolicy = { - keyArgs?: KeySpecifier | KeyArgsFunction | false; - read?: FieldReadFunction; - merge?: FieldMergeFunction | boolean; -}; - -// @public (undocumented) -type FieldReadFunction = (existing: SafeReadonly | undefined, options: TOptions) => TReadResult | undefined; - -// @public (undocumented) -interface FieldSpecifier { - // (undocumented) - args?: Record; - // (undocumented) - field?: FieldNode; - // (undocumented) - fieldName: string; - // (undocumented) - typename?: string; - // (undocumented) - variables?: Record; -} - -// Warning: (ae-forgotten-export) The symbol "EntityStore" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FieldValueGetter = EntityStore["getFieldValue"]; - -// @public (undocumented) -export function fixObservableSubclass Observable>(subclass: S): S; - -// Warning: (ae-forgotten-export) The symbol "WriteContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type FlavorableWriteContext = Pick; - -// @public -export interface FragmentMap { - // (undocumented) - [fragmentName: string]: FragmentDefinitionNode; -} - -// @public (undocumented) -export type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; - -// @public (undocumented) -type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - -// @public (undocumented) -interface FragmentRegistryAPI { - // (undocumented) - lookup(fragmentName: string): FragmentDefinitionNode | null; - // (undocumented) - register(...fragments: DocumentNode[]): this; - // (undocumented) - resetCaches(): void; - // (undocumented) - transform(document: D): D; -} - -// @public (undocumented) -type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @public (undocumented) -interface FulfilledPromise extends Promise { - // (undocumented) - status: "fulfilled"; - // (undocumented) - value: TValue; -} - -// @internal -const getApolloCacheMemoryInternals: (() => { - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @internal -const getApolloClientMemoryInternals: (() => { - limits: { - [k: string]: number; - }; - sizes: { - cache?: { - fragmentQueryDocuments: number | undefined; - } | undefined; - addTypenameDocumentTransform?: { - cache: number; - }[] | undefined; - inMemoryCache?: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - } | undefined; - fragmentRegistry?: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - } | undefined; - print: number | undefined; - parser: number | undefined; - canonicalStringify: number | undefined; - links: unknown[]; - queryManager: { - getDocumentInfo: number; - documentTransforms: { - cache: number; - }[]; - }; - }; -}) | undefined; - -// @public (undocumented) -export function getDefaultValues(definition: OperationDefinitionNode | undefined): Record; - -// @public (undocumented) -export type GetDirectiveConfig = GetNodeConfig; - -// @public (undocumented) -export function getDirectiveNames(root: ASTNode): string[]; - -// @public (undocumented) -export function getFragmentDefinition(doc: DocumentNode): FragmentDefinitionNode; - -// @public (undocumented) -export function getFragmentDefinitions(doc: DocumentNode): FragmentDefinitionNode[]; - -// @public (undocumented) -export function getFragmentFromSelection(selection: SelectionNode, fragmentMap?: FragmentMap | FragmentMapFunction): InlineFragmentNode | FragmentDefinitionNode | null; - -// @internal (undocumented) -export function getFragmentMaskMode(fragment: FragmentSpreadNode): "mask" | "migrate" | "unmask"; - -// @public -export function getFragmentQueryDocument(document: DocumentNode, fragmentName?: string): DocumentNode; - -// @public (undocumented) -export type GetFragmentSpreadConfig = GetNodeConfig; - -// @public (undocumented) -export function getGraphQLErrorsFromResult(result: FetchResult): GraphQLFormattedError[]; - -// @public (undocumented) -export function getInclusionDirectives(directives: ReadonlyArray): InclusionDirectives; - -// @internal -const getInMemoryCacheMemoryInternals: (() => { - addTypenameDocumentTransform: { - cache: number; - }[]; - inMemoryCache: { - executeSelectionSet: number | undefined; - executeSubSelectedArray: number | undefined; - maybeBroadcastWatch: number | undefined; - }; - fragmentRegistry: { - findFragmentSpreads: number | undefined; - lookup: number | undefined; - transform: number | undefined; - }; - cache: { - fragmentQueryDocuments: number | undefined; - }; -}) | undefined; - -// @public -export function getMainDefinition(queryDoc: DocumentNode): OperationDefinitionNode | FragmentDefinitionNode; - -// @public (undocumented) -export type GetNodeConfig = { - name?: string; - test?: (node: N) => boolean; -}; - -// @public (undocumented) -export function getOperationDefinition(doc: DocumentNode): OperationDefinitionNode | undefined; - -// @public (undocumented) -export function getOperationName(doc: DocumentNode): string | null; - -// @public (undocumented) -export function getQueryDefinition(doc: DocumentNode): OperationDefinitionNode; - -// @public (undocumented) -export const getStoreKeyName: ((fieldName: string, args?: Record | null, directives?: Directives) => string) & { - setStringify(s: typeof storeKeyNameStringify): (value: any) => string; -}; - -// @public (undocumented) -export function getTypenameFromResult(result: Record, selectionSet: SelectionSetNode, fragmentMap?: FragmentMap): string | undefined; - -// @public (undocumented) -interface GraphQLRequest> { - // (undocumented) - context?: DefaultContext; - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -export function graphQLResultHasError(result: FetchResult): boolean; - -// @public (undocumented) -export const hasAllDirectives: (names: string[], root: ASTNode) => boolean; - -// @public (undocumented) -export const hasAnyDirectives: (names: string[], root: ASTNode) => boolean; - -// @public (undocumented) -export function hasClientExports(document: DocumentNode): boolean; - -// @public (undocumented) -export function hasDirectives(names: string[], root: ASTNode, all?: boolean): boolean; - -// Warning: (ae-forgotten-export) The symbol "IdGetterObj" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IdGetter = (value: IdGetterObj) => string | undefined; - -// @public (undocumented) -interface IdGetterObj extends Object { - // (undocumented) - __typename?: string; - // (undocumented) - id?: string; - // (undocumented) - _id?: string; -} - -// @public (undocumented) -interface IgnoreModifier { - // (undocumented) - [_ignoreModifier]: true; -} - -// @public (undocumented) -const _ignoreModifier: unique symbol; - -// @public (undocumented) -export type InclusionDirectives = Array<{ - directive: DirectiveNode; - ifArgument: ArgumentNode; -}>; - -// @public @deprecated (undocumented) -interface IncrementalPayload { - // (undocumented) - data: TData | null; - // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // Warning: (ae-forgotten-export) The symbol "Path" needs to be exported by the entry point index.d.ts - // - // (undocumented) - path: Path; -} - -// @public (undocumented) -class InMemoryCache extends ApolloCache { - constructor(config?: InMemoryCacheConfig); - // (undocumented) - readonly assumeImmutableResults = true; - // (undocumented) - batch(options: Cache_2.BatchOptions): TUpdateResult; - // Warning: (ae-forgotten-export) The symbol "BroadcastOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected broadcastWatches(options?: BroadcastOptions): void; - // Warning: (ae-forgotten-export) The symbol "InMemoryCacheConfig" needs to be exported by the entry point index.d.ts - // - // (undocumented) - protected config: InMemoryCacheConfig; - // (undocumented) - diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; - // (undocumented) - evict(options: Cache_2.EvictOptions): boolean; - // (undocumented) - extract(optimistic?: boolean): NormalizedCacheObject; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode, typename: string): boolean; - // (undocumented) - gc(options?: { - resetResultCache?: boolean; - resetResultIdentities?: boolean; - }): string[]; - // Warning: (ae-forgotten-export) The symbol "getInMemoryCacheMemoryInternals" needs to be exported by the entry point index.d.ts - // - // @internal - getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; - // (undocumented) - identify(object: StoreObject | Reference): string | undefined; - // (undocumented) - lookupFragment(fragmentName: string): FragmentDefinitionNode | null; - // Warning: (ae-forgotten-export) The symbol "makeVar" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly makeVar: typeof makeVar; - // (undocumented) - modify = Record>(options: Cache_2.ModifyOptions): boolean; - // (undocumented) - performTransaction(update: (cache: InMemoryCache) => any, optimisticId?: string | null): any; - // (undocumented) - readonly policies: Policies; - // (undocumented) - read(options: Cache_2.ReadOptions): T | null; - // (undocumented) - release(rootId: string, optimistic?: boolean): number; - // (undocumented) - removeOptimistic(idToRemove: string): void; - // (undocumented) - reset(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - restore(data: NormalizedCacheObject): this; - // (undocumented) - retain(rootId: string, optimistic?: boolean): number; - // (undocumented) - transformDocument(document: DocumentNode): DocumentNode; - // (undocumented) - watch(watch: Cache_2.WatchOptions): () => void; - // (undocumented) - write(options: Cache_2.WriteOptions): Reference | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloReducerConfig" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface InMemoryCacheConfig extends ApolloReducerConfig { - // @deprecated - canonizeResults?: boolean; - // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fragments?: FragmentRegistryAPI; - // Warning: (ae-forgotten-export) The symbol "PossibleTypesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - possibleTypes?: PossibleTypesMap; - // @deprecated (undocumented) - resultCacheMaxSize?: number; - // (undocumented) - resultCaching?: boolean; - // Warning: (ae-forgotten-export) The symbol "TypePolicies" needs to be exported by the entry point index.d.ts - // - // (undocumented) - typePolicies?: TypePolicies; -} - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesIncludeShorthand" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; - -// @public (undocumented) -interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesInclude" needs to be exported by the entry point index.d.ts - // - // (undocumented) - include?: InternalRefetchQueriesInclude; - // (undocumented) - removeOptimistic?: string; -} - -// @public (undocumented) -type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; - -// Warning: (ae-forgotten-export) The symbol "RefetchQueryDescriptor" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchInitialResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropMutationExecutionPatchIncrementalResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InteropExecutionPatchResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; -} - -// @public @deprecated (undocumented) -type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public (undocumented) -interface InvalidateModifier { - // (undocumented) - [_invalidateModifier]: true; -} - -// @public (undocumented) -const _invalidateModifier: unique symbol; - -// @public (undocumented) -type IsAny = 0 extends 1 & T ? true : false; - -// Warning: (ae-forgotten-export) The symbol "ApolloPayloadResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function isApolloPayloadResult(value: unknown): value is ApolloPayloadResult; - -// @public (undocumented) -export const isArray: (a: any) => a is any[] | readonly any[]; - -// @public (undocumented) -export function isDocumentNode(value: any): value is DocumentNode; - -// @public (undocumented) -export function isExecutionPatchIncrementalResult(value: FetchResult): value is ExecutionPatchIncrementalResult; - -// @public (undocumented) -export function isExecutionPatchInitialResult(value: FetchResult): value is ExecutionPatchInitialResult; - -// @public (undocumented) -export function isExecutionPatchResult(value: FetchResult): value is ExecutionPatchResult; - -// @public (undocumented) -export function isField(selection: SelectionNode): selection is FieldNode; - -// @public (undocumented) -export function isFullyUnmaskedOperation(document: DocumentNode): boolean; - -// @public (undocumented) -export function isInlineFragment(selection: SelectionNode): selection is InlineFragmentNode; - -// @public (undocumented) -export function isMutationOperation(document: DocumentNode): boolean; - -// @public (undocumented) -export function isNonEmptyArray(value?: ArrayLike): value is Array; - -// @public (undocumented) -export function isNonNullObject(obj: any): obj is Record; - -// @public (undocumented) -export function isPlainObject(obj: any): obj is Record; - -// @public (undocumented) -export function isQueryOperation(document: DocumentNode): boolean; - -// @public (undocumented) -export function isReference(obj: any): obj is Reference; - -// @public (undocumented) -export function isStatefulPromise(promise: Promise): promise is PromiseWithState; - -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection_2" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type IsStrictlyAny = UnionToIntersection_2> extends never ? true : false; - -// @public (undocumented) -export function isSubscriptionOperation(document: DocumentNode): boolean; - -// @public @deprecated (undocumented) -export function iterateObserversSafely(observers: Set>, method: keyof Observer, argument?: A): void; - -// @public (undocumented) -type KeyArgs = FieldPolicy["keyArgs"]; - -// Warning: (ae-forgotten-export) The symbol "IdGetter" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type KeyArgsFunction = (args: Record | null, context: { - typename: string; - fieldName: string; - field: FieldNode | null; - variables?: Record; -}) => KeySpecifier | false | ReturnType; - -// @public (undocumented) -type KeyFieldsContext = { - typename: string | undefined; - storeObject: StoreObject; - readField: ReadFieldFunction; - selectionSet?: SelectionSetNode; - fragmentMap?: FragmentMap; - keyObject?: Record; -}; - -// Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type KeyFieldsFunction = (object: Readonly, context: KeyFieldsContext) => KeySpecifier | false | ReturnType; - -// @public (undocumented) -type KeySpecifier = ReadonlyArray; - -// @public (undocumented) -class Layer extends EntityStore { - constructor(id: string, parent: EntityStore, replay: (layer: EntityStore) => any, group: CacheGroup); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - findChildRefIds(dataId: string): Record; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - readonly group: CacheGroup; - // (undocumented) - readonly id: string; - // (undocumented) - readonly parent: EntityStore; - // (undocumented) - removeLayer(layerId: string): EntityStore; - // (undocumented) - readonly replay: (layer: EntityStore) => any; - // (undocumented) - toObject(): NormalizedCacheObject; -} - -// @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; - // (undocumented) - getResolvers(): Resolvers; - // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; - // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; - onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; -} - -// @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; - -// @public (undocumented) -export function makeReference(id: string): Reference; - -// @public (undocumented) -export function makeUniqueId(prefix: string): string; - -// Warning: (ae-forgotten-export) The symbol "ReactiveVar" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -function makeVar(value: T): ReactiveVar; - -// @public (undocumented) -interface MaskFragmentOptions { - // (undocumented) - data: TData; - // (undocumented) - fragment: DocumentNode; - // (undocumented) - fragmentName?: string; -} - -// @public (undocumented) -interface MaskOperationOptions { - // (undocumented) - data: TData; - // (undocumented) - document: DocumentNode; - // Warning: (ae-forgotten-export) The symbol "WatchQueryFetchPolicy" needs to be exported by the entry point index.d.ts - // - // (undocumented) - fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; -} - -// @public (undocumented) -export function maybe(thunk: () => T): T | undefined; - -// @public (undocumented) -type MaybeAsync = T | PromiseLike; - -// @public (undocumented) -export function maybeDeepFreeze(obj: T): T; - -// Warning: (ae-forgotten-export) The symbol "DataMasking" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts -// -// @public -type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; - -// @public (undocumented) -export function mergeDeep(...sources: T): TupleToIntersection; - -// @public (undocumented) -export function mergeDeepArray(sources: T[]): T; - -// @public (undocumented) -export function mergeIncrementalData(prevResult: TData, result: ExecutionPatchResult): TData; - -// @public (undocumented) -interface MergeInfo { - // (undocumented) - field: FieldNode; - // (undocumented) - merge: FieldMergeFunction; - // (undocumented) - typename: string | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - -// @public (undocumented) -type MergeObjectsFunction = (existing: T, incoming: T) => T; - -// Warning: (ae-forgotten-export) The symbol "OptionsUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function mergeOptions>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial | undefined, options: TOptions | Partial): TOptions & TDefaultOptions; - -// @public (undocumented) -interface MergeTree { - // Warning: (ae-forgotten-export) The symbol "MergeInfo" needs to be exported by the entry point index.d.ts - // - // (undocumented) - info?: MergeInfo; - // (undocumented) - map: Map; -} - -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -class MissingFieldError extends Error { - constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); - // (undocumented) - readonly message: string; - // (undocumented) - readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly path: MissingTree | Array; - // (undocumented) - readonly query: DocumentNode; - // (undocumented) - readonly variables?: Record | undefined; -} - -// @public (undocumented) -type MissingTree = string | { - readonly [key: string]: MissingTree; -}; - -// Warning: (ae-forgotten-export) The symbol "ModifierDetails" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "DeleteModifier" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type Modifier = (value: T, details: ModifierDetails) => DeepPartial | DeleteModifier | InvalidateModifier | undefined; - -// @public (undocumented) -type ModifierDetails = { - DELETE: DeleteModifier; - INVALIDATE: InvalidateModifier; - fieldName: string; - storeFieldName: string; - readField: ReadFieldFunction; - canRead: CanReadFunction; - isReference: typeof isReference; - toReference: ToReferenceFunction; - storage: StorageType; -}; - -// @public (undocumented) -type Modifiers = Record> = Partial<{ - [FieldName in keyof T]: Modifier>>; -}>; - -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - // Warning: (ae-forgotten-export) The symbol "ErrorPolicy" needs to be exported by the entry point index.d.ts - errorPolicy?: ErrorPolicy; - // Warning: (ae-forgotten-export) The symbol "OnQueryUpdated" needs to be exported by the entry point index.d.ts - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - // Warning: (ae-forgotten-export) The symbol "MutationUpdaterFunction" needs to be exported by the entry point index.d.ts - update?: MutationUpdaterFunction; - // Warning: (ae-forgotten-export) The symbol "MutationQueryReducersMap" needs to be exported by the entry point index.d.ts - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// Warning: (ae-forgotten-export) The symbol "FetchPolicy" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MutationFetchPolicy = Extract; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; - queryName: string | undefined; - queryVariables: Record; -}) => Record; - -// @public (undocumented) -type MutationQueryReducersMap = { - [queryName: string]: MutationQueryReducer; -}; - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - // Warning: (ae-forgotten-export) The symbol "MutationFetchPolicy" needs to be exported by the entry point index.d.ts - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - -// @public (undocumented) -interface MutationStoreValue { - // (undocumented) - error: Error | null; - // (undocumented) - loading: boolean; - // (undocumented) - mutation: DocumentNode; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; - variables?: TVariables; -}) => void; - -// @public -enum NetworkStatus { - error = 8, - fetchMore = 3, - loading = 1, - poll = 6, - ready = 7, - refetch = 4, - setVariables = 2 -} - -// @public (undocumented) -interface NextFetchPolicyContext { - // (undocumented) - initialFetchPolicy: WatchQueryFetchPolicy; - // (undocumented) - observable: ObservableQuery; - // (undocumented) - options: WatchQueryOptions; - // (undocumented) - reason: "after-fetch" | "variables-changed"; -} - -// @public (undocumented) -type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public -type NoInfer_2 = [T][T extends any ? 0 : never]; -export { NoInfer_2 as NoInfer } - -// @public -interface NormalizedCache { - // (undocumented) - canRead: CanReadFunction; - // (undocumented) - clear(): void; - // (undocumented) - delete(dataId: string, fieldName?: string): boolean; - // (undocumented) - get(dataId: string, fieldName: string): StoreValue; - // Warning: (ae-forgotten-export) The symbol "FieldValueGetter" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getFieldValue: FieldValueGetter; - // (undocumented) - getStorage(idOrObj: string | StoreObject, ...storeFieldNames: (string | number)[]): StorageType; - // (undocumented) - has(dataId: string): boolean; - // (undocumented) - merge(olderId: string, newerObject: StoreObject): void; - // (undocumented) - merge(olderObject: StoreObject, newerId: string): void; - // (undocumented) - modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; - // (undocumented) - release(rootId: string): number; - replace(newData: NormalizedCacheObject): void; - retain(rootId: string): number; - toObject(): NormalizedCacheObject; - // (undocumented) - toReference: ToReferenceFunction; -} - -// @public -interface NormalizedCacheObject { - // (undocumented) - [dataId: string]: StoreObject | undefined; - // (undocumented) - __META?: { - extraRootIds: string[]; - }; -} - -export { Observable } - -// Warning: (ae-forgotten-export) The symbol "ApolloQueryResult" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - // Warning: (ae-forgotten-export) The symbol "FetchMoreQueryOptions" needs to be exported by the entry point index.d.ts - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; - // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; - // (undocumented) - hasObservers(): boolean; - // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; - // (undocumented) - readonly options: WatchQueryOptions; - // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; - // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; - // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): ObservableSubscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): ObservableSubscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreOptions" needs to be exported by the entry point index.d.ts - subscribeToMore(options: SubscribeToMoreOptions): () => void; - // Warning: (ae-forgotten-export) The symbol "UpdateQueryMapFn" needs to be exported by the entry point index.d.ts - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; -} - -export { ObservableSubscription } - -export { Observer } - -// @public (undocumented) -export function offsetLimitPagination(keyArgs?: KeyArgs): FieldPolicy; - -// @public (undocumented) -export function omitDeep(value: T, key: K): DeepOmit; - -// @public -export type OnlyRequiredProperties = { - [K in keyof T as {} extends Pick ? never : K]: T[K]; -}; - -// @public (undocumented) -type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -interface Operation { - // (undocumented) - extensions: Record; - // (undocumented) - getContext: () => DefaultContext; - // (undocumented) - operationName: string; - // (undocumented) - query: DocumentNode; - // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; - // (undocumented) - variables: Record; -} - -// @public (undocumented) -type OperationVariables = Record; - -// @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; - -// @public @deprecated (undocumented) -type Path = ReadonlyArray; - -// @public (undocumented) -interface PendingPromise extends Promise { - // (undocumented) - status: "pending"; -} - -// @public (undocumented) -class Policies { - constructor(config: { - cache: InMemoryCache; - dataIdFromObject?: KeyFieldsFunction; - possibleTypes?: PossibleTypesMap; - typePolicies?: TypePolicies; - }); - // (undocumented) - addPossibleTypes(possibleTypes: PossibleTypesMap): void; - // (undocumented) - addTypePolicies(typePolicies: TypePolicies): void; - // (undocumented) - readonly cache: InMemoryCache; - // (undocumented) - fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string | undefined, result?: Record, variables?: Record): boolean; - // (undocumented) - getMergeFunction(parentTypename: string | undefined, fieldName: string, childTypename: string | undefined): FieldMergeFunction | undefined; - // (undocumented) - getReadFunction(typename: string | undefined, fieldName: string): FieldReadFunction | undefined; - // Warning: (ae-forgotten-export) The symbol "FieldSpecifier" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getStoreFieldName(fieldSpec: FieldSpecifier): string; - // (undocumented) - hasKeyArgs(typename: string | undefined, fieldName: string): boolean; - // (undocumented) - identify(object: StoreObject, partialContext?: Partial): [string?, StoreObject?]; - // Warning: (ae-forgotten-export) The symbol "ReadFieldOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ReadMergeModifyContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readField(options: ReadFieldOptions, context: ReadMergeModifyContext): SafeReadonly | undefined; - // (undocumented) - readonly rootIdsByTypename: Record; - // (undocumented) - readonly rootTypenamesById: Record; - // (undocumented) - runMergeFunction(existing: StoreValue, incoming: StoreValue, { field, typename, merge }: MergeInfo, context: WriteContext, storage?: StorageType): any; - // (undocumented) - readonly usingPossibleTypes = false; -} - -// @public (undocumented) -type PossibleTypesMap = { - [supertype: string]: string[]; -}; - -// @public (undocumented) -export type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -export function preventUnhandledRejection(promise: Promise): Promise; - -// @public (undocumented) -export type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const print_2: ((ast: ASTNode) => string) & { - reset(): void; -}; -export { print_2 as print } - -// Warning: (ae-forgotten-export) The symbol "PendingPromise" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type PromiseWithState = PendingPromise | FulfilledPromise | RejectedPromise; - -// @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; - // (undocumented) - markError(error: ApolloError): ApolloError; - // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; - // (undocumented) - stop(): void; - // (undocumented) - stopped: boolean; - // (undocumented) - variables?: Record; -} - -// @public (undocumented) -class QueryManager { - // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); - // (undocumented) - readonly assumeImmutableResults: boolean; - // (undocumented) - broadcastQueries(): void; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clearStore(options?: Cache_2.ResetOptions): Promise; - // (undocumented) - readonly dataMasking: boolean; - // (undocumented) - readonly defaultContext: Partial; - // Warning: (ae-forgotten-export) The symbol "DefaultOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - readonly documentTransform: DocumentTransform; - // (undocumented) - protected fetchCancelFns: Map any>; - // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; - // (undocumented) - generateQueryId(): string; - // (undocumented) - generateRequestId(): number; - // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getDocumentInfo(document: DocumentNode): TransformCacheEntry; - // (undocumented) - getLocalState(): LocalState; - // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // - // (undocumented) - getQueryStore(): Record; - // (undocumented) - protected inFlightLinkObservables: Trie<{ - observable?: Observable>; - }>; - // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; - // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; - // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskFragment(options: MaskFragmentOptions): TData; - // Warning: (ae-forgotten-export) The symbol "MaskOperationOptions" needs to be exported by the entry point index.d.ts - // - // (undocumented) - maskOperation(options: MaskOperationOptions): MaybeMasked; - // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; - // (undocumented) - mutationStore?: { - [mutationId: string]: MutationStoreValue; - }; - // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; - // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesOptions" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InternalRefetchQueriesMap" needs to be exported by the entry point index.d.ts - // - // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; - // (undocumented) - readonly ssrMode: boolean; - // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; - stop(): void; - // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) - transform(document: DocumentNode): DocumentNode; - // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; -} - -// @public (undocumented) -interface QueryManagerOptions { - // (undocumented) - assumeImmutableResults: boolean; - // (undocumented) - cache: ApolloCache; - // (undocumented) - clientAwareness: Record; - // (undocumented) - dataMasking: boolean; - // (undocumented) - defaultContext: Partial | undefined; - // (undocumented) - defaultOptions: DefaultOptions; - // (undocumented) - documentTransform: DocumentTransform | null | undefined; - // (undocumented) - link: ApolloLink; - // (undocumented) - localState: LocalState; - // (undocumented) - onBroadcast: undefined | (() => void); - // (undocumented) - queryDeduplication: boolean; - // (undocumented) - ssrMode: boolean; -} +import { getMainDefinition } from '@apollo/client/utilities/internal'; +import { Observable } from 'rxjs'; +import type { Primitive } from '@apollo/client/utilities/internal'; +import type { Reference as Reference_2 } from '@apollo/client/cache'; // @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} - -// @public (undocumented) -type QueryStoreValue = Pick; - -// @public (undocumented) -type ReactiveListener = (value: T) => any; - -// @public (undocumented) -interface ReactiveVar { - // (undocumented) - (newValue?: T): T; - // (undocumented) - attachCache(cache: ApolloCache): this; - // (undocumented) - forgetCache(cache: ApolloCache): boolean; - // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts - // - // (undocumented) - onNextChange(listener: ReactiveListener): () => void; -} - -// @public (undocumented) -interface ReadFieldFunction { - // (undocumented) - (options: ReadFieldOptions): SafeReadonly | undefined; - // (undocumented) - (fieldName: string, from?: StoreObject | Reference): SafeReadonly | undefined; -} - -// @public (undocumented) -interface ReadFieldOptions extends FieldSpecifier { - // (undocumented) - from?: StoreObject | Reference; -} - -// @public (undocumented) -interface ReadMergeModifyContext { - // (undocumented) - store: NormalizedCache; - // (undocumented) - variables?: Record; - // (undocumented) - varString?: string; -} - -// @public (undocumented) -export type ReconcilerFunction = (this: DeepMerger, target: Record, source: Record, property: string | number, ...context: TContextArgs) => any; - -// @public (undocumented) -export interface Reference { - // (undocumented) - readonly __ref: string; -} - -// @public (undocumented) -type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; - -// @public (undocumented) -type RefetchQueriesIncludeShorthand = "all" | "active"; - -// @public (undocumented) -interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} +export const addTypenameToDocument: ((doc: TNode) => TNode) & { + added(field: FieldNode): boolean; +}; -// @public (undocumented) -type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; +// @public +export type AsStoreObject = { + [K in keyof T]: T[K]; +}; -// Warning: (ae-forgotten-export) The symbol "RefetchQueriesPromiseResults" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; +// @public +export interface CacheSizes { + "cache.fragmentQueryDocuments": number; + "documentTransform.cache": number; + "fragmentRegistry.findFragmentSpreads": number; + "fragmentRegistry.lookup": number; + "fragmentRegistry.transform": number; + "inMemoryCache.executeSelectionSet": number; + "inMemoryCache.executeSubSelectedArray": number; + "inMemoryCache.maybeBroadcastWatch": number; + "PersistedQueryLink.persistedQueryHashes": number; + "queryManager.getDocumentInfo": number; + "removeTypenameFromVariables.getVariableDefinitions": number; + canonicalStringify: number; + checkDocument: number; + print: number; } -// @public (undocumented) -type RefetchQueryDescriptor = string | DocumentNode; - -// @public (undocumented) -type RefetchWritePolicy = "merge" | "overwrite"; +// @public +export const cacheSizes: Partial; -// @public (undocumented) -interface RejectedPromise extends Promise { - // (undocumented) - reason: unknown; - // (undocumented) - status: "rejected"; -} +export { canonicalStringify } -// Warning: (ae-forgotten-export) The symbol "TExistingRelay" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "TIncomingRelay" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "KeyArgs" needs to be exported by the entry point index.d.ts // -// @public (undocumented) -type RelayFieldPolicy = FieldPolicy | null, TIncomingRelay | null, TIncomingRelay | null>; +// @public +export function concatPagination(keyArgs?: KeyArgs): FieldPolicy; -// Warning: (ae-forgotten-export) The symbol "RelayFieldPolicy" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialMap" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlyMap" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialSet" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // -// @public (undocumented) -export function relayStylePagination(keyArgs?: KeyArgs): RelayFieldPolicy; - -// @public (undocumented) -export type RemoveArgumentsConfig = RemoveNodeConfig; - -// @public (undocumented) -export function removeArgumentsFromDocument(config: RemoveArgumentsConfig[], doc: DocumentNode): DocumentNode | null; - -// @public (undocumented) -export function removeClientSetsFromDocument(document: DocumentNode): DocumentNode | null; - -// @public (undocumented) -export function removeConnectionDirectiveFromDocument(doc: DocumentNode): DocumentNode | null; - -// @public (undocumented) -export type RemoveDirectiveConfig = RemoveNodeConfig; - -// @public (undocumented) -export function removeDirectivesFromDocument(directives: RemoveDirectiveConfig[], doc: DocumentNode): DocumentNode | null; - -// @public (undocumented) -export type RemoveFragmentDefinitionConfig = RemoveNodeConfig; - -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) -export type RemoveFragmentSpreadConfig = RemoveNodeConfig; +// @public +export type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // @public (undocumented) -export function removeFragmentSpreadFromDocument(config: RemoveFragmentSpreadConfig[], doc: DocumentNode): DocumentNode | null; +type DeepPartialMap = {} & Map, DeepPartial>; // @public (undocumented) -export type RemoveIndexSignature = { - [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; +type DeepPartialObject = { + [K in keyof T]?: DeepPartial; }; // @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -export type RemoveNodeConfig = { - name?: string; - test?: (node: N) => boolean; - remove?: boolean; -}; +type DeepPartialPrimitive = Primitive | Date | RegExp; // @public (undocumented) -export type RemoveVariableDefinitionConfig = RemoveNodeConfig; +type DeepPartialReadonlyMap = {} & ReadonlyMap, DeepPartial>; // @public (undocumented) -type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; +type DeepPartialReadonlySet = {} & ReadonlySet>; // @public (undocumented) -type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; +type DeepPartialSet = {} & Set>; -// @public (undocumented) -interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; +// @public +export class DocumentTransform { + // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts + constructor(transform: TransformFn, options?: DocumentTransformOptions); + concat(otherTransform: DocumentTransform): DocumentTransform; + static identity(): DocumentTransform; + // @internal @deprecated + readonly left?: DocumentTransform; + resetCache(): void; + // @internal @deprecated + readonly right?: DocumentTransform; + static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { + left: DocumentTransform; + right: DocumentTransform; }; + transformDocument(document: DocumentNode): DocumentNode; } // @public (undocumented) -export function resultKeyNameFromField(field: FieldNode): string; - -// @public (undocumented) -type SafeReadonly = T extends object ? Readonly : T; - -// @public (undocumented) -type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; +export type DocumentTransformCacheKey = ReadonlyArray; // @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - // Warning: (ae-forgotten-export) The symbol "RefetchWritePolicy" needs to be exported by the entry point index.d.ts - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; +interface DocumentTransformOptions { + cache?: boolean; + getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) -export function shouldInclude({ directives }: SelectionNode, variables?: Record): boolean; +export { getMainDefinition } -// @public (undocumented) -interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { +// @beta +export interface HKT { // (undocumented) - context?: TContext; + arg1: unknown; // (undocumented) - data?: TData | null; + arg2: unknown; // (undocumented) - errors?: ReadonlyArray; + arg3: unknown; // (undocumented) - extensions?: TExtensions; + arg4: unknown; + // (undocumented) + return: unknown; } -// @public (undocumented) -type Source = MaybeAsync>; +// @public +export function isFormattedExecutionResult(result?: object): result is FormattedExecutionResult; -// @public (undocumented) -type StorageType = Record; +// @public +export function isMutationOperation(document: DocumentNode_2): boolean; -// @public (undocumented) -export function storeKeyNameFromField(field: FieldNode, variables?: Object): string; +// @public +export function isQueryOperation(document: DocumentNode_2): boolean; -// @public (undocumented) -let storeKeyNameStringify: (value: any) => string; +// @public +export function isReference(obj: any): obj is Reference; -// @public (undocumented) -export interface StoreObject { - // (undocumented) - [storeFieldName: string]: StoreValue; - // (undocumented) - __typename?: string; -} +// @public +export function isSubscriptionOperation(document: DocumentNode_2): boolean; // @public (undocumented) -type StoreObjectValueMaybeReference = StoreVal extends Array> ? StoreVal extends Array ? [ -Item -] extends [Record] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; +type KeyArgs = FieldPolicy["keyArgs"]; -// @public (undocumented) -export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; +export { Observable } -// @public (undocumented) -export function stringifyForDisplay(value: any, space?: number): string; +// @public +export function offsetLimitPagination(keyArgs?: KeyArgs): FieldPolicy; -// @public (undocumented) -export function stripTypename(value: T): DeepOmit; +// @public +const print_2: ((ast: ASTNode) => string) & { + reset(): void; +}; +export { print_2 as print } -// @public (undocumented) -class Stump extends Layer { - constructor(root: EntityStore.Root); - // (undocumented) - merge(older: string | StoreObject, newer: string | StoreObject): void; +// @public +export interface Reference { // (undocumented) - removeLayer(): this; + readonly __ref: string; } +// Warning: (ae-forgotten-export) The symbol "TExistingRelay" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "TIncomingRelay" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // Warning: (ae-forgotten-export) The symbol "SubscribeToMoreUpdateQueryFn" needs to be exported by the entry point index.d.ts - // +type RelayFieldPolicy = FieldPolicy | null, TIncomingRelay | null, TIncomingRelay | null>; + +// Warning: (ae-forgotten-export) The symbol "RelayFieldPolicy" needs to be exported by the entry point index.d.ts +// +// @public +export function relayStylePagination(keyArgs?: KeyArgs): RelayFieldPolicy; + +// @public +export interface StoreObject { // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; + [storeFieldName: string]: StoreValue; // (undocumented) - variables?: TSubscriptionVariables; + __typename?: string; } -// @public (undocumented) -type SubscribeToMoreUpdateQueryFn = { - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { - subscriptionData: { - data: Unmasked; - }; - }): Unmasked | void; -}; - -// @public (undocumented) -interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} +// @public +export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; +// @public +export function stripTypename(value: T): DeepOmit; // @public (undocumented) type TExistingRelay = Readonly<{ @@ -2793,32 +203,6 @@ type TIncomingRelay = { pageInfo?: TRelayPageInfo; }; -// @public (undocumented) -type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; - -// @public (undocumented) -type Transaction = (c: ApolloCache) => void; - -// @public (undocumented) -interface TransformCacheEntry { - // (undocumented) - asQuery: DocumentNode; - // (undocumented) - clientQuery: DocumentNode | null; - // (undocumented) - defaultVars: OperationVariables; - // (undocumented) - hasClientExports: boolean; - // (undocumented) - hasForcedResolvers: boolean; - // (undocumented) - hasNonreactiveDirective: boolean; - // (undocumented) - nonReactiveQuery: DocumentNode; - // (undocumented) - serverQuery: DocumentNode | null; -} - // @public (undocumented) type TransformFn = (document: DocumentNode) => DocumentNode; @@ -2826,7 +210,7 @@ type TransformFn = (document: DocumentNode) => DocumentNode; type TRelayEdge = { cursor?: string; node: TNode; -} | (Reference & { +} | (Reference_2 & { cursor?: string; }); @@ -2838,170 +222,10 @@ type TRelayPageInfo = { endCursor: string; }; -// @public (undocumented) -export type TupleToIntersection = T extends [infer A] ? A : T extends [infer A, infer B] ? A & B : T extends [infer A, infer B, infer C] ? A & B & C : T extends [infer A, infer B, infer C, infer D] ? A & B & C & D : T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E : T extends (infer U)[] ? U : any; - -// @public (undocumented) -type TypePolicies = { - [__typename: string]: TypePolicy; -}; - -// @public (undocumented) -type TypePolicy = { - keyFields?: KeySpecifier | KeyFieldsFunction | false; - merge?: FieldMergeFunction | boolean; - queryType?: true; - mutationType?: true; - subscriptionType?: true; - fields?: { - [fieldName: string]: FieldPolicy | FieldReadFunction; - }; -}; - -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -export type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// @public (undocumented) -type UnionToIntersection_2 = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// -// @public -type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; - -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; - -// @public (undocumented) -interface UpdateQueryMapFn { - // (undocumented) - ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; -} - -// @public (undocumented) -type UpdateQueryOptions = { - variables?: TVariables; -} & ({ - complete: true; - previousData: Unmasked; -} | { - complete: false; - previousData: DeepPartial> | undefined; -}); - -// @public (undocumented) -interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public (undocumented) -export function valueToObjectRepresentation(argObj: any, name: NameNode, value: ValueNode, variables?: Object): void; - -// @public (undocumented) -export type VariableValue = (node: VariableNode) => any; - -// @public -interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - // Warning: (ae-forgotten-export) The symbol "FragmentType" needs to be exported by the entry point index.d.ts - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} - -// @public -type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; - -// @public (undocumented) -type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public -interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export function wrapPromiseWithState(promise: Promise): PromiseWithState; - -// @public (undocumented) -interface WriteContext extends ReadMergeModifyContext { - // (undocumented) - clientOnly: boolean; - // (undocumented) - deferred: boolean; - // Warning: (ae-forgotten-export) The symbol "FlavorableWriteContext" needs to be exported by the entry point index.d.ts - // - // (undocumented) - flavors: Map; - // (undocumented) - readonly fragmentMap: FragmentMap; - // (undocumented) - incomingById: Map; - }>; - // (undocumented) - lookupFragment: FragmentMapFunction; - // (undocumented) - merge(existing: T, incoming: T): T; - // (undocumented) - overwrite: boolean; - // (undocumented) - readonly written: { - [dataId: string]: SelectionSetNode[]; - }; -} - // Warnings were encountered during analysis: // -// src/cache/core/types/DataProxy.ts:147:7 - (ae-forgotten-export) The symbol "MissingFieldError" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:58:3 - (ae-forgotten-export) The symbol "TypePolicy" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:163:3 - (ae-forgotten-export) The symbol "FieldReadFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:164:3 - (ae-forgotten-export) The symbol "FieldMergeFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts -// 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/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:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts -// src/core/types.ts:396:2 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts -// src/core/watchQueryOptions.ts:366:2 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts -// src/utilities/graphql/storeUtils.ts:226:12 - (ae-forgotten-export) The symbol "storeKeyNameStringify" needs to be exported by the entry point index.d.ts -// src/utilities/policies/pagination.ts:76:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts -// src/utilities/policies/pagination.ts:77:3 - (ae-forgotten-export) The symbol "TRelayPageInfo" needs to be exported by the entry point index.d.ts +// src/utilities/policies/pagination.ts:86:3 - (ae-forgotten-export) The symbol "TRelayEdge" needs to be exported by the entry point index.d.ts +// src/utilities/policies/pagination.ts:87:3 - (ae-forgotten-export) The symbol "TRelayPageInfo" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.api-reports/api-report-utilities_environment.api.md b/.api-reports/api-report-utilities_environment.api.md new file mode 100644 index 00000000000..70a744c6517 --- /dev/null +++ b/.api-reports/api-report-utilities_environment.api.md @@ -0,0 +1,12 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export const __DEV__: boolean; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-utilities_globals.api.md b/.api-reports/api-report-utilities_globals.api.md deleted file mode 100644 index b9fcd7f40d5..00000000000 --- a/.api-reports/api-report-utilities_globals.api.md +++ /dev/null @@ -1,51 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { InvariantError } from 'ts-invariant'; - -// @public @deprecated (undocumented) -const DEV: boolean; -export { DEV } -export { DEV as __DEV__ } - -// @public (undocumented) -const global_2: typeof globalThis & Window; -export { global_2 as global } - -// Warning: (ae-forgotten-export) The symbol "WrappedInvariant" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const invariant: WrappedInvariant; - -export { InvariantError } - -// @public (undocumented) -type LogFunction = { - (message?: any, ...optionalParams: unknown[]): void; -}; - -// @public (undocumented) -export function maybe(thunk: () => T): T | undefined; - -// @public -export function newInvariantError(message?: string | number, ...optionalParams: unknown[]): InvariantError; - -// @public (undocumented) -type WrappedInvariant = { - (condition: any, message?: string | number, ...optionalParams: unknown[]): asserts condition; - debug: LogFunction; - log: LogFunction; - warn: LogFunction; - error: LogFunction; -}; - -// Warnings were encountered during analysis: -// -// src/utilities/globals/invariantWrappers.ts:62:3 - (ae-forgotten-export) The symbol "LogFunction" needs to be exported by the entry point index.d.ts - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-utilities_internal.api.md b/.api-reports/api-report-utilities_internal.api.md new file mode 100644 index 00000000000..f4329853077 --- /dev/null +++ b/.api-reports/api-report-utilities_internal.api.md @@ -0,0 +1,456 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import type { ApolloClient } from '@apollo/client'; +import type { ASTNode } from 'graphql'; +import type { DataValue } from '@apollo/client'; +import type { DirectiveNode } from 'graphql'; +import type { DocumentNode } from 'graphql'; +import type { ErrorLike } from '@apollo/client'; +import type { FieldNode } from 'graphql'; +import type { FormattedExecutionResult } from 'graphql'; +import type { FragmentDefinitionNode } from 'graphql'; +import type { GraphQLFormattedError } from 'graphql'; +import type { HKT } from '@apollo/client/utilities'; +import type { InlineFragmentNode } from 'graphql'; +import type { MaybeMasked } from '@apollo/client'; +import type { NetworkStatus } from '@apollo/client'; +import type { Observable } from 'rxjs'; +import type { ObservableQuery } from '@apollo/client'; +import type { Observer } from 'rxjs'; +import type { OperationDefinitionNode } from 'graphql'; +import type { OperationTypeNode } from 'graphql'; +import type { OperationVariables } from '@apollo/client'; +import type { OperatorFunction } from 'rxjs'; +import type { Reference } from '@apollo/client/utilities'; +import type { SelectionNode } from 'graphql'; +import type { SelectionSetNode } from 'graphql'; +import { StrongCache } from '@wry/caches'; +import type { Subscription } from 'rxjs'; +import { WeakCache } from '@wry/caches'; + +// @internal @deprecated (undocumented) +export type ApplyHKT = (fn & { + arg1: arg1; + arg2: arg2; + arg3: arg3; + arg4: arg4; +})["return"]; + +// @internal @deprecated (undocumented) +export type ApplyHKTImplementationWithDefault, arg1, arg2 = never, arg3 = never, arg4 = never> = ApplyHKT; + +// @internal @deprecated (undocumented) +export function argumentsObjectFromField(field: FieldNode | DirectiveNode, variables?: Record): Object | null; + +// @internal @deprecated +export const AutoCleanedStrongCache: typeof StrongCache; + +// @internal @deprecated (undocumented) +export type AutoCleanedStrongCache = StrongCache; + +// @internal @deprecated +export const AutoCleanedWeakCache: typeof WeakCache; + +// @internal @deprecated (undocumented) +export type AutoCleanedWeakCache = WeakCache; + +// @public +export const canonicalStringify: ((value: any) => string) & { + reset(): void; +}; + +// @internal @deprecated (undocumented) +export const canUseDOM: boolean; + +// @internal @deprecated +export const checkDocument: (doc: DocumentNode, expectedType?: OperationTypeNode) => void; + +// @internal @deprecated +export function cloneDeep(value: T): T; + +// Warning: (ae-forgotten-export) The symbol "TupleToIntersection" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated +export function compact(...objects: TArgs): TupleToIntersection; + +// @internal @deprecated +export function createFragmentMap(fragments?: FragmentDefinitionNode[]): FragmentMap; + +// @internal @deprecated (undocumented) +export function createFulfilledPromise(value: TValue): FulfilledPromise; + +// @internal @deprecated (undocumented) +export function createRejectedPromise(reason: unknown): RejectedPromise; + +// @public (undocumented) +export function dealias(fieldValue: Record | null | undefined, selectionSet: SelectionSetNode): { + [x: string]: any; +} | null | undefined; + +// @internal @deprecated (undocumented) +export type DecoratedPromise = PendingPromise | FulfilledPromise | RejectedPromise; + +// @internal @deprecated (undocumented) +export function decoratePromise(promise: Promise): DecoratedPromise; + +// @internal @deprecated (undocumented) +export class DeepMerger { + // Warning: (ae-forgotten-export) The symbol "ReconcilerFunction" needs to be exported by the entry point index.d.ts + constructor(reconciler?: ReconcilerFunction); + // (undocumented) + isObject: typeof isNonNullObject; + // (undocumented) + merge(target: any, source: any, ...context: TContextArgs): any; + // (undocumented) + shallowCopyForMerge(value: T): T; +} + +// Warning: (ae-forgotten-export) The symbol "DeepOmitPrimitive" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "DeepOmitArray" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +export type DeepOmit = T extends DeepOmitPrimitive ? T : { + [P in keyof T as P extends K ? never : P]: T[P] extends infer TP ? TP extends DeepOmitPrimitive ? TP : TP extends any[] ? DeepOmitArray : DeepOmit : never; +}; + +// Warning: (ae-incompatible-release-tags) The symbol "DeepOmitArray" is marked as @public, but its signature references "DeepOmit" which is marked as @internal +// +// @public (undocumented) +type DeepOmitArray = { + [P in keyof T]: DeepOmit; +}; + +// Warning: (ae-incompatible-release-tags) The symbol "DeepOmitPrimitive" is marked as @public, but its signature references "Primitive" which is marked as @internal +// +// @public (undocumented) +type DeepOmitPrimitive = Primitive | Function; + +// @public (undocumented) +type Directives = { + [directiveName: string]: { + [argName: string]: any; + }; +}; + +// @public +export namespace DocumentationTypes { + // (undocumented) + export interface ApolloQueryResult extends DataState { + error?: ErrorLike; + loading: boolean; + networkStatus: NetworkStatus; + // @deprecated + partial: boolean; + } + // (undocumented) + export interface DataState { + data?: DataValue.Complete | DataValue.Streaming | DataValue.Partial | undefined; + dataState: "complete" | "streaming" | "partial" | "empty"; + } + // (undocumented) + export interface RxjsObservable { + // (undocumented) + pipe(...operators: [ + OperatorFunction>, OperatorResult> + ] | [ + OperatorFunction>, unknown>, + ...OperatorFunction[], + OperatorFunction + ]): Observable; + // (undocumented) + subscribe(observer: Partial>>> | ((value: ApolloQueryResult>) => void)): Subscription; + } + // (undocumented) + export interface VariableOptions { + variables?: TVariables; + } +} + +// @public (undocumented) +export function equalByQuery(query: DocumentNode, { data: aData, ...aRest }: Partial>, { data: bData, ...bRest }: Partial>, variables?: OperationVariables): boolean; + +// @public (undocumented) +export function filterMap(fn: (value: T, context: undefined) => R | undefined): OperatorFunction; + +// @public (undocumented) +export function filterMap(fn: (value: T, context: Context) => R | undefined, makeContext: () => NoInfer): OperatorFunction; + +// @internal @deprecated +export interface FragmentMap { + // (undocumented) + [fragmentName: string]: FragmentDefinitionNode; +} + +// @internal @deprecated (undocumented) +export type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; + +// @internal @deprecated (undocumented) +export interface FulfilledPromise extends Promise { + // (undocumented) + status: "fulfilled"; + // (undocumented) + value: TValue; +} + +// @internal @deprecated +export const getApolloCacheMemoryInternals: (() => { + cache: { + fragmentQueryDocuments: number | undefined; + }; +}) | undefined; + +// @internal @deprecated +export const getApolloClientMemoryInternals: (() => { + limits: { + [k: string]: number; + }; + sizes: { + cache?: { + fragmentQueryDocuments: number | undefined; + } | undefined; + addTypenameDocumentTransform?: { + cache: number; + }[] | undefined; + inMemoryCache?: { + executeSelectionSet: number | undefined; + executeSubSelectedArray: number | undefined; + maybeBroadcastWatch: number | undefined; + } | undefined; + fragmentRegistry?: { + findFragmentSpreads: number | undefined; + lookup: number | undefined; + transform: number | undefined; + } | undefined; + print: number | undefined; + canonicalStringify: number | undefined; + links: unknown[]; + queryManager: { + getDocumentInfo: number; + documentTransforms: { + cache: number; + }[]; + }; + }; +}) | undefined; + +// @internal @deprecated (undocumented) +export function getDefaultValues(definition: OperationDefinitionNode | undefined): Record; + +// @internal @deprecated (undocumented) +export function getFragmentDefinition(doc: DocumentNode): FragmentDefinitionNode; + +// @internal @deprecated (undocumented) +export function getFragmentDefinitions(doc: DocumentNode): FragmentDefinitionNode[]; + +// @internal @deprecated (undocumented) +export function getFragmentFromSelection(selection: SelectionNode, fragmentMap?: FragmentMap | FragmentMapFunction): InlineFragmentNode | FragmentDefinitionNode | null; + +// @internal @deprecated +export function getFragmentQueryDocument(document: DocumentNode, fragmentName?: string): DocumentNode; + +// @internal @deprecated (undocumented) +export function getGraphQLErrorsFromResult(result: { + errors?: ReadonlyArray; +}): Array; + +// @internal @deprecated +export const getInMemoryCacheMemoryInternals: (() => { + addTypenameDocumentTransform: { + cache: number; + }[]; + inMemoryCache: { + executeSelectionSet: number | undefined; + executeSubSelectedArray: number | undefined; + maybeBroadcastWatch: number | undefined; + }; + fragmentRegistry: { + findFragmentSpreads: number | undefined; + lookup: number | undefined; + transform: number | undefined; + }; + cache: { + fragmentQueryDocuments: number | undefined; + }; +}) | undefined; + +// @public +export function getMainDefinition(queryDoc: DocumentNode): OperationDefinitionNode | FragmentDefinitionNode; + +// @internal @deprecated (undocumented) +export function getOperationDefinition(doc: DocumentNode): OperationDefinitionNode | undefined; + +// @internal @deprecated (undocumented) +export function getOperationName(doc: DocumentNode, fallback?: TFallback): string | TFallback; + +// @internal @deprecated (undocumented) +export function getQueryDefinition(doc: DocumentNode): OperationDefinitionNode; + +// Warning: (ae-forgotten-export) The symbol "Directives" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +export const getStoreKeyName: ((fieldName: string, args?: Record | null, directives?: Directives) => string) & { + setStringify(s: typeof storeKeyNameStringify): (value: any) => string; +}; + +// @public (undocumented) +const globalCaches: { + print?: () => number; + canonicalStringify?: () => number; +}; + +// @internal @deprecated (undocumented) +export function graphQLResultHasError(result: FormattedExecutionResult): boolean; + +// @internal @deprecated (undocumented) +export function hasDirectives(names: string[], root: ASTNode, all?: boolean): boolean; + +// @public (undocumented) +export function hasForcedResolvers(document: ASTNode): boolean; + +// @internal @deprecated (undocumented) +export type IsAny = 0 extends 1 & T ? true : false; + +// @internal @deprecated +export const isArray: (a: any) => a is any[] | readonly any[]; + +// @internal @deprecated (undocumented) +export function isDocumentNode(value: unknown): value is DocumentNode; + +// @internal @deprecated (undocumented) +export function isField(selection: SelectionNode): selection is FieldNode; + +// @internal @deprecated (undocumented) +export function isNonEmptyArray(value: ArrayLike | null | undefined): value is Array; + +// @internal @deprecated (undocumented) +export function isNonNullObject(obj: unknown): obj is Record; + +// @internal @deprecated (undocumented) +export function isPlainObject(obj: unknown): obj is Record; + +// @internal @deprecated (undocumented) +export function makeReference(id: string): Reference; + +// @internal @deprecated +export function makeUniqueId(prefix: string): string; + +// @internal @deprecated (undocumented) +export function maybeDeepFreeze(obj: T): T; + +// @internal @deprecated (undocumented) +export function mergeDeep(...sources: T): TupleToIntersection; + +// @internal @deprecated (undocumented) +export function mergeDeepArray(sources: T[]): T; + +// Warning: (ae-forgotten-export) The symbol "OptionsUnion" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +export function mergeOptions>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial | undefined, options: TOptions | Partial): TOptions & TDefaultOptions; + +// @public @deprecated +type NoInfer_2 = [T][T extends any ? 0 : never]; +export { NoInfer_2 as NoInfer } + +// @internal @deprecated (undocumented) +export function omitDeep(value: T, key: K): DeepOmit; + +// @public (undocumented) +type OptionsUnion = ApolloClient.WatchQueryOptions | ApolloClient.QueryOptions | ApolloClient.MutateOptions; + +// @internal @deprecated (undocumented) +export interface PendingPromise extends Promise { + // (undocumented) + status: "pending"; +} + +// @internal @deprecated (undocumented) +export type Prettify = { + [K in keyof T]: T[K]; +} & {}; + +// @public (undocumented) +export function preventUnhandledRejection(promise: Promise): Promise; + +// @internal @deprecated (undocumented) +export type Primitive = null | undefined | string | number | boolean | symbol | bigint; + +// Warning: (ae-incompatible-release-tags) The symbol "ReconcilerFunction" is marked as @public, but its signature references "DeepMerger" which is marked as @internal +// +// @public (undocumented) +type ReconcilerFunction = (this: DeepMerger, target: Record, source: Record, property: string | number, ...context: TContextArgs) => any; + +// Warning: (ae-forgotten-export) The symbol "globalCaches" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function registerGlobalCache(name: keyof typeof globalCaches, getSize: () => number): void; + +// @internal @deprecated (undocumented) +export interface RejectedPromise extends Promise { + // (undocumented) + reason: unknown; + // (undocumented) + status: "rejected"; +} + +// @public (undocumented) +type RemoveDirectiveConfig = { + name?: string; + test?: (node: DirectiveNode) => boolean; + remove?: boolean; +}; + +// Warning: (ae-forgotten-export) The symbol "RemoveDirectiveConfig" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +export function removeDirectivesFromDocument(directives: RemoveDirectiveConfig[], doc: DocumentNode): DocumentNode | null; + +// @internal @deprecated (undocumented) +export type RemoveIndexSignature = { + [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; +}; + +// @public (undocumented) +export function removeMaskedFragmentSpreads(document: DocumentNode): DocumentNode; + +// @internal @deprecated (undocumented) +export function resultKeyNameFromField(field: FieldNode): string; + +// @internal @deprecated (undocumented) +export function shouldInclude({ directives }: SelectionNode, variables?: Record): boolean; + +// @internal @deprecated (undocumented) +export function storeKeyNameFromField(field: FieldNode, variables?: Object): string; + +// @public (undocumented) +let storeKeyNameStringify: (value: any) => string; + +// @internal @deprecated (undocumented) +export function stringifyForDisplay(value: any, space?: number): string; + +// @internal @deprecated (undocumented) +export function toQueryResult(value: ObservableQuery.Result): ApolloClient.QueryResult; + +// @public (undocumented) +type TupleToIntersection = T extends [infer A] ? A : T extends [infer A, infer B] ? A & B : T extends [infer A, infer B, infer C] ? A & B & C : T extends [infer A, infer B, infer C, infer D] ? A & B & C & D : T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E : T extends (infer U)[] ? U : any; + +// @internal @deprecated (undocumented) +export type VariablesOption = {} extends TVariables ? { + variables?: TVariables; +} : { + variables: TVariables; +}; + +// Warnings were encountered during analysis: +// +// src/utilities/internal/getStoreKeyName.ts:88:1 - (ae-forgotten-export) The symbol "storeKeyNameStringify" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-utilities_internal_globals.api.md b/.api-reports/api-report-utilities_internal_globals.api.md new file mode 100644 index 00000000000..343672cf6f6 --- /dev/null +++ b/.api-reports/api-report-utilities_internal_globals.api.md @@ -0,0 +1,16 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +const global_2: typeof globalThis & Window; +export { global_2 as global } + +// @public (undocumented) +export function maybe(thunk: () => T): T | undefined; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-utilities_invariant.api.md b/.api-reports/api-report-utilities_invariant.api.md new file mode 100644 index 00000000000..25e1caeaf83 --- /dev/null +++ b/.api-reports/api-report-utilities_invariant.api.md @@ -0,0 +1,60 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export const ApolloErrorMessageHandler: unique symbol; + +// @public (undocumented) +export function invariant(condition: any, ...args: [message?: string | number, ...any[]]): asserts condition; + +// @public (undocumented) +export namespace invariant { + var // (undocumented) + debug: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; + var // (undocumented) + log: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; + var // (undocumented) + warn: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; + var // (undocumented) + error: { + (...data: any[]): void; + (message?: any, ...optionalParams: any[]): void; + }; +} + +// @public (undocumented) +export class InvariantError extends Error { + constructor(message?: string); +} + +// @public +export function newInvariantError(message?: string | number, ...optionalParams: unknown[]): InvariantError; + +// Warning: (ae-forgotten-export) The symbol "VerbosityLevel" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function setVerbosity(level: VerbosityLevel): VerbosityLevel; + +// Warning: (ae-forgotten-export) The symbol "verbosityLevels" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +type VerbosityLevel = (typeof verbosityLevels)[number]; + +// @public (undocumented) +const verbosityLevels: readonly ["debug", "log", "warn", "error", "silent"]; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-utilities_subscriptions_relay.api.md b/.api-reports/api-report-utilities_subscriptions_relay.api.md index 4e77625a6e1..2f042b65cbb 100644 --- a/.api-reports/api-report-utilities_subscriptions_relay.api.md +++ b/.api-reports/api-report-utilities_subscriptions_relay.api.md @@ -6,10 +6,10 @@ import type { GraphQLResponse } from 'relay-runtime'; import { Observable } from 'relay-runtime'; +import type { OperationVariables } from '@apollo/client'; import type { RequestParameters } from 'relay-runtime'; // Warning: (ae-forgotten-export) The symbol "CreateMultipartSubscriptionOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "OperationVariables" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function createFetchMultipartSubscription(uri: string, { fetch: preferredFetch, headers }?: CreateMultipartSubscriptionOptions): (operation: RequestParameters, variables: OperationVariables) => Observable; @@ -20,9 +20,6 @@ type CreateMultipartSubscriptionOptions = { headers?: Record; }; -// @public (undocumented) -type OperationVariables = Record; - // (No @packageDocumentation comment for this package) ``` diff --git a/.api-reports/api-report-utilities_subscriptions_urql.api.md b/.api-reports/api-report-utilities_subscriptions_urql.api.md deleted file mode 100644 index 78b63288010..00000000000 --- a/.api-reports/api-report-utilities_subscriptions_urql.api.md +++ /dev/null @@ -1,25 +0,0 @@ -## API Report File for "@apollo/client" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import { Observable } from 'zen-observable-ts'; - -// Warning: (ae-forgotten-export) The symbol "CreateMultipartSubscriptionOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export function createFetchMultipartSubscription(uri: string, { fetch: preferredFetch, headers }?: CreateMultipartSubscriptionOptions): ({ query, variables, }: { - query?: string; - variables: undefined | Record; -}) => Observable; - -// @public (undocumented) -type CreateMultipartSubscriptionOptions = { - fetch?: WindowOrWorkerGlobalScope["fetch"]; - headers?: Record; -}; - -// (No @packageDocumentation comment for this package) - -``` diff --git a/.api-reports/api-report-v4-migration.api.md b/.api-reports/api-report-v4-migration.api.md new file mode 100644 index 00000000000..abfb8346c9c --- /dev/null +++ b/.api-reports/api-report-v4-migration.api.md @@ -0,0 +1,433 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public @deprecated (undocumented) +export const addNonReactiveToNamedFragments: never; + +// @public @deprecated (undocumented) +export const ApolloConsumer: never; + +// @public @deprecated (undocumented) +export type ApolloConsumerProps = never; + +// @public @deprecated (undocumented) +export class ApolloError { +} + +// @public @deprecated (undocumented) +export type ApolloErrorOptions = never; + +// @public @deprecated (undocumented) +export const asyncMap: never; + +// @public @deprecated (undocumented) +export type BaseMutationOptions = never; + +// @public @deprecated (undocumented) +export type BaseQueryOptions = never; + +// @public @deprecated (undocumented) +export type BatchableRequest = never; + +// @public @deprecated (undocumented) +export const buildQueryFromSelectionSet: never; + +// @public @deprecated (undocumented) +export const canUseAsyncIteratorSymbol: never; + +// @public @deprecated (undocumented) +export const canUseLayoutEffect: never; + +// @public @deprecated (undocumented) +export const canUseSymbol: never; + +// @public @deprecated (undocumented) +export const canUseWeakMap: never; + +// @public @deprecated (undocumented) +export const canUseWeakSet: never; + +// @public @deprecated (undocumented) +export type ChildDataProps = never; + +// @public @deprecated (undocumented) +export type ChildMutateProps = never; + +// @public @deprecated (undocumented) +export type ChildProps = never; + +// @public @deprecated (undocumented) +export type ClientParseError = never; + +// @public @deprecated (undocumented) +export type CommonOptions = never; + +// @public @deprecated (undocumented) +export class Concast { +} + +// @public @deprecated (undocumented) +export type ConcastSourcesArray = never; + +// @public @deprecated (undocumented) +export type ConcastSourcesIterable = never; + +// @public @deprecated (undocumented) +export const createMockClient: never; + +// @public @deprecated (undocumented) +export const createSchemaFetch: never; + +// @public @deprecated (undocumented) +export const createTestSchema: never; + +// @public @deprecated (undocumented) +export type DataProps = never; + +// @public @deprecated (undocumented) +export const DataProxy: never; + +// @public @deprecated (undocumented) +export type DataValue = never; + +// @public @deprecated (undocumented) +export const defaultCacheSizes: never; + +// @public @deprecated (undocumented) +export type DirectiveInfo = never; + +// @public @deprecated (undocumented) +export type Directives = never; + +// @public @deprecated (undocumented) +const DocumentType_2: never; +export { DocumentType_2 as DocumentType } + +// @public @deprecated (undocumented) +export type FetchMoreQueryOptions = never; + +// @public @deprecated (undocumented) +export const fixObservableSubclass: never; + +// @public @deprecated (undocumented) +export type FragmentMatcher = never; + +// @public @deprecated (undocumented) +export const fromError: never; + +// @public @deprecated (undocumented) +export const fromPromise: never; + +// @public @deprecated (undocumented) +export type GetDirectiveConfig = never; + +// @public @deprecated (undocumented) +export const getDirectiveNames: never; + +// @public @deprecated (undocumented) +export const getFragmentMaskMode: never; + +// @public @deprecated (undocumented) +export type GetFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const getInclusionDirectives: never; + +// @public @deprecated (undocumented) +export type GetNodeConfig = never; + +// @public @deprecated (undocumented) +export const getTypenameFromResult: never; + +// @public @deprecated (undocumented) +export const graphql: never; + +// @public @deprecated (undocumented) +export type GraphQLErrors = never; + +// @public @deprecated (undocumented) +export const hasAllDirectives: never; + +// @public @deprecated (undocumented) +export const hasAnyDirectives: never; + +// @public @deprecated (undocumented) +export const hasClientExports: never; + +// @public @deprecated (undocumented) +export type IDocumentDefinition = never; + +// @public @deprecated (undocumented) +export type InclusionDirectives = never; + +// @public @deprecated (undocumented) +export const isApolloError: never; + +// @public @deprecated (undocumented) +export const isApolloPayloadResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchIncrementalResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchInitialResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchResult: never; + +// @public @deprecated (undocumented) +export const isFullyUnmaskedOperation: never; + +// @public @deprecated (undocumented) +export const isInlineFragment: never; + +// @public @deprecated (undocumented) +export const isStatefulPromise: never; + +// @public @deprecated (undocumented) +export type IsStrictlyAny = never; + +// @public @deprecated (undocumented) +export const itAsync: never; + +// @public @deprecated (undocumented) +export const iterateObserversSafely: never; + +// @public @deprecated (undocumented) +export type Masked = never; + +// @public @deprecated (undocumented) +export type MaskedDocumentNode = never; + +// @public @deprecated (undocumented) +export const mergeIncrementalData: never; + +// @public @deprecated (undocumented) +export type MethodKeys = never; + +// @public @deprecated (undocumented) +export const mockObservableLink: never; + +// @public @deprecated (undocumented) +export const mockSingleLink: never; + +// @public @deprecated (undocumented) +export type MutateProps = never; + +// @public @deprecated (undocumented) +export const Mutation: never; + +// @public @deprecated (undocumented) +export type MutationComponentOptions = never; + +// @public @deprecated (undocumented) +export type MutationDataOptions = never; + +// @public @deprecated (undocumented) +export type MutationUpdaterFn = never; + +// @public @deprecated (undocumented) +export type NetworkError = never; + +// @public @deprecated (undocumented) +export type ObservableQueryFields = never; + +// @public @deprecated (undocumented) +export const ObservableSubscription: never; + +// @public @deprecated (undocumented) +export const Observer: never; + +// @public @deprecated (undocumented) +export type OnlyRequiredProperties = never; + +// @public @deprecated (undocumented) +export const OperationBatcher: never; + +// @public @deprecated (undocumented) +export const operationName: never; + +// @public @deprecated (undocumented) +export type OperationOption = never; + +// @public @deprecated (undocumented) +export type OptionProps = never; + +// @public @deprecated (undocumented) +export const parser: never; + +// @public @deprecated (undocumented) +export type PromiseWithState = never; + +// @public @deprecated (undocumented) +export type PureQueryOptions = never; + +// @public @deprecated (undocumented) +export const Query: never; + +// @public @deprecated (undocumented) +export type QueryComponentOptions = never; + +// @public @deprecated (undocumented) +export type QueryControls = never; + +// @public @deprecated (undocumented) +export type QueryDataOptions = never; + +// @public @deprecated (undocumented) +export type QueryLazyOptions = never; + +// @public @deprecated (undocumented) +export type ReconcilerFunction = never; + +// @public @deprecated (undocumented) +export type RefetchQueriesFunction = never; + +// @public (undocumented) +export namespace Removals { + // @deprecated (undocumented) + export type defer = never; + // @deprecated (undocumented) + export type errors = never; + // @deprecated (undocumented) + export type HOC = never; + // @deprecated (undocumented) + export type implementationDetail = never; + // @deprecated (undocumented) + export type internal = never; + // @deprecated (undocumented) + export type internalTesting = never; + // @deprecated (undocumented) + export type removedType = never; + // @deprecated (undocumented) + export type removedValue = never; + // @deprecated (undocumented) + export type renderProp = never; + // @deprecated (undocumented) + export type rxjs = never; + // @deprecated (undocumented) + export type testingLibrary = never; + // @deprecated (undocumented) + export type utility = never; +} + +// @public @deprecated (undocumented) +export type RemoveArgumentsConfig = never; + +// @public @deprecated (undocumented) +export const removeArgumentsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeClientSetsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeConnectionDirectiveFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveDirectiveConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentDefinitionConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const removeFragmentSpreadFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveNodeConfig = never; + +// @public @deprecated (undocumented) +export type RemoveVariableDefinitionConfig = never; + +// @public @deprecated (undocumented) +export const RenderPromises: never; + +// @public @deprecated (undocumented) +export const resetApolloContext: never; + +// @public @deprecated (undocumented) +export type Resolver = never; + +// @public @deprecated (undocumented) +export type Resolvers = never; + +// @public @deprecated (undocumented) +export const serializeFetchParameter: never; + +// @public @deprecated (undocumented) +export const subscribeAndCount: never; + +// @public @deprecated (undocumented) +export const Subscription: never; + +// @public @deprecated (undocumented) +export type SubscriptionComponentOptions = never; + +// @public @deprecated (undocumented) +export type SubscriptionCurrentObservable = never; + +// @public @deprecated (undocumented) +export const throwServerError: never; + +// @public @deprecated (undocumented) +export const tick: never; + +// @public @deprecated (undocumented) +export const toPromise: never; + +// @public @deprecated (undocumented) +export const transformOperation: never; + +// @public @deprecated (undocumented) +export type TupleToIntersection = never; + +// @public @deprecated (undocumented) +export type UnionToIntersection = never; + +// @public @deprecated (undocumented) +export const validateOperation: never; + +// @public @deprecated (undocumented) +export const valueToObjectRepresentation: never; + +// @public @deprecated (undocumented) +export type VariableValue = never; + +// @public @deprecated (undocumented) +export const verifyDocumentType: never; + +// @public @deprecated (undocumented) +export const wait: never; + +// @public @deprecated (undocumented) +export const withApollo: never; + +// @public @deprecated (undocumented) +export type WithApolloClient = never; + +// @public @deprecated (undocumented) +export const withErrorSpy: never; + +// @public @deprecated (undocumented) +export const withLogSpy: never; + +// @public @deprecated (undocumented) +export const withMutation: never; + +// @public @deprecated (undocumented) +export const withQuery: never; + +// @public @deprecated (undocumented) +export const withSubscription: never; + +// @public @deprecated (undocumented) +export const withWarningSpy: never; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report-zz_removals.api.md b/.api-reports/api-report-zz_removals.api.md new file mode 100644 index 00000000000..5325d7689ef --- /dev/null +++ b/.api-reports/api-report-zz_removals.api.md @@ -0,0 +1,427 @@ +## API Report File for "@apollo/client" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public @deprecated (undocumented) +export const addNonReactiveToNamedFragments: never; + +// @public @deprecated (undocumented) +export const ApolloConsumer: never; + +// @public @deprecated (undocumented) +export type ApolloConsumerProps = never; + +// @public @deprecated (undocumented) +export class ApolloError { +} + +// @public @deprecated (undocumented) +export type ApolloErrorOptions = never; + +// @public @deprecated (undocumented) +export const asyncMap: never; + +// @public @deprecated (undocumented) +export type BaseMutationOptions = never; + +// @public @deprecated (undocumented) +export type BaseQueryOptions = never; + +// @public @deprecated (undocumented) +export type BatchableRequest = never; + +// @public @deprecated (undocumented) +export const buildQueryFromSelectionSet: never; + +// @public @deprecated (undocumented) +export const canUseAsyncIteratorSymbol: never; + +// @public @deprecated (undocumented) +export const canUseLayoutEffect: never; + +// @public @deprecated (undocumented) +export const canUseSymbol: never; + +// @public @deprecated (undocumented) +export const canUseWeakMap: never; + +// @public @deprecated (undocumented) +export const canUseWeakSet: never; + +// @public @deprecated (undocumented) +export type ChildDataProps = never; + +// @public @deprecated (undocumented) +export type ChildMutateProps = never; + +// @public @deprecated (undocumented) +export type ChildProps = never; + +// @public @deprecated (undocumented) +export type ClientParseError = never; + +// @public @deprecated (undocumented) +export type CommonOptions = never; + +// @public @deprecated (undocumented) +export class Concast { +} + +// @public @deprecated (undocumented) +export type ConcastSourcesArray = never; + +// @public @deprecated (undocumented) +export type ConcastSourcesIterable = never; + +// @public @deprecated (undocumented) +export const createMockClient: never; + +// @public @deprecated (undocumented) +export const createSchemaFetch: never; + +// @public @deprecated (undocumented) +export const createTestSchema: never; + +// @public @deprecated (undocumented) +export type DataProps = never; + +// @public @deprecated (undocumented) +export const DataProxy: never; + +// @public @deprecated (undocumented) +export type DataValue = never; + +// @public @deprecated (undocumented) +export const defaultCacheSizes: never; + +// @public @deprecated (undocumented) +export type DirectiveInfo = never; + +// @public @deprecated (undocumented) +export type Directives = never; + +// @public @deprecated (undocumented) +const DocumentType_2: never; +export { DocumentType_2 as DocumentType } + +// @public @deprecated (undocumented) +export type FetchMoreQueryOptions = never; + +// @public @deprecated (undocumented) +export const fixObservableSubclass: never; + +// @public @deprecated (undocumented) +export type FragmentMatcher = never; + +// @public @deprecated (undocumented) +export const fromError: never; + +// @public @deprecated (undocumented) +export const fromPromise: never; + +// @public @deprecated (undocumented) +export type GetDirectiveConfig = never; + +// @public @deprecated (undocumented) +export const getDirectiveNames: never; + +// @public @deprecated (undocumented) +export const getFragmentMaskMode: never; + +// @public @deprecated (undocumented) +export type GetFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const getInclusionDirectives: never; + +// @public @deprecated (undocumented) +export type GetNodeConfig = never; + +// @public @deprecated (undocumented) +export const getTypenameFromResult: never; + +// @public @deprecated (undocumented) +export const graphql: never; + +// @public @deprecated (undocumented) +export type GraphQLErrors = never; + +// @public @deprecated (undocumented) +export const hasAllDirectives: never; + +// @public @deprecated (undocumented) +export const hasAnyDirectives: never; + +// @public @deprecated (undocumented) +export const hasClientExports: never; + +// @public @deprecated (undocumented) +export type IDocumentDefinition = never; + +// @public @deprecated (undocumented) +export type InclusionDirectives = never; + +// @public @deprecated (undocumented) +export const isApolloError: never; + +// @public @deprecated (undocumented) +export const isApolloPayloadResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchIncrementalResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchInitialResult: never; + +// @public @deprecated (undocumented) +export const isExecutionPatchResult: never; + +// @public @deprecated (undocumented) +export const isFullyUnmaskedOperation: never; + +// @public @deprecated (undocumented) +export const isInlineFragment: never; + +// @public @deprecated (undocumented) +export const isStatefulPromise: never; + +// @public @deprecated (undocumented) +export type IsStrictlyAny = never; + +// @public @deprecated (undocumented) +export const itAsync: never; + +// @public @deprecated (undocumented) +export const iterateObserversSafely: never; + +// @public @deprecated (undocumented) +export const mergeIncrementalData: never; + +// @public @deprecated (undocumented) +export type MethodKeys = never; + +// @public @deprecated (undocumented) +export const mockObservableLink: never; + +// @public @deprecated (undocumented) +export const mockSingleLink: never; + +// @public @deprecated (undocumented) +export type MutateProps = never; + +// @public @deprecated (undocumented) +export const Mutation: never; + +// @public @deprecated (undocumented) +export type MutationComponentOptions = never; + +// @public @deprecated (undocumented) +export type MutationDataOptions = never; + +// @public @deprecated (undocumented) +export type MutationUpdaterFn = never; + +// @public @deprecated (undocumented) +export type NetworkError = never; + +// @public @deprecated (undocumented) +export type ObservableQueryFields = never; + +// @public @deprecated (undocumented) +export const ObservableSubscription: never; + +// @public @deprecated (undocumented) +export const Observer: never; + +// @public @deprecated (undocumented) +export type OnlyRequiredProperties = never; + +// @public @deprecated (undocumented) +export const OperationBatcher: never; + +// @public @deprecated (undocumented) +export const operationName: never; + +// @public @deprecated (undocumented) +export type OperationOption = never; + +// @public @deprecated (undocumented) +export type OptionProps = never; + +// @public @deprecated (undocumented) +export const parser: never; + +// @public @deprecated (undocumented) +export type PromiseWithState = never; + +// @public @deprecated (undocumented) +export type PureQueryOptions = never; + +// @public @deprecated (undocumented) +export const Query: never; + +// @public @deprecated (undocumented) +export type QueryComponentOptions = never; + +// @public @deprecated (undocumented) +export type QueryControls = never; + +// @public @deprecated (undocumented) +export type QueryDataOptions = never; + +// @public @deprecated (undocumented) +export type QueryLazyOptions = never; + +// @public @deprecated (undocumented) +export type ReconcilerFunction = never; + +// @public @deprecated (undocumented) +export type RefetchQueriesFunction = never; + +// @public +export namespace Removals { + // @deprecated (undocumented) + export type defer = never; + // @deprecated (undocumented) + export type errors = never; + // @deprecated (undocumented) + export type HOC = never; + // @deprecated (undocumented) + export type implementationDetail = never; + // @deprecated (undocumented) + export type internal = never; + // @deprecated (undocumented) + export type internalTesting = never; + // @deprecated (undocumented) + export type removedType = never; + // @deprecated (undocumented) + export type removedValue = never; + // @deprecated (undocumented) + export type renderProp = never; + // @deprecated (undocumented) + export type rxjs = never; + // @deprecated (undocumented) + export type testingLibrary = never; + // @deprecated (undocumented) + export type utility = never; +} + +// @public @deprecated (undocumented) +export type RemoveArgumentsConfig = never; + +// @public @deprecated (undocumented) +export const removeArgumentsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeClientSetsFromDocument: never; + +// @public @deprecated (undocumented) +export const removeConnectionDirectiveFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveDirectiveConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentDefinitionConfig = never; + +// @public @deprecated (undocumented) +export type RemoveFragmentSpreadConfig = never; + +// @public @deprecated (undocumented) +export const removeFragmentSpreadFromDocument: never; + +// @public @deprecated (undocumented) +export type RemoveNodeConfig = never; + +// @public @deprecated (undocumented) +export type RemoveVariableDefinitionConfig = never; + +// @public @deprecated (undocumented) +export const RenderPromises: never; + +// @public @deprecated (undocumented) +export const resetApolloContext: never; + +// @public @deprecated (undocumented) +export type Resolver = never; + +// @public @deprecated (undocumented) +export type Resolvers = never; + +// @public @deprecated (undocumented) +export const serializeFetchParameter: never; + +// @public @deprecated (undocumented) +export const subscribeAndCount: never; + +// @public @deprecated (undocumented) +export const Subscription: never; + +// @public @deprecated (undocumented) +export type SubscriptionComponentOptions = never; + +// @public @deprecated (undocumented) +export type SubscriptionCurrentObservable = never; + +// @public @deprecated (undocumented) +export const throwServerError: never; + +// @public @deprecated (undocumented) +export const tick: never; + +// @public @deprecated (undocumented) +export const toPromise: never; + +// @public @deprecated (undocumented) +export const transformOperation: never; + +// @public @deprecated (undocumented) +export type TupleToIntersection = never; + +// @public @deprecated (undocumented) +export type UnionToIntersection = never; + +// @public @deprecated (undocumented) +export const validateOperation: never; + +// @public @deprecated (undocumented) +export const valueToObjectRepresentation: never; + +// @public @deprecated (undocumented) +export type VariableValue = never; + +// @public @deprecated (undocumented) +export const verifyDocumentType: never; + +// @public @deprecated (undocumented) +export const wait: never; + +// @public @deprecated (undocumented) +export const withApollo: never; + +// @public @deprecated (undocumented) +export type WithApolloClient = never; + +// @public @deprecated (undocumented) +export const withErrorSpy: never; + +// @public @deprecated (undocumented) +export const withLogSpy: never; + +// @public @deprecated (undocumented) +export const withMutation: never; + +// @public @deprecated (undocumented) +export const withQuery: never; + +// @public @deprecated (undocumented) +export const withSubscription: never; + +// @public @deprecated (undocumented) +export const withWarningSpy: never; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/.api-reports/api-report.api.md b/.api-reports/api-report.api.md index a89ab5621e7..53a7fdad335 100644 --- a/.api-reports/api-report.api.md +++ b/.api-reports/api-report.api.md @@ -7,27 +7,27 @@ import type { ASTNode } from 'graphql'; import { disableExperimentalFragmentVariables } from 'graphql-tag'; import { disableFragmentWarnings } from 'graphql-tag'; -import type { DocumentNode } from 'graphql'; +import { DocumentNode } from 'graphql'; import { enableExperimentalFragmentVariables } from 'graphql-tag'; import type { FieldNode } from 'graphql'; import type { FormattedExecutionResult } from 'graphql'; import type { FragmentDefinitionNode } from 'graphql'; import { gql } from 'graphql-tag'; -import type { GraphQLErrorExtensions } from 'graphql'; import type { GraphQLFormattedError } from 'graphql'; import type { InlineFragmentNode } from 'graphql'; -import { InvariantError } from 'ts-invariant'; -import { Observable } from 'zen-observable-ts'; -import type { Subscription as ObservableSubscription } from 'zen-observable-ts'; -import type { Observer } from 'zen-observable-ts'; -import type * as ReactTypes from 'react'; +import type { InteropObservable } from 'rxjs'; +import type { NextNotification } from 'rxjs'; +import { Observable } from 'rxjs'; +import type { ObservableNotification } from 'rxjs'; +import type { Observer } from 'rxjs'; +import { OperationTypeNode } from 'graphql'; +import type { print as print_2 } from 'graphql'; import { resetCaches } from 'graphql-tag'; import type { SelectionSetNode } from 'graphql'; -import { setVerbosity as setLogVerbosity } from 'ts-invariant'; -import type { Subscriber } from 'zen-observable-ts'; +import type { Subscribable } from 'rxjs'; +import type { Subscription } from 'rxjs'; import { Trie } from '@wry/trie'; import { TypedDocumentNode } from '@graphql-typed-document-node/core'; -import type { VariableDefinitionNode } from 'graphql'; // Warning: (ae-forgotten-export) The symbol "Modifier" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "StoreObjectValueMaybeReference" needs to be exported by the entry point index.d.ts @@ -36,23 +36,41 @@ import type { VariableDefinitionNode } from 'graphql'; type AllFieldsModifier> = Modifier> : never>; // @public (undocumented) -export abstract class ApolloCache implements DataProxy { +export namespace ApolloCache { + export interface WatchFragmentOptions { + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + // Warning: (ae-forgotten-export) The symbol "NoInfer_2" needs to be exported by the entry point index.d.ts + from: StoreObject | Reference | FragmentType> | string; + optimistic?: boolean; + variables?: TVariables; + } + export type WatchFragmentResult = ({ + complete: true; + missing?: never; + } & GetDataState) | ({ + complete: false; + missing: MissingTree; + } & GetDataState); +} + +// @public (undocumented) +export abstract class ApolloCache { // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) batch(options: Cache_2.BatchOptions): U; - // (undocumented) - abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; + abstract diff(query: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) abstract evict(options: Cache_2.EvictOptions): boolean; - abstract extract(optimistic?: boolean): TSerialized; + abstract extract(optimistic?: boolean): unknown; // (undocumented) - fragmentMatches?(fragment: InlineFragmentNode, typename: string): boolean; + abstract fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(): string[]; // Warning: (ae-forgotten-export) The symbol "getApolloCacheMemoryInternals" needs to be exported by the entry point index.d.ts // - // @internal + // @internal @deprecated getMemoryInternals?: typeof getApolloCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; @@ -61,235 +79,370 @@ export abstract class ApolloCache implements DataProxy { // (undocumented) modify = Record>(options: Cache_2.ModifyOptions): boolean; // (undocumented) - abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; - // (undocumented) - abstract read(query: Cache_2.ReadOptions): Unmasked | null; + abstract performTransaction(transaction: Transaction, optimisticId?: string | null): void; // (undocumented) - readFragment(options: Cache_2.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; + abstract read(query: Cache_2.ReadOptions): Unmasked | null; + readFragment({ fragment, variables, fragmentName, id, optimistic, returnPartialData, }: Cache_2.ReadFragmentOptions): Unmasked | null; // (undocumented) - readQuery(options: Cache_2.ReadQueryOptions, optimistic?: boolean): Unmasked | null; + readFragment(options: Cache_2.ReadFragmentOptions, + optimistic: boolean): Unmasked | null; + readQuery({ query, variables, id, optimistic, returnPartialData, }: Cache_2.ReadQueryOptions): Unmasked | null; + readQuery(options: Cache_2.ReadQueryOptions, + optimistic: boolean): Unmasked | null; // (undocumented) - recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; + recordOptimisticTransaction(transaction: Transaction, optimisticId: string): void; // (undocumented) abstract removeOptimistic(id: string): void; // (undocumented) abstract reset(options?: Cache_2.ResetOptions): Promise; - abstract restore(serializedState: TSerialized): ApolloCache; + abstract restore(serializedState: unknown): this; // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) transformForLink(document: DocumentNode): DocumentNode; // (undocumented) - updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + updateFragment(options: Cache_2.UpdateFragmentOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + // (undocumented) + updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + // (undocumented) + abstract watch(watch: Cache_2.WatchOptions): () => void; + watchFragment(options: ApolloCache.WatchFragmentOptions): Observable>>; + // (undocumented) + abstract write(write: Cache_2.WriteOptions): Reference | undefined; + writeFragment({ data, fragment, fragmentName, variables, overwrite, id, broadcast, }: Cache_2.WriteFragmentOptions): Reference | undefined; + writeQuery({ data, query, variables, overwrite, id, broadcast, }: Cache_2.WriteQueryOptions): Reference | undefined; +} + +// @public (undocumented) +export namespace ApolloClient { + // (undocumented) + export namespace Base { + // (undocumented) + export interface ReadQueryOptions { + id?: string; + optimistic?: boolean; + query: DocumentNode | TypedDocumentNode; + returnPartialData?: boolean; + } + } + // (undocumented) + export namespace Base { + // (undocumented) + export interface ReadFragmentOptions { + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + id?: string; + optimistic?: boolean; + returnPartialData?: boolean; + } + } + // (undocumented) + export namespace Base { + // (undocumented) + export interface WriteQueryOptions { + broadcast?: boolean; + data: Unmasked; + id?: string; + overwrite?: boolean; + query: DocumentNode | TypedDocumentNode; + } + } + // (undocumented) + export namespace Base { + // (undocumented) + export interface WriteFragmentOptions { + broadcast?: boolean; + data: Unmasked; + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + id?: string; + overwrite?: boolean; + } + } + // (undocumented) + export interface DefaultOptions { + // (undocumented) + mutate?: Partial>; + // (undocumented) + query?: Partial>; + // (undocumented) + watchQuery?: Partial>; + } + // (undocumented) + export interface DevtoolsOptions { + enabled?: boolean; + name?: string; + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface ReadQueryOptions extends Base.ReadQueryOptions { + variables?: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface WriteQueryOptions extends Base.WriteQueryOptions { + variables?: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface WriteQueryOptions extends Base.WriteQueryOptions { + variables?: TVariables; + } + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface WriteFragmentOptions extends Base.WriteFragmentOptions { + variables?: TVariables; + } + } + // Warning: (ae-forgotten-export) The symbol "VariablesOption" needs to be exported by the entry point index.d.ts + // + // (undocumented) + export type MutateOptions = { + optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { + IGNORE: IgnoreModifier; + }) => Unmasked> | IgnoreModifier); + updateQueries?: MutationQueryReducersMap; + refetchQueries?: ((result: NormalizedExecutionResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; + awaitRefetchQueries?: boolean; + update?: MutationUpdaterFunction; + onQueryUpdated?: OnQueryUpdated; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: MutationFetchPolicy; + keepRootFields?: boolean; + mutation: DocumentNode | TypedDocumentNode; + } & VariablesOption>; + // (undocumented) + export interface MutateResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; + } + // (undocumented) + export interface Options { + assumeImmutableResults?: boolean; + cache: ApolloCache; + // Warning: (ae-forgotten-export) The symbol "ClientAwarenessLink" needs to be exported by the entry point index.d.ts + // + // (undocumented) + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + dataMasking?: boolean; + // (undocumented) + defaultContext?: Partial; + defaultOptions?: ApolloClient.DefaultOptions; + devtools?: DevtoolsOptions; + // (undocumented) + documentTransform?: DocumentTransform; + // (undocumented) + enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; + // Warning: (ae-forgotten-export) The symbol "Incremental" needs to be exported by the entry point index.d.ts + incrementalHandler?: Incremental.Handler; + link: ApolloLink; + // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts + // + // (undocumented) + localState?: LocalState; + queryDeduplication?: boolean; + ssrForceFetchDelay?: number; + ssrMode?: boolean; + } + export type QueryOptions = { + query: DocumentNode | TypedDocumentNode; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + fetchPolicy?: FetchPolicy; + } & VariablesOption>; + // (undocumented) + export interface QueryResult { + data: TData | undefined; + error?: ErrorLike; + } + // (undocumented) + export type ReadFragmentOptions = Base.ReadFragmentOptions & VariablesOption; + // (undocumented) + export type ReadQueryOptions = Base.ReadQueryOptions & VariablesOption; + export interface RefetchQueriesOptions { + include?: RefetchQueriesInclude; + onQueryUpdated?: OnQueryUpdated | null; + optimistic?: boolean; + updateCache?: (cache: TCache) => void; + } + export interface RefetchQueriesResult extends Promise>, RefetchQueriesResult.AdditionalProperties { + } // (undocumented) - updateQuery(options: Cache_2.UpdateQueryOptions, update: (data: Unmasked | null) => Unmasked | null | void): Unmasked | null; + export namespace RefetchQueriesResult { + // (undocumented) + export interface AdditionalProperties { + queries: ObservableQuery[]; + results: InternalRefetchQueriesResult[]; + } + } // (undocumented) - abstract watch(watch: Cache_2.WatchOptions): () => void; - watchFragment(options: WatchFragmentOptions): Observable>; + export type SubscribeOptions = { + query: DocumentNode | TypedDocumentNode; + fetchPolicy?: FetchPolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + extensions?: Record; + } & VariablesOption>; + // (undocumented) + export interface SubscribeResult { + data: TData | undefined; + error?: ErrorLike; + extensions?: Record; + } // (undocumented) - abstract write(write: Cache_2.WriteOptions): Reference | undefined; + export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; + // (undocumented) + export type WatchFragmentResult = ApolloCache.WatchFragmentResult; + export type WatchQueryOptions = { + fetchPolicy?: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + initialFetchPolicy?: WatchQueryFetchPolicy; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode | TypedDocumentNode; + } & VariablesOption>; // (undocumented) - writeFragment({ id, data, fragment, fragmentName, ...options }: Cache_2.WriteFragmentOptions): Reference | undefined; + export type WriteFragmentOptions = Base.WriteFragmentOptions & VariablesOption; // (undocumented) - writeQuery({ id, data, ...options }: Cache_2.WriteQueryOptions): Reference | undefined; + export type WriteQueryOptions = Base.WriteQueryOptions & VariablesOption; } // @public -export class ApolloClient implements DataProxy { +export class ApolloClient { // (undocumented) __actionHookForDevTools(cb: () => any): void; - constructor(options: ApolloClientOptions); + constructor(options: ApolloClient.Options); // (undocumented) - __requestRaw(payload: GraphQLRequest): Observable; - // @deprecated - addResolvers(resolvers: Resolvers | Resolvers[]): void; + __requestRaw(request: ApolloLink.Request): Observable>; // (undocumented) - cache: ApolloCache; + cache: ApolloCache; clearStore(): Promise; // (undocumented) get defaultContext(): Partial; // (undocumented) - defaultOptions: DefaultOptions; - // Warning: (ae-forgotten-export) The symbol "DevtoolsOptions" needs to be exported by the entry point index.d.ts - // + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) - readonly devtoolsConfig: DevtoolsOptions; + readonly devtoolsConfig: ApolloClient.DevtoolsOptions; // @deprecated (undocumented) - disableNetworkFetches: boolean; + disableNetworkFetches: never; get documentTransform(): DocumentTransform; - extract(optimistic?: boolean): TCacheShape; + extract(optimistic?: boolean): unknown; // Warning: (ae-forgotten-export) The symbol "getApolloClientMemoryInternals" needs to be exported by the entry point index.d.ts getMemoryInternals?: typeof getApolloClientMemoryInternals; - getObservableQueries(include?: RefetchQueriesInclude): Map>; - // @deprecated - getResolvers(): Resolvers; + getObservableQueries(include?: RefetchQueriesInclude): Set>; // (undocumented) link: ApolloLink; - // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts - // - // (undocumented) - localState: LocalState; - mutate = DefaultContext, TCache extends ApolloCache = ApolloCache>(options: MutationOptions): Promise>>; + get localState(): LocalState | undefined; + set localState(localState: LocalState); + mutate(options: ApolloClient.MutateOptions): Promise>>; onClearStore(cb: () => Promise): () => void; onResetStore(cb: () => Promise): () => void; - get prioritizeCacheValues(): boolean; set prioritizeCacheValues(value: boolean); - query(options: QueryOptions): Promise>>; + get prioritizeCacheValues(): boolean; + query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) queryDeduplication: boolean; - readFragment(options: DataProxy.Fragment, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.Query, optimistic?: boolean): Unmasked | null; - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; - refetchQueries = ApolloCache, TResult = Promise>>(options: RefetchQueriesOptions): RefetchQueriesResult; - resetStore(): Promise[] | null>; - restore(serializedState: TCacheShape): ApolloCache; - setLink(newLink: ApolloLink): void; + readFragment(options: ApolloClient.ReadFragmentOptions): Unmasked | null; + // @deprecated + readFragment(options: ApolloClient.ReadFragmentOptions, optimistic: boolean): Unmasked | null; + readQuery(options: ApolloClient.ReadQueryOptions): Unmasked | null; // @deprecated - setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void; + readQuery(options: ApolloClient.ReadQueryOptions, + optimistic: boolean): Unmasked | null; // @deprecated - setResolvers(resolvers: Resolvers | Resolvers[]): void; + reFetchObservableQueries: (includeStandby?: boolean) => Promise[]>; + refetchObservableQueries(includeStandby?: boolean): Promise[]>; + refetchQueries>>(options: ApolloClient.RefetchQueriesOptions): ApolloClient.RefetchQueriesResult; + resetStore(): Promise[] | null>; + restore(serializedState: unknown): ApolloCache; + setLink(newLink: ApolloLink): void; stop(): void; - subscribe(options: SubscriptionOptions): Observable>>; - // (undocumented) - readonly typeDefs: ApolloClientOptions["typeDefs"]; + subscribe(options: ApolloClient.SubscribeOptions): SubscriptionObservable>>; // (undocumented) version: string; - watchFragment(options: WatchFragmentOptions): Observable>; - watchQuery(options: WatchQueryOptions): ObservableQuery; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; -} - -// @public (undocumented) -export interface ApolloClientOptions { - assumeImmutableResults?: boolean; - cache: ApolloCache; - // (undocumented) - clientAwareness?: { - name?: string; - version?: string; - }; - // @deprecated - connectToDevTools?: boolean; - // @deprecated (undocumented) - credentials?: string; - dataMasking?: boolean; - // (undocumented) - defaultContext?: Partial; - defaultOptions?: DefaultOptions; - devtools?: DevtoolsOptions; - // (undocumented) - documentTransform?: DocumentTransform; - // @deprecated (undocumented) - fragmentMatcher?: FragmentMatcher; - // @deprecated - headers?: Record; - link?: ApolloLink; - // @deprecated - name?: string; - queryDeduplication?: boolean; - // @deprecated (undocumented) - resolvers?: Resolvers | Resolvers[]; - ssrForceFetchDelay?: number; - ssrMode?: boolean; - // @deprecated (undocumented) - typeDefs?: string | string[] | DocumentNode | DocumentNode[]; - // @deprecated - uri?: string | UriFunction; - // @deprecated - version?: string; + watchFragment(options: ApolloClient.WatchFragmentOptions): Observable>>; + watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; + writeFragment(options: ApolloClient.WriteFragmentOptions): Reference | undefined; + writeQuery(options: ApolloClient.WriteQueryOptions): Reference | undefined; } -// Warning: (ae-forgotten-export) The symbol "ApolloConsumerProps" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const ApolloConsumer: ReactTypes.FC; - -// @public (undocumented) -interface ApolloConsumerProps { - // (undocumented) - children: (client: ApolloClient) => ReactTypes.ReactNode; -} +// @public @deprecated (undocumented) +export type ApolloClientOptions = ApolloClient.Options; // @public (undocumented) -export interface ApolloContextValue { - // (undocumented) - client?: ApolloClient; - // Warning: (ae-forgotten-export) The symbol "RenderPromises" needs to be exported by the entry point index.d.ts +export namespace ApolloLink { + // Warning: (ae-forgotten-export) The symbol "ApplyHKTImplementationWithDefault" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "NotImplementedHandler" needs to be exported by the entry point index.d.ts // // (undocumented) - renderPromises?: RenderPromises; -} - -// @public (undocumented) -export class ApolloError extends Error { - // Warning: (ae-forgotten-export) The symbol "ApolloErrorOptions" needs to be exported by the entry point index.d.ts - constructor({ graphQLErrors, protocolErrors, clientErrors, networkError, errorMessage, extraInfo, }: ApolloErrorOptions); - cause: ({ - readonly message: string; - extensions?: GraphQLErrorExtensions[] | GraphQLFormattedError["extensions"]; - } & Omit & Partial, "extensions">) | null; - // (undocumented) - clientErrors: ReadonlyArray; - // (undocumented) - extraInfo: any; - // (undocumented) - graphQLErrors: ReadonlyArray; - // (undocumented) - message: string; - // (undocumented) - name: string; - // (undocumented) - networkError: Error | ServerParseError | ServerError | null; - // (undocumented) - protocolErrors: ReadonlyArray; -} - -// @public (undocumented) -interface ApolloErrorOptions { - // (undocumented) - clientErrors?: ReadonlyArray; - // (undocumented) - errorMessage?: string; - // (undocumented) - extraInfo?: any; + export type AdditionalResultTypes, TExtensions = Record> = ApplyHKTImplementationWithDefault; // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - networkError?: Error | ServerParseError | ServerError | null; + export namespace DocumentationTypes { + export function ForwardFunction(operation: ApolloLink.Operation): Observable; + export function RequestHandler(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; + } + export interface ExecuteContext { + client: ApolloClient; + } + export type ForwardFunction = (operation: ApolloLink.Operation) => Observable; + export interface Operation { + readonly client: ApolloClient; + extensions: Record; + getContext: () => Readonly; + operationName: string | undefined; + operationType: OperationTypeNode; + query: DocumentNode; + setContext: { + (context: Partial): void; + (updateContext: (previousContext: Readonly) => Partial): void; + }; + variables: OperationVariables; + } + export interface OperationContext extends DefaultContext { + } + export interface Request { + context?: DefaultContext; + extensions?: Record; + query: DocumentNode; + variables?: OperationVariables; + } + export type RequestHandler = (operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction) => Observable; // (undocumented) - protocolErrors?: ReadonlyArray; + export type Result, TExtensions = Record> = FormattedExecutionResult | AdditionalResultTypes; } -// @public (undocumented) +// @public export class ApolloLink { - constructor(request?: RequestHandler); - // (undocumented) - static concat(first: ApolloLink | RequestHandler, second: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - concat(next: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) + constructor(request?: ApolloLink.RequestHandler); + // @deprecated + static concat(...links: ApolloLink[]): ApolloLink; + concat(...links: ApolloLink[]): ApolloLink; static empty(): ApolloLink; - // (undocumented) - static execute(link: ApolloLink, operation: GraphQLRequest): Observable; - // (undocumented) - static from(links: (ApolloLink | RequestHandler)[]): ApolloLink; - // @internal + static execute(link: ApolloLink, request: ApolloLink.Request, context: ApolloLink.ExecuteContext): Observable; + static from(links: ApolloLink[]): ApolloLink; + // @internal @deprecated getMemoryInternals?: () => unknown; - // @internal + // @internal @deprecated readonly left?: ApolloLink; - // @deprecated (undocumented) - protected onError(error: any, observer?: Observer): false | void; - // (undocumented) - request(operation: Operation, forward?: NextLink): Observable | null; - // @internal + request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable; + // @internal @deprecated readonly right?: ApolloLink; - // @deprecated (undocumented) - setOnError(fn: ApolloLink["onError"]): this; - // (undocumented) - static split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; - // (undocumented) - split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink; + static split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; + split(test: (op: ApolloLink.Operation) => boolean, left: ApolloLink, right?: ApolloLink): ApolloLink; } // @public (undocumented) @@ -297,41 +450,34 @@ export interface ApolloPayloadResult, TExtensions = // (undocumented) errors?: ReadonlyArray; // (undocumented) - payload: SingleExecutionResult | ExecutionPatchResult | null; -} - -// Warning: (ae-forgotten-export) The symbol "ApolloProviderProps" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export const ApolloProvider: ReactTypes.FC>; - -// @public (undocumented) -interface ApolloProviderProps { - // (undocumented) - children: ReactTypes.ReactNode | ReactTypes.ReactNode[] | null; - // (undocumented) - client: ApolloClient; + payload: FormattedExecutionResult | null; } -// @public (undocumented) -export interface ApolloQueryResult { - data: T; - error?: ApolloError; - errors?: ReadonlyArray; - // (undocumented) - loading: boolean; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - partial?: boolean; -} +// @public @deprecated (undocumented) +export type ApolloQueryResult["dataState"] = DataState["dataState"]> = ObservableQuery.Result; // @public (undocumented) export type ApolloReducerConfig = { dataIdFromObject?: KeyFieldsFunction; - addTypename?: boolean; }; +// Warning: (ae-forgotten-export) The symbol "HKT" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +type ApplyHKT = (fn & { + arg1: arg1; + arg2: arg2; + arg3: arg3; + arg4: arg4; +})["return"]; + +// Warning: (ae-forgotten-export) The symbol "ApplyHKT" needs to be exported by the entry point index.d.ts +// +// @internal @deprecated (undocumented) +type ApplyHKTImplementationWithDefault, arg1, arg2 = never, arg3 = never, arg4 = never> = ApplyHKT; + // @public type AsStoreObject; - -// @public (undocumented) -export interface BackgroundQueryHookOptions extends Pick, "client" | "variables" | "errorPolicy" | "context" | "canonizeResults" | "returnPartialData" | "refetchWritePolicy"> { +namespace BaseHttpLink { // (undocumented) - fetchPolicy?: BackgroundQueryHookFetchPolicy; + interface Body { + // (undocumented) + extensions?: Record; + // (undocumented) + operationName?: string; + // (undocumented) + query?: string; + // (undocumented) + variables?: Record; + } + interface ContextOptions { + credentials?: RequestCredentials; + fetchOptions?: RequestInit; + headers?: Record; + http?: BaseHttpLink.HttpOptions; + uri?: string | BaseHttpLink.UriFunction; + } + interface HttpOptions { + accept?: string[]; + includeExtensions?: boolean; + includeQuery?: boolean; + preserveHeaderCase?: boolean; + } + // Warning: (ae-forgotten-export) The symbol "BaseHttpLink" needs to be exported by the entry point index.d.ts + interface Options extends Shared.Options { + useGETForQueries?: boolean; + } // (undocumented) - queryKey?: string | number | any[]; - // @deprecated - skip?: boolean; -} - -// @public (undocumented) -type BackgroundQueryHookOptionsNoInfer = BackgroundQueryHookOptions, NoInfer_2>; - -// Warning: (ae-forgotten-export) The symbol "MutationSharedOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface BaseMutationOptions = ApolloCache> extends MutationSharedOptions { - client?: ApolloClient; - // @deprecated - ignoreResults?: boolean; - notifyOnNetworkStatusChange?: boolean; - onCompleted?: (data: MaybeMasked, clientOptions?: BaseMutationOptions) => void; - onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void; -} - -// Warning: (ae-forgotten-export) The symbol "SharedWatchQueryOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface BaseQueryOptions extends SharedWatchQueryOptions { - client?: ApolloClient; - context?: DefaultContext; - ssr?: boolean; + type Printer = (node: ASTNode, originalPrint: typeof print_2) => string; + // (undocumented) + namespace Shared { + interface Options { + credentials?: RequestCredentials; + fetch?: typeof fetch; + fetchOptions?: RequestInit; + headers?: Record; + includeExtensions?: boolean; + includeUnusedVariables?: boolean; + preserveHeaderCase?: boolean; + print?: BaseHttpLink.Printer; + uri?: string | BaseHttpLink.UriFunction; + } + } + // (undocumented) + type UriFunction = (operation: ApolloLink.Operation) => string; } -// @public @deprecated (undocumented) -export interface BaseSubscriptionOptions { - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - ignoreResults?: boolean; - onComplete?: () => void; - onData?: (options: OnDataOptions) => any; - onError?: (error: ApolloError) => void; - // @deprecated - onSubscriptionComplete?: () => void; - // @deprecated - onSubscriptionData?: (options: OnSubscriptionDataOptions) => any; - shouldResubscribe?: boolean | ((options: BaseSubscriptionOptions) => boolean); - skip?: boolean; - variables?: TVariables; +// @public +class BaseHttpLink extends ApolloLink { + constructor(options?: BaseHttpLink.Options); } // @public (undocumented) -interface Body_2 { - // (undocumented) - extensions?: Record; - // (undocumented) - operationName?: string; - // (undocumented) - query?: string; - // (undocumented) - variables?: Record; -} +type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; // @public (undocumented) -type BroadcastOptions = Pick, "optimistic" | "onWatchUpdated">; +export const build: "source" | "esm" | "cjs"; // @public (undocumented) namespace Cache_2 { // (undocumented) - interface BatchOptions, TUpdateResult = void> { + interface BatchOptions { // (undocumented) onWatchUpdated?: (this: TCache, watch: Cache_2.WatchOptions, diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult | undefined) => any; // (undocumented) @@ -425,9 +560,21 @@ namespace Cache_2 { update(cache: TCache): TUpdateResult; } // (undocumented) - interface DiffOptions extends Omit, "rootId"> { + interface DiffOptions extends Omit, "rootId"> { } // (undocumented) + type DiffResult = { + result: DataValue.Complete; + complete: true; + missing?: never; + fromOptimisticTransaction?: boolean; + } | { + result: DataValue.Partial | null; + complete: false; + missing?: MissingFieldError; + fromOptimisticTransaction?: boolean; + }; + // (undocumented) interface EvictOptions { // (undocumented) args?: Record; @@ -453,17 +600,35 @@ namespace Cache_2 { optimistic?: boolean; } // (undocumented) - interface ReadOptions extends DataProxy.Query { - // @deprecated - canonizeResults?: boolean; + interface ReadFragmentOptions { + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + id?: string; + optimistic?: boolean; + returnPartialData?: boolean; + variables?: TVariables; + } + // (undocumented) + interface ReadOptions { + id?: string; // (undocumented) optimistic: boolean; // (undocumented) previousResult?: any; + query: DocumentNode | TypedDocumentNode; // (undocumented) returnPartialData?: boolean; // (undocumented) rootId?: string; + variables?: TVariables; + } + // (undocumented) + interface ReadQueryOptions { + id?: string; + optimistic?: boolean; + query: DocumentNode | TypedDocumentNode; + returnPartialData?: boolean; + variables?: TVariables; } // (undocumented) interface ResetOptions { @@ -471,9 +636,15 @@ namespace Cache_2 { discardWatches?: boolean; } // (undocumented) - type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; + interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { + } + // (undocumented) + interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { + } + // (undocumented) + type WatchCallback = (diff: Cache_2.DiffResult, lastDiff?: Cache_2.DiffResult) => void; // (undocumented) - interface WatchOptions extends DiffOptions { + interface WatchOptions extends DiffOptions { // (undocumented) callback: WatchCallback; // (undocumented) @@ -484,21 +655,36 @@ namespace Cache_2 { watcher?: object; } // (undocumented) - interface WriteOptions extends Omit, "id">, Omit, "data"> { + interface WriteFragmentOptions { + broadcast?: boolean; + data: Unmasked; + fragment: DocumentNode | TypedDocumentNode; + fragmentName?: string; + id?: string; + overwrite?: boolean; + variables?: TVariables; + } + // (undocumented) + interface WriteOptions { + broadcast?: boolean; // (undocumented) dataId?: string; + overwrite?: boolean; + query: DocumentNode | TypedDocumentNode; // (undocumented) - result: Unmasked; + result: Unmasked; + variables?: TVariables; } - import DiffResult = DataProxy.DiffResult; - import ReadQueryOptions = DataProxy.ReadQueryOptions; - import ReadFragmentOptions = DataProxy.ReadFragmentOptions; - import WriteQueryOptions = DataProxy.WriteQueryOptions; - import WriteFragmentOptions = DataProxy.WriteFragmentOptions; - import UpdateQueryOptions = DataProxy.UpdateQueryOptions; - import UpdateFragmentOptions = DataProxy.UpdateFragmentOptions; - import Fragment = DataProxy.Fragment; -} + // (undocumented) + interface WriteQueryOptions { + broadcast?: boolean; + data: Unmasked; + id?: string; + overwrite?: boolean; + query: DocumentNode | TypedDocumentNode; + variables?: TVariables; + } +} export { Cache_2 as Cache } // @public (undocumented) @@ -516,16 +702,6 @@ class CacheGroup { resetCaching(): void; } -// @public (undocumented) -const enum CacheWriteBehavior { - // (undocumented) - FORBID = 0, - // (undocumented) - MERGE = 2, - // (undocumented) - OVERWRITE = 1 -} - // @public (undocumented) type CanReadFunction = (value: StoreValue) => boolean; @@ -533,74 +709,94 @@ type CanReadFunction = (value: StoreValue) => boolean; export const checkFetcher: (fetcher: typeof fetch | undefined) => void; // @public (undocumented) -export type ClientParseError = InvariantError & { - parseError: Error; -}; - -// Warning: (ae-forgotten-export) The symbol "Prettify" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeUnions" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "ExtractByMatchingTypeNames" needs to be exported by the entry point index.d.ts -// -// @public -type CombineByTypeName = { - [TypeName in NonNullable]: Prettify>>; -}[NonNullable]; +namespace ClientAwarenessLink { + // (undocumented) + interface ClientAwarenessOptions { + name?: string; + transport?: "headers" | false; + version?: string; + } + interface ContextOptions { + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + } + // (undocumented) + interface EnhancedClientAwarenessOptions { + transport?: "extensions" | false; + } + // (undocumented) + interface Options { + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + enhancedClientAwareness?: ClientAwarenessLink.EnhancedClientAwarenessOptions; + } +} -// Warning: (ae-forgotten-export) The symbol "CombineByTypeName" needs to be exported by the entry point index.d.ts -// // @public -type CombineIntersection = Exclude | CombineByTypeName>; - -// @public (undocumented) -export type CommonOptions = TOptions & { - client?: ApolloClient; -}; +class ClientAwarenessLink extends ApolloLink { + constructor(options?: ClientAwarenessLink.Options); +} // @public (undocumented) -class Concast extends Observable { - // Warning: (ae-forgotten-export) The symbol "MaybeAsync" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "ConcastSourcesIterable" needs to be exported by the entry point index.d.ts - constructor(sources: MaybeAsync> | Subscriber); - // (undocumented) - addObserver(observer: Observer): void; - // Warning: (ae-forgotten-export) The symbol "NextResultListener" needs to be exported by the entry point index.d.ts - // +export namespace CombinedGraphQLErrors { // (undocumented) - beforeNext(callback: NextResultListener): void; - // (undocumented) - cancel: (reason: any) => void; - // (undocumented) - readonly promise: Promise; + export namespace DocumentationTypes { + export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; + // (undocumented) + export interface InstanceProperties { + readonly data: Record | null | undefined; + readonly errors: ReadonlyArray; + readonly extensions: Record | undefined; + } + export function is(error: unknown): boolean; + } + export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; // (undocumented) - removeObserver(observer: Observer): void; + export interface MessageFormatterOptions { + defaultFormatMessage: (errors: ReadonlyArray) => string; + result: ApolloLink.Result; + } } -// Warning: (ae-forgotten-export) The symbol "Source" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ConcastSourcesIterable = Iterable>; +// @public +export class CombinedGraphQLErrors extends Error { + constructor(result: FormattedExecutionResult); + constructor(result: ApolloLink.Result, errors: ReadonlyArray); + readonly data: Record | null | undefined; + readonly errors: ReadonlyArray; + readonly extensions: Record | undefined; + static formatMessage: CombinedGraphQLErrors.MessageFormatter; + static is(error: unknown): error is CombinedGraphQLErrors; +} // @public (undocumented) -export const concat: typeof ApolloLink.concat; +export namespace CombinedProtocolErrors { + // (undocumented) + export namespace DocumentationTypes { + export function formatMessage(errors: ReadonlyArray, options: MessageFormatterOptions): string; + // (undocumented) + export interface InstanceProperties { + readonly errors: ReadonlyArray; + } + } + export type MessageFormatter = (errors: ReadonlyArray, options: MessageFormatterOptions) => string; + // (undocumented) + export interface MessageFormatterOptions { + defaultFormatMessage: (errors: ReadonlyArray) => string; + } +} -// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "Exact" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type ContainsFragmentsRefs = true extends (IsAny) ? false : TData extends object ? Exact extends Seen ? false : " $fragmentRefs" extends keyof RemoveIndexSignature ? true : ContainsFragmentsRefs> : false; +// @public +export class CombinedProtocolErrors extends Error { + constructor(protocolErrors: Array | ReadonlyArray); + readonly errors: ReadonlyArray; + static formatMessage: CombinedProtocolErrors.MessageFormatter; + static is(error: unknown): error is CombinedProtocolErrors; +} -// @public (undocumented) -export const createHttpLink: (linkOptions?: HttpOptions) => ApolloLink; +// @public @deprecated (undocumented) +export const concat: typeof ApolloLink.concat; -// @public -export function createQueryPreloader(client: ApolloClient): PreloadQueryFunction; +// @public @deprecated (undocumented) +export const createHttpLink: (options?: HttpLink.Options) => HttpLink; // @public @deprecated (undocumented) export const createSignalIfSupported: () => { @@ -612,71 +808,26 @@ export const createSignalIfSupported: () => { }; // @public (undocumented) -export interface DataMasking { -} +export type DataState = { + data: DataValue.Complete; + dataState: "complete"; +} | { + data: DataValue.Streaming; + dataState: "streaming"; +} | { + data: DataValue.Partial; + dataState: "partial"; +} | { + data: undefined; + dataState: "empty"; +}; // @public (undocumented) -export namespace DataProxy { - // (undocumented) - export type DiffResult = { - result?: T; - complete?: boolean; - missing?: MissingFieldError[]; - fromOptimisticTransaction?: boolean; - }; - // (undocumented) - export interface Fragment { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - id?: string; - variables?: TVariables; - } - // (undocumented) - export interface Query { - id?: string; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; - } - // (undocumented) - export interface ReadFragmentOptions extends Fragment { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface ReadQueryOptions extends Query { - // @deprecated - canonizeResults?: boolean; - optimistic?: boolean; - returnPartialData?: boolean; - } - // (undocumented) - export interface UpdateFragmentOptions extends Omit & WriteFragmentOptions, "data"> { - } - // (undocumented) - export interface UpdateQueryOptions extends Omit & WriteQueryOptions, "data"> { - } - // (undocumented) - export interface WriteFragmentOptions extends Fragment, WriteOptions { - } - // (undocumented) - export interface WriteOptions { - broadcast?: boolean; - data: Unmasked; - overwrite?: boolean; - } - // (undocumented) - export interface WriteQueryOptions extends Query, WriteOptions { - } -} - -// @public -export interface DataProxy { - readFragment(options: DataProxy.ReadFragmentOptions, optimistic?: boolean): Unmasked | null; - readQuery(options: DataProxy.ReadQueryOptions, optimistic?: boolean): Unmasked | null; - writeFragment(options: DataProxy.WriteFragmentOptions): Reference | undefined; - writeQuery(options: DataProxy.WriteQueryOptions): Reference | undefined; +export namespace DataValue { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + export type Complete = ApplyHKTImplementationWithDefault; + export type Partial = ApplyHKTImplementationWithDefault; + export type Streaming = ApplyHKTImplementationWithDefault; } // Warning: (ae-forgotten-export) The symbol "DeepPartialPrimitive" needs to be exported by the entry point index.d.ts @@ -686,7 +837,7 @@ export interface DataProxy { // Warning: (ae-forgotten-export) The symbol "DeepPartialReadonlySet" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DeepPartialObject" needs to be exported by the entry point index.d.ts // -// @public (undocumented) +// @public type DeepPartial = T extends DeepPartialPrimitive ? T : T extends Map ? DeepPartialMap : T extends ReadonlyMap ? DeepPartialReadonlyMap : T extends Set ? DeepPartialSet : T extends ReadonlySet ? DeepPartialReadonlySet : T extends (...args: any[]) => unknown ? T | undefined : T extends object ? T extends (ReadonlyArray) ? TItem[] extends (T) ? readonly TItem[] extends T ? ReadonlyArray> : Array> : DeepPartialObject : DeepPartialObject : unknown; // Warning: (ae-forgotten-export) The symbol "DeepPartial" needs to be exported by the entry point index.d.ts @@ -714,30 +865,24 @@ type DeepPartialReadonlySet = {} & ReadonlySet>; type DeepPartialSet = {} & Set>; // @public (undocumented) -interface DefaultContext extends Record { +export interface DefaultContext extends Record { + // (undocumented) + clientAwareness?: ClientAwarenessLink.ClientAwarenessOptions; + queryDeduplication?: boolean; } -export { DefaultContext as Context } -export { DefaultContext } // Warning: (ae-forgotten-export) The symbol "KeyFieldsContext" needs to be exported by the entry point index.d.ts // // @public (undocumented) export function defaultDataIdFromObject({ __typename, id, _id }: Readonly, context?: KeyFieldsContext): string | undefined; -// @public (undocumented) -export interface DefaultOptions { - // (undocumented) - mutate?: Partial>; - // (undocumented) - query?: Partial>; - // (undocumented) - watchQuery?: Partial>; -} +// @public @deprecated (undocumented) +export type DefaultOptions = ApolloClient.DefaultOptions; -// Warning: (ae-forgotten-export) The symbol "Printer" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "BaseHttpLink" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export const defaultPrinter: Printer; +export const defaultPrinter: BaseHttpLink.Printer; // @public (undocumented) interface DeleteModifier { @@ -748,11 +893,8 @@ interface DeleteModifier { // @public (undocumented) const _deleteModifier: unique symbol; -// @public (undocumented) -interface DevtoolsOptions { - enabled?: boolean; - name?: string; -} +// @public @deprecated (undocumented) +export type DevtoolsOptions = ApolloClient.DevtoolsOptions; // @public (undocumented) export type DiffQueryAgainstStoreOptions = ReadQueryOptions & { @@ -763,31 +905,24 @@ export { disableExperimentalFragmentVariables } export { disableFragmentWarnings } -// @public (undocumented) -type DistributedRequiredExclude = T extends any ? Required extends Required ? Required extends Required ? never : T : T : T; - export { DocumentNode } -// @public (undocumented) +// @public export class DocumentTransform { // Warning: (ae-forgotten-export) The symbol "TransformFn" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "DocumentTransformOptions" needs to be exported by the entry point index.d.ts constructor(transform: TransformFn, options?: DocumentTransformOptions); - // (undocumented) concat(otherTransform: DocumentTransform): DocumentTransform; - // (undocumented) static identity(): DocumentTransform; - // @internal + // @internal @deprecated readonly left?: DocumentTransform; resetCache(): void; - // @internal + // @internal @deprecated readonly right?: DocumentTransform; - // (undocumented) static split(predicate: (document: DocumentNode) => boolean, left: DocumentTransform, right?: DocumentTransform): DocumentTransform & { left: DocumentTransform; right: DocumentTransform; }; - // (undocumented) transformDocument(document: DocumentNode): DocumentNode; } @@ -800,18 +935,7 @@ interface DocumentTransformOptions { getCacheKey?: (document: DocumentNode) => DocumentTransformCacheKey | undefined; } -// @public (undocumented) -enum DocumentType_2 { - // (undocumented) - Mutation = 1, - // (undocumented) - Query = 0, - // (undocumented) - Subscription = 2 -} -export { DocumentType_2 as DocumentType } - -// @public (undocumented) +// @public @deprecated (undocumented) export const empty: typeof ApolloLink.empty; export { enableExperimentalFragmentVariables } @@ -862,14 +986,14 @@ abstract class EntityStore implements NormalizedCache { // (undocumented) protected lookup(dataId: string, dependOnExistence?: boolean): StoreObject | undefined; makeCacheKey(document: DocumentNode, callback: Cache_2.WatchCallback, details: string): object; - makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined, canonizeResults: boolean): object; + makeCacheKey(selectionSet: SelectionSetNode, parent: string | StoreObject, varString: string | undefined): object; makeCacheKey(field: FieldNode, array: readonly any[], varString: string | undefined): object; // @deprecated (undocumented) makeCacheKey(...args: any[]): object; // (undocumented) merge(older: string | StoreObject, newer: StoreObject | string): void; // (undocumented) - modify(dataId: string, fields: Modifier | Modifiers>): boolean; + modify(dataId: string, fields: Modifier | Modifiers>, exact: boolean): boolean; // Warning: (ae-forgotten-export) The symbol "Policies" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -882,6 +1006,12 @@ abstract class EntityStore implements NormalizedCache { replace(newData: NormalizedCacheObject | null): void; // (undocumented) retain(rootId: string): number; + // Warning: (ae-forgotten-export) The symbol "Root" needs to be exported by the entry point index.d.ts + // + // (undocumented) + static Root: typeof Root; + // (undocumented) + get supportsResultCaching(): boolean; // (undocumented) toObject(): NormalizedCacheObject; // Warning: (ae-forgotten-export) The symbol "ToReferenceFunction" needs to be exported by the entry point index.d.ts @@ -890,84 +1020,25 @@ abstract class EntityStore implements NormalizedCache { toReference: ToReferenceFunction; } -// @public (undocumented) -namespace EntityStore { - // (undocumented) - class Root extends EntityStore { - constructor({ policies, resultCaching, seed, }: { - policies: Policies; - resultCaching?: boolean; - seed?: NormalizedCacheObject; - }); - // (undocumented) - addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; - // (undocumented) - getStorage(): StorageType; - // (undocumented) - removeLayer(): Root; - // (undocumented) - readonly storageTrie: Trie; - // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts - // - // (undocumented) - readonly stump: Stump; - } -} - // @public -export type ErrorPolicy = "none" | "ignore" | "all"; - -// @public (undocumented) -type Exact = (x: T) => T; - -// @public (undocumented) -export const execute: typeof ApolloLink.execute; - -// Warning: (ae-forgotten-export) The symbol "ExecutionPatchResultBase" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export interface ExecutionPatchIncrementalResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data?: never; - // (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -export interface ExecutionPatchInitialResult, TExtensions = Record> extends ExecutionPatchResultBase { - // (undocumented) - data: TData | null | undefined; +export interface ErrorLike { // (undocumented) - errors?: ReadonlyArray; + message: string; // (undocumented) - extensions?: TExtensions; + name: string; // (undocumented) - incremental?: never; + stack?: string; } -// @public @deprecated (undocumented) -export type ExecutionPatchResult, TExtensions = Record> = ExecutionPatchInitialResult | ExecutionPatchIncrementalResult; +// @public +export type ErrorPolicy = "none" | "ignore" | "all"; // @public (undocumented) -interface ExecutionPatchResultBase { - // (undocumented) - hasNext?: boolean; -} - -// @public -type ExtractByMatchingTypeNames = Union extends any ? TypeName extends NonNullable ? Omit & { - [K in keyof Union as K extends "__typename" ? K : never]: TypeName; -} : never : never; +export const execute: typeof ApolloLink.execute; // @public (undocumented) export const fallbackHttpConfig: { - http: HttpQueryOptions; + http: BaseHttpLink.HttpOptions; headers: { accept: string; "content-type": string; @@ -977,39 +1048,14 @@ export const fallbackHttpConfig: { }; }; -// @public (undocumented) -type FetchMoreFunction = (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TVariables; - }) => Unmasked; -}) => Promise>>; - -// @public (undocumented) -export interface FetchMoreOptions { - // (undocumented) - updateQuery?: (previousQueryResult: TData, options: { - fetchMoreResult?: TData; - variables?: TVariables; - }) => TData; -} - -// @public (undocumented) -export interface FetchMoreQueryOptions { - // (undocumented) - context?: DefaultContext; - query?: DocumentNode | TypedDocumentNode; - variables?: Partial; -} - // @public -export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache" | "standby"; +export type FetchPolicy = "cache-first" | "network-only" | "cache-only" | "no-cache"; -// @public (undocumented) -export type FetchResult, TContext = Record, TExtensions = Record> = SingleExecutionResult | ExecutionPatchResult; +// @public @deprecated (undocumented) +export type FetchResult, TExtensions = Record> = ApolloLink.Result; // @public (undocumented) -export interface FieldFunctionOptions, TVars = Record> { +export interface FieldFunctionOptions, TVariables extends OperationVariables = Record> { // (undocumented) args: TArgs | null; // (undocumented) @@ -1037,7 +1083,7 @@ export interface FieldFunctionOptions, TVars = Recor // (undocumented) toReference: ToReferenceFunction; // (undocumented) - variables?: TVars; + variables?: TVariables; } // @public (undocumented) @@ -1077,18 +1123,15 @@ type FieldValueGetter = EntityStore["getFieldValue"]; // @public (undocumented) type FlavorableWriteContext = Pick; -// @public +// @internal @deprecated interface FragmentMap { // (undocumented) [fragmentName: string]: FragmentDefinitionNode; } -// @public (undocumented) +// @internal @deprecated (undocumented) type FragmentMapFunction = (fragmentName: string) => FragmentDefinitionNode | null; -// @public (undocumented) -export type FragmentMatcher = (rootValue: any, typeCondition: string, context: any) => boolean; - // @public (undocumented) interface FragmentRegistryAPI { // (undocumented) @@ -1101,37 +1144,22 @@ interface FragmentRegistryAPI { transform(document: D): D; } -// @public (undocumented) -export type FragmentType = [ -TData -] extends [{ - " $fragmentName"?: infer TKey; -}] ? TKey extends string ? { - " $fragmentRefs"?: { - [key in TKey]: TData; - }; -} : never : never; - -// @public (undocumented) -type From = StoreObject | Reference | FragmentType> | string | null; - -// @public (undocumented) -export const from: typeof ApolloLink.from; - -// @public @deprecated (undocumented) -export function fromError(errorValue: any): Observable; +// Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts +// +// @public +export type FragmentType = ApplyHKTImplementationWithDefault; // @public @deprecated (undocumented) -export function fromPromise(promise: Promise): Observable; +export const from: typeof ApolloLink.from; -// @internal +// @internal @deprecated const getApolloCacheMemoryInternals: (() => { cache: { fragmentQueryDocuments: number | undefined; }; }) | undefined; -// @internal +// @internal @deprecated const getApolloClientMemoryInternals: (() => { limits: { [k: string]: number; @@ -1154,7 +1182,6 @@ const getApolloClientMemoryInternals: (() => { transform: number | undefined; } | undefined; print: number | undefined; - parser: number | undefined; canonicalStringify: number | undefined; links: unknown[]; queryManager: { @@ -1167,9 +1194,11 @@ const getApolloClientMemoryInternals: (() => { }) | undefined; // @public (undocumented) -export function getApolloContext(): ReactTypes.Context; +export type GetDataState["dataState"]> = Extract, { + dataState: TState; +}>; -// @internal +// @internal @deprecated const getInMemoryCacheMemoryInternals: (() => { addTypenameDocumentTransform: { cache: number; @@ -1191,18 +1220,21 @@ const getInMemoryCacheMemoryInternals: (() => { export { gql } -// @public (undocumented) -export interface GraphQLRequest> { +// @public @deprecated (undocumented) +export type GraphQLRequest = ApolloLink.Request; + +// @beta +interface HKT { // (undocumented) - context?: DefaultContext; + arg1: unknown; // (undocumented) - extensions?: Record; + arg2: unknown; // (undocumented) - operationName?: string; + arg3: unknown; // (undocumented) - query: DocumentNode; + arg4: unknown; // (undocumented) - variables?: TVariables; + return: unknown; } // @public (undocumented) @@ -1212,40 +1244,22 @@ interface HttpConfig { // (undocumented) headers?: Record; // (undocumented) - http?: HttpQueryOptions; + http?: BaseHttpLink.HttpOptions; // (undocumented) options?: any; } // @public (undocumented) -export class HttpLink extends ApolloLink { - constructor(options?: HttpOptions); - // (undocumented) - options: HttpOptions; -} - -// @public (undocumented) -export interface HttpOptions { - credentials?: string; - fetch?: typeof fetch; - fetchOptions?: any; - headers?: Record; - includeExtensions?: boolean; - includeUnusedVariables?: boolean; - preserveHeaderCase?: boolean; - print?: Printer; - uri?: string | UriFunction; - useGETForQueries?: boolean; +export namespace HttpLink { + export interface ContextOptions extends BaseHttpLink.ContextOptions, ClientAwarenessLink.ContextOptions { + } + export interface Options extends BaseHttpLink.Options, ClientAwarenessLink.Options { + } } -// @public (undocumented) -interface HttpQueryOptions { - // (undocumented) - includeExtensions?: boolean; - // (undocumented) - includeQuery?: boolean; - // (undocumented) - preserveHeaderCase?: boolean; +// @public +export class HttpLink extends ApolloLink { + constructor(options?: HttpLink.Options); } // @public (undocumented) @@ -1261,16 +1275,6 @@ export interface IdGetterObj extends Object { _id?: string; } -// @public (undocumented) -export interface IDocumentDefinition { - // (undocumented) - name: string; - // (undocumented) - type: DocumentType_2; - // (undocumented) - variables: ReadonlyArray; -} - // @public (undocumented) interface IgnoreModifier { // (undocumented) @@ -1280,22 +1284,43 @@ interface IgnoreModifier { // @public (undocumented) const _ignoreModifier: unique symbol; -// @public @deprecated (undocumented) -export interface IncrementalPayload { +// @public (undocumented) +namespace Incremental { + // @internal @deprecated (undocumented) + interface Handler = Record> { + // (undocumented) + extractErrors: (result: ApolloLink.Result) => readonly GraphQLFormattedError[] | undefined | void; + // (undocumented) + isIncrementalResult: (result: ApolloLink.Result) => result is Chunk; + // (undocumented) + prepareRequest: (request: ApolloLink.Request) => ApolloLink.Request; + // Warning: (ae-forgotten-export) The symbol "Incremental" needs to be exported by the entry point index.d.ts + // + // (undocumented) + startRequest: >(request: { + query: DocumentNode; + }) => IncrementalRequest; + } // (undocumented) - data: TData | null; + interface IncrementalRequest, TData> { + // (undocumented) + handle: (cacheData: TData | DeepPartial | undefined | null, chunk: Chunk) => FormattedExecutionResult; + // (undocumented) + hasNext: boolean; + } // (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // (undocumented) - label?: string; - // (undocumented) - path: Path; + type Path = ReadonlyArray; } // @public (undocumented) -export class InMemoryCache extends ApolloCache { +type InferContextValueFromResolvers = TResolvers extends { + [typename: string]: infer TFieldResolvers; +} ? TFieldResolvers extends ({ + [field: string]: LocalState.Resolver; +}) ? unknown extends TContext ? DefaultContext : TContext : DefaultContext : DefaultContext; + +// @public (undocumented) +export class InMemoryCache extends ApolloCache { constructor(config?: InMemoryCacheConfig); // (undocumented) readonly assumeImmutableResults = true; @@ -1308,21 +1333,20 @@ export class InMemoryCache extends ApolloCache { // (undocumented) protected config: InMemoryCacheConfig; // (undocumented) - diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; + diff(options: Cache_2.DiffOptions): Cache_2.DiffResult; // (undocumented) evict(options: Cache_2.EvictOptions): boolean; // (undocumented) extract(optimistic?: boolean): NormalizedCacheObject; // (undocumented) - fragmentMatches(fragment: InlineFragmentNode, typename: string): boolean; + fragmentMatches(fragment: InlineFragmentNode | FragmentDefinitionNode, typename: string): boolean; // (undocumented) gc(options?: { resetResultCache?: boolean; - resetResultIdentities?: boolean; }): string[]; // Warning: (ae-forgotten-export) The symbol "getInMemoryCacheMemoryInternals" needs to be exported by the entry point index.d.ts // - // @internal + // @internal @deprecated getMemoryInternals?: typeof getInMemoryCacheMemoryInternals; // (undocumented) identify(object: StoreObject | Reference): string | undefined; @@ -1337,7 +1361,11 @@ export class InMemoryCache extends ApolloCache { // (undocumented) readonly policies: Policies; // (undocumented) - read(options: Cache_2.ReadOptions): T | null; + read(options: Cache_2.ReadOptions & { + returnPartialData: true; + }): TData | DeepPartial | null; + // (undocumented) + read(options: Cache_2.ReadOptions): TData | null; // (undocumented) release(rootId: string, optimistic?: boolean): number; // (undocumented) @@ -1351,23 +1379,19 @@ export class InMemoryCache extends ApolloCache { // (undocumented) transformDocument(document: DocumentNode): DocumentNode; // (undocumented) - watch(watch: Cache_2.WatchOptions): () => void; + watch(watch: Cache_2.WatchOptions): () => void; // (undocumented) - write(options: Cache_2.WriteOptions): Reference | undefined; + write(options: Cache_2.WriteOptions): Reference | undefined; } // @public (undocumented) export interface InMemoryCacheConfig extends ApolloReducerConfig { - // @deprecated - canonizeResults?: boolean; // Warning: (ae-forgotten-export) The symbol "FragmentRegistryAPI" needs to be exported by the entry point index.d.ts // // (undocumented) fragments?: FragmentRegistryAPI; // (undocumented) possibleTypes?: PossibleTypesMap; - // @deprecated (undocumented) - resultCacheMaxSize?: number; // (undocumented) resultCaching?: boolean; // (undocumented) @@ -1383,7 +1407,7 @@ export type InternalRefetchQueriesInclude = InternalRefetchQueryDescriptor[] | R export type InternalRefetchQueriesMap = Map, InternalRefetchQueriesResult>; // @public (undocumented) -export interface InternalRefetchQueriesOptions, TResult> extends Omit, "include"> { +export interface InternalRefetchQueriesOptions extends Omit, "include"> { // (undocumented) include?: InternalRefetchQueriesInclude; // (undocumented) @@ -1391,121 +1415,16 @@ export interface InternalRefetchQueriesOptions, } // @public (undocumented) -export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; +export type InternalRefetchQueriesResult = TResult extends boolean ? Promise> : TResult; // @public (undocumented) -export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | QueryOptions; - -// @public @deprecated (undocumented) -export interface InteropApolloQueryResult { - data: T; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated (undocumented) - loading: boolean; - // @deprecated (undocumented) - networkStatus: NetworkStatus; - // @deprecated (undocumented) - partial?: boolean; -} - -// @public @deprecated (undocumented) -export type InteropExecutionPatchResult, TExtensions = Record> = InteropMutationExecutionPatchInitialResult | InteropMutationExecutionPatchIncrementalResult; - -// @public @deprecated (undocumented) -export interface InteropLazyQueryExecResult extends QueryResult { - // @deprecated - called: boolean; - // @deprecated - client: ApolloClient; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // @deprecated - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }) => Promise>>; - // @deprecated - loading: boolean; - // @deprecated - networkStatus: NetworkStatus; - // @deprecated - observable: ObservableQuery; - // @deprecated - previousData?: MaybeMasked; - // @deprecated - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - // @deprecated - startPolling: (pollInterval: number) => void; - // @deprecated - stopPolling: () => void; - // @deprecated - subscribeToMore: SubscribeToMoreFunction; - // @deprecated - updateQuery: (mapFn: UpdateQueryMapFn) => void; - // @deprecated - variables: TVariables | undefined; -} - -// Warning: (ae-forgotten-export) The symbol "InteropSingleExecutionResult" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -export type InteropMutateResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - -// @public @deprecated (undocumented) -export interface InteropMutationExecutionPatchIncrementalResult, TExtensions = Record> { - // (undocumented) - data?: never; - // @deprecated (undocumented) - errors?: never; - // (undocumented) - extensions?: never; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: IncrementalPayload[]; -} - -// @public @deprecated (undocumented) -export interface InteropMutationExecutionPatchInitialResult, TExtensions = Record> { - // (undocumented) - data: TData | null | undefined; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; - // @deprecated (undocumented) - hasNext?: boolean; - // @deprecated (undocumented) - incremental?: never; -} - -// @public @deprecated (undocumented) -export interface InteropQueryResult extends QueryResult { - // @deprecated - called: boolean; -} +export type InternalRefetchQueryDescriptor = RefetchQueryDescriptor | ApolloClient.QueryOptions; -// @public @deprecated (undocumented) -interface InteropSingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // @deprecated (undocumented) - context?: TContext; - // (undocumented) - data?: TData | null; - // @deprecated (undocumented) - errors?: ReadonlyArray; - // (undocumented) - extensions?: TExtensions; +// @public (undocumented) +export namespace InternalTypes { + export type { NextFetchPolicyContext, QueryManager }; } -// @public @deprecated (undocumented) -export type InteropSubscribeResult, TContext = DefaultContext, TExtensions = Record> = InteropSingleExecutionResult | InteropExecutionPatchResult; - // @public (undocumented) interface InvalidateModifier { // (undocumented) @@ -1515,24 +1434,15 @@ interface InvalidateModifier { // @public (undocumented) const _invalidateModifier: unique symbol; -// @public (undocumented) +// @internal @deprecated (undocumented) type IsAny = 0 extends 1 & T ? true : false; -// @public @deprecated (undocumented) -export function isApolloError(err: Error): err is ApolloError; - // @public export function isNetworkRequestSettled(networkStatus?: NetworkStatus): boolean; -// @public (undocumented) +// @public export function isReference(obj: any): obj is Reference; -// Warning: (ae-forgotten-export) The symbol "UnionToIntersection" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnionForAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type IsStrictlyAny = UnionToIntersection> extends never ? true : false; - // @public (undocumented) type KeyArgsFunction = (args: Record | null, context: { typename: string; @@ -1565,7 +1475,7 @@ class Layer extends EntityStore { // (undocumented) findChildRefIds(dataId: string): Record; // (undocumented) - getStorage(): StorageType; + getStorage(...args: Parameters): StorageType; // (undocumented) readonly group: CacheGroup; // (undocumented) @@ -1580,122 +1490,131 @@ class Layer extends EntityStore { toObject(): NormalizedCacheObject; } -// @public (undocumented) -export type LazyQueryExecFunction = (options?: Partial>) => Promise>; - -// @public (undocumented) -export interface LazyQueryHookExecOptions extends LazyQueryHookOptions { - // (undocumented) - query?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface LazyQueryHookOptions extends BaseQueryOptions { - // @deprecated - context?: DefaultContext; - // @internal @deprecated (undocumented) - defaultOptions?: Partial>; - // @deprecated - initialFetchPolicy?: WatchQueryFetchPolicy; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; -} - -// @public @deprecated (undocumented) -export type LazyQueryResult = QueryResult; - -// @public (undocumented) -export type LazyQueryResultTuple = [ -execute: LazyQueryExecFunction, -result: QueryResult -]; - -// @public (undocumented) -export type LoadableQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface LoadableQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: LoadableQueryHookFetchPolicy; - queryKey?: string | number | any[]; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; -} - -// Warning: (ae-forgotten-export) The symbol "OnlyRequiredProperties" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type LoadQueryFunction = (...args: [TVariables] extends [never] ? [] : {} extends OnlyRequiredProperties ? [variables?: TVariables] : [variables: TVariables]) => void; +// @public +export const LinkError: { + is: (error: unknown) => boolean; +}; // @public (undocumented) -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?: TVars, context?: {}): Promise; - // (undocumented) - addResolvers(resolvers: Resolvers | Resolvers[]): void; - // (undocumented) - clientQuery(document: DocumentNode): DocumentNode | null; +namespace LocalState { + // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts + // // (undocumented) - getFragmentMatcher(): FragmentMatcher | undefined; + type ContextFunction = (options: ContextFunctionOptions) => TContext; // (undocumented) - getResolvers(): Resolvers; + interface ContextFunctionOptions { + // (undocumented) + client: ApolloClient; + // (undocumented) + document: DocumentNode; + // (undocumented) + phase: "exports" | "resolve"; + // (undocumented) + requestContext: DefaultContext; + // (undocumented) + variables: OperationVariables; + } + // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "MaybeRequireContextFunction" needs to be exported by the entry point index.d.ts + type Options = { + context?: ContextFunction; + resolvers?: TResolvers; + } & MaybeRequireContextFunction; + // (undocumented) + type Path = Array; + type Resolver> = (rootValue: TParent, args: TArgs, context: { + requestContext: TContext; + client: ApolloClient; + phase: "exports" | "resolve"; + }, info: { + field: FieldNode; + fragmentMap: FragmentMap; + path: Path; + }) => TResult | Promise; + interface Resolvers { + // (undocumented) + [typename: string]: { + [field: string]: Resolver; + }; + } + // Warning: (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts + // // (undocumented) - prepareContext(context?: Record): { - cache: ApolloCache; - getCacheKey(obj: StoreObject): string | undefined; - }; + type RootValueFunction = (context: RootValueFunctionContext) => TRootValue; // (undocumented) - runResolvers({ document, remoteResult, context, variables, onlyRunForcedResolvers, }: { - document: DocumentNode | null; - remoteResult: FetchResult; - context?: Record; - variables?: Record; + interface RootValueFunctionContext { + // (undocumented) + client: ApolloClient; + // (undocumented) + context: DefaultContext; + // (undocumented) + document: DocumentNode; + // (undocumented) + phase: "exports" | "resolve"; + // (undocumented) + variables: OperationVariables; + } +} + +// Warning: (ae-forgotten-export) The symbol "InferContextValueFromResolvers" needs to be exported by the entry point index.d.ts +// +// @public +class LocalState, TContext = InferContextValueFromResolvers> { + constructor(...[options]: {} extends TResolvers ? [ + options?: LocalState.Options> + ] : [ + options: LocalState.Options> & { + resolvers: TResolvers; + } + ]); + addResolvers(resolvers: TResolvers): void; + // (undocumented) + execute({ document, client, context, remoteResult, variables, onlyRunForcedResolvers, returnPartialData, }: { + document: DocumentNode | TypedDocumentNode; + client: ApolloClient; + context: DefaultContext | undefined; + remoteResult: FormattedExecutionResult | undefined; + variables: TVariables | undefined; onlyRunForcedResolvers?: boolean; - }): Promise>; - // (undocumented) - serverQuery(document: DocumentNode): DocumentNode | null; - // (undocumented) - setFragmentMatcher(fragmentMatcher: FragmentMatcher): void; - // (undocumented) - setResolvers(resolvers: Resolvers | Resolvers[]): void; + returnPartialData?: boolean; + }): Promise>; // (undocumented) - shouldForceResolvers(document: ASTNode): boolean; + getExportedVariables({ document, client, context, variables, }: { + document: DocumentNode | TypedDocumentNode; + client: ApolloClient; + context: DefaultContext | undefined; + variables: Partial>; + }): Promise; } // @public (undocumented) -type LocalStateOptions = { - cache: ApolloCache; - client?: ApolloClient; - resolvers?: Resolvers | Resolvers[]; - fragmentMatcher?: FragmentMatcher; -}; +export namespace LocalStateError { + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly path?: Array; + } + } + // (undocumented) + export interface Options { + // (undocumented) + path?: Array; + // (undocumented) + sourceError?: unknown; + } +} -// @public (undocumented) -export function makeReference(id: string): Reference; +// @public +export class LocalStateError extends Error { + constructor(message: string, options?: LocalStateError.Options); + static is(error: unknown): error is LocalStateError; + readonly path?: Array; +} // @public (undocumented) export function makeVar(value: T): ReactiveVar; -// @public -export type Masked = TData & { - __masked?: true; -}; - -// @public -export type MaskedDocumentNode = TypedDocumentNode, TVariables>; - // @public (undocumented) interface MaskFragmentOptions { // (undocumented) @@ -1708,29 +1627,24 @@ interface MaskFragmentOptions { // @public (undocumented) interface MaskOperationOptions { + cause?: object; // (undocumented) data: TData; // (undocumented) document: DocumentNode; // (undocumented) fetchPolicy?: WatchQueryFetchPolicy; - // (undocumented) - id: string; } -// @public (undocumented) -type MaybeAsync = T | PromiseLike; +// @public +export type MaybeMasked = ApplyHKTImplementationWithDefault; -// Warning: (ae-forgotten-export) The symbol "RemoveMaskedMarker" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "RemoveIndexSignature" needs to be exported by the entry point index.d.ts // -// @public -export type MaybeMasked = DataMasking extends { - mode: "unmask"; -} ? TData extends any ? true extends IsAny ? TData : TData extends { - __masked?: true; -} ? Prettify> : Unmasked : never : DataMasking extends { - mode: "preserveTypes"; -} ? TData : TData; +// @public (undocumented) +type MaybeRequireContextFunction = {} extends RemoveIndexSignature ? {} : { + context: LocalState.ContextFunction; +}; // @public (undocumented) export interface MergeInfo { @@ -1742,27 +1656,9 @@ export interface MergeInfo { typename: string | undefined; } -// Warning: (ae-forgotten-export) The symbol "CombineIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeObjects = Prettify<{ - [k in keyof T]: k extends keyof U ? [ - NonNullable, - NonNullable - ] extends ([ - infer TK extends object, - infer UK extends object - ]) ? TK extends unknown[] ? UK extends unknown[] ? CombineIntersection[] | Extract : T[k] : CombineIntersection | Extract : T[k] : T[k]; -} & Pick>>; - // @public (undocumented) type MergeObjectsFunction = (existing: T, incoming: T) => T; -// Warning: (ae-forgotten-export) The symbol "OptionsUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function mergeOptions>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial | undefined, options: TOptions | Partial): TOptions & TDefaultOptions; - // @public (undocumented) export interface MergeTree { // (undocumented) @@ -1771,27 +1667,6 @@ export interface MergeTree { map: Map; } -// Warning: (ae-forgotten-export) The symbol "MergeUnionsAcc" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "takeOneFromUnion" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnions = MergeUnionsAcc, never>; - -// Warning: (ae-forgotten-export) The symbol "DistributedRequiredExclude" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "MergeObjects" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type MergeUnionsAcc = [ -Curr -] extends [never] ? Merged : MergeUnionsAcc, takeOneFromUnion>, [ -Merged -] extends [never] ? Curr : MergeObjects>; - -// @public (undocumented) -export type MethodKeys = { - [P in keyof T]: T[P] extends Function ? P : never; -}[keyof T]; - // @public (undocumented) export class MissingFieldError extends Error { constructor(message: string, path: MissingTree | Array, query: DocumentNode, variables?: Record | undefined); @@ -1799,8 +1674,6 @@ export class MissingFieldError extends Error { readonly message: string; // (undocumented) readonly missing: MissingTree; - // Warning: (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts - // // (undocumented) readonly path: MissingTree | Array; // (undocumented) @@ -1839,51 +1712,18 @@ type Modifiers = Record> = Partia [FieldName in keyof T]: Modifier>>; }>; -// @public (undocumented) -interface MutationBaseOptions = ApolloCache> { - awaitRefetchQueries?: boolean; - context?: TContext; - errorPolicy?: ErrorPolicy; - onQueryUpdated?: OnQueryUpdated; - // Warning: (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts - optimisticResponse?: Unmasked> | ((vars: TVariables, { IGNORE }: { - IGNORE: IgnoreModifier; - }) => Unmasked> | IgnoreModifier); - refetchQueries?: ((result: FetchResult>) => InternalRefetchQueriesInclude) | InternalRefetchQueriesInclude; - update?: MutationUpdaterFunction; - updateQueries?: MutationQueryReducersMap; - variables?: TVariables; -} - -// @public (undocumented) -export interface MutationDataOptions = ApolloCache> extends BaseMutationOptions { - // (undocumented) - mutation: DocumentNode | TypedDocumentNode; -} +// @public @deprecated (undocumented) +export type MutateResult = ApolloClient.MutateResult; // @public (undocumented) export type MutationFetchPolicy = Extract; -// @public (undocumented) -export type MutationFunction = ApolloCache> = (options?: MutationFunctionOptions) => Promise>>; - -// @public (undocumented) -export interface MutationFunctionOptions = ApolloCache> extends BaseMutationOptions { - mutation?: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface MutationHookOptions = ApolloCache> extends BaseMutationOptions { -} - -// @public (undocumented) -export interface MutationOptions = ApolloCache> extends MutationSharedOptions { - mutation: DocumentNode | TypedDocumentNode; -} +// @public @deprecated (undocumented) +export type MutationOptions = ApolloClient.MutateOptions; // @public (undocumented) export type MutationQueryReducer = (previousResult: Record, options: { - mutationResult: FetchResult>; + mutationResult: NormalizedExecutionResult>; queryName: string | undefined; queryVariables: Record; }) => Record; @@ -1895,24 +1735,6 @@ export type MutationQueryReducersMap; }; -// @public (undocumented) -export interface MutationResult { - called: boolean; - client: ApolloClient; - data?: MaybeMasked | null; - error?: ApolloError; - loading: boolean; - reset: () => void; -} - -// Warning: (ae-forgotten-export) The symbol "MutationBaseOptions" needs to be exported by the entry point index.d.ts -// -// @public @deprecated (undocumented) -interface MutationSharedOptions = ApolloCache> extends MutationBaseOptions { - fetchPolicy?: MutationFetchPolicy; - keepRootFields?: boolean; -} - // @public (undocumented) interface MutationStoreValue { // (undocumented) @@ -1926,19 +1748,8 @@ interface MutationStoreValue { } // @public (undocumented) -export type MutationTuple = ApolloCache> = [ -mutate: (options?: MutationFunctionOptions) => Promise>>, -result: MutationResult -]; - -// @public @deprecated (undocumented) -export type MutationUpdaterFn = (cache: ApolloCache, mutationResult: FetchResult) => void; - -// @public (undocumented) -export type MutationUpdaterFunction> = (cache: TCache, result: Omit>, "context">, options: { - context?: TContext; +export type MutationUpdaterFunction = (cache: TCache, result: FormattedExecutionResult>, options: { + context?: DefaultContext; variables?: TVariables; }) => void; @@ -1950,7 +1761,8 @@ export enum NetworkStatus { poll = 6, ready = 7, refetch = 4, - setVariables = 2 + setVariables = 2, + streaming = 9 } // @public (undocumented) @@ -1960,20 +1772,13 @@ interface NextFetchPolicyContext { // (undocumented) observable: ObservableQuery; // (undocumented) - options: WatchQueryOptions; + options: ApolloClient.WatchQueryOptions; // (undocumented) reason: "after-fetch" | "variables-changed"; } -// @public (undocumented) -export type NextLink = (operation: Operation) => Observable; - -// @public (undocumented) -type NextResultListener = (method: "next" | "error" | "complete", arg?: any) => any; - -// @public +// @public @deprecated type NoInfer_2 = [T][T extends any ? 0 : never]; -export { NoInfer_2 as NoInfer } // @public export interface NormalizedCache { @@ -1998,7 +1803,7 @@ export interface NormalizedCache { // (undocumented) merge(olderObject: StoreObject, newerId: string): void; // (undocumented) - modify>(dataId: string, fields: Modifiers | AllFieldsModifier): boolean; + modify>(dataId: string, fields: Modifiers | AllFieldsModifier, exact: boolean): boolean; // (undocumented) release(rootId: string): number; replace(newData: NormalizedCacheObject): void; @@ -2018,143 +1823,174 @@ export interface NormalizedCacheObject { }; } -export { Observable } +// @public +export type NormalizedExecutionResult, TExtensions = Record> = Omit, "data"> & GetDataState; // @public (undocumented) -export class ObservableQuery extends Observable>> { - constructor({ queryManager, queryInfo, options, }: { - queryManager: QueryManager; - queryInfo: QueryInfo; - options: WatchQueryOptions; - }); - fetchMore(fetchMoreOptions: FetchMoreQueryOptions & { - updateQuery?: (previousQueryResult: Unmasked, options: { - fetchMoreResult: Unmasked; - variables: TFetchVars; - }) => Unmasked; - }): Promise>>; +namespace NotImplementedHandler { // (undocumented) - getCurrentResult(saveAsLastResult?: boolean): ApolloQueryResult>; - // @deprecated (undocumented) - getLastError(variablesMustMatch?: boolean): ApolloError | undefined; - // @deprecated (undocumented) - getLastResult(variablesMustMatch?: boolean): ApolloQueryResult | undefined; + interface NotImplementedResult extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + arg2: unknown; + // (undocumented) + return: never; + } // (undocumented) - hasObservers(): boolean; + interface TypeOverrides { + // Warning: (ae-forgotten-export) The symbol "NotImplementedHandler" needs to be exported by the entry point index.d.ts + // + // (undocumented) + AdditionalApolloLinkResultTypes: NotImplementedResult; + } +} + +// @public (undocumented) +class NotImplementedHandler implements Incremental.Handler { // (undocumented) - isDifferentFromLastResult(newResult: ApolloQueryResult, variables?: TVariables): boolean | undefined; - // @internal (undocumented) - protected notify(): void; + extractErrors(): void; // (undocumented) - readonly options: WatchQueryOptions; + isIncrementalResult(_: any): _ is never; // (undocumented) - get query(): TypedDocumentNode; - // @deprecated (undocumented) - readonly queryId: string; + prepareRequest(request: ApolloLink.Request): ApolloLink.Request; // (undocumented) - readonly queryName?: string; - refetch(variables?: Partial): Promise>>; + startRequest: any; +} + +export { Observable } + +// @public (undocumented) +interface ObservableAndInfo { // (undocumented) - reobserve(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Promise>>; - // Warning: (ae-forgotten-export) The symbol "Concast" needs to be exported by the entry point index.d.ts + fromLink: boolean; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts // // (undocumented) - reobserveAsConcast(newOptions?: Partial>, newNetworkStatus?: NetworkStatus): Concast>; - // @internal (undocumented) - resetDiff(): void; - // @deprecated (undocumented) - resetLastResults(): void; - // @internal (undocumented) - protected resetNotifications(): void; - // @deprecated (undocumented) - resetQueryStoreErrors(): void; - // (undocumented) - resubscribeAfterError(onNext: (value: ApolloQueryResult>) => void, onError?: (error: any) => void, onComplete?: () => void): ObservableSubscription; - // (undocumented) - resubscribeAfterError(observer: Observer>): ObservableSubscription; - // @deprecated (undocumented) - result(): Promise>>; - // @internal (undocumented) - protected scheduleNotify(): void; - // @deprecated (undocumented) - setOptions(newOptions: Partial>): Promise>>; - setVariables(variables: TVariables): Promise> | void>; - // (undocumented) - silentSetOptions(newOptions: Partial>): void; - startPolling(pollInterval: number): void; - stopPolling(): void; - subscribeToMore(options: SubscribeToMoreOptions): () => void; - updateQuery(mapFn: UpdateQueryMapFn): void; - get variables(): TVariables | undefined; + observable: Observable>; } -// @public @deprecated (undocumented) -export interface ObservableQueryFields { - fetchMore: (fetchMoreOptions: FetchMoreQueryOptions & { +// @public (undocumented) +export namespace ObservableQuery { + // @internal @deprecated + export interface CacheWatchOptions extends Cache_2.WatchOptions { + // @deprecated + lastOwnDiff?: Cache_2.DiffResult; + } + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface ObservableMethods { + pipe(...operators: OperatorFunctionChain, OperatorResult>): Observable; + subscribe(observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)): Subscription; + } + // (undocumented) + export type OperatorFunctionChain = []; + } + // (undocumented) + export type FetchMoreOptions = { + query?: DocumentNode | TypedDocumentNode; + variables?: Partial>; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; updateQuery?: (previousQueryResult: Unmasked, options: { fetchMoreResult: Unmasked; variables: TFetchVars; }) => Unmasked; - }) => Promise>>; - refetch: (variables?: Partial) => Promise>>; - // @internal @deprecated (undocumented) - reobserve: (newOptions?: Partial>, newNetworkStatus?: NetworkStatus) => Promise>>; - startPolling: (pollInterval: number) => void; - stopPolling: () => void; - subscribeToMore: SubscribeToMoreFunction; - updateQuery: (mapFn: UpdateQueryMapFn) => void; - variables: TVariables | undefined; -} - -export { ObservableSubscription } - -export { Observer } - -// @public (undocumented) -export interface OnDataOptions { - // (undocumented) - client: ApolloClient; + }; // (undocumented) - data: SubscriptionResult; -} - -// @public -type OnlyRequiredProperties = { - [K in keyof T as {} extends Pick ? never : K]: T[K]; -}; - -// @public (undocumented) -export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; - -// @public (undocumented) -export interface OnSubscriptionDataOptions { + export type Options = { + fetchPolicy: WatchQueryFetchPolicy; + nextFetchPolicy?: WatchQueryFetchPolicy | ((this: ApolloClient.WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); + initialFetchPolicy: WatchQueryFetchPolicy; + refetchWritePolicy?: RefetchWritePolicy; + errorPolicy?: ErrorPolicy; + context?: DefaultContext; + pollInterval?: number; + notifyOnNetworkStatusChange?: boolean; + returnPartialData?: boolean; + skipPollAttempt?: () => boolean; + query: DocumentNode | TypedDocumentNode; + variables: TVariables; + }; // (undocumented) - client: ApolloClient; + export type Result["dataState"] = DataState["dataState"]> = { + error?: ErrorLike; + loading: boolean; + networkStatus: NetworkStatus; + partial: boolean; + } & GetDataState; + export interface ResultPromise extends Promise { + retain(): this; + } // (undocumented) - subscriptionData: SubscriptionResult; + export interface SubscribeToMoreOptions { + // (undocumented) + context?: DefaultContext; + // (undocumented) + document: DocumentNode | TypedDocumentNode; + // (undocumented) + onError?: (error: ErrorLike) => void; + // (undocumented) + updateQuery?: SubscribeToMoreUpdateQueryFn; + // (undocumented) + variables?: TSubscriptionVariables; + } } // @public (undocumented) -export interface Operation { +export class ObservableQuery implements Subscribable>>, InteropObservable>> { // (undocumented) - extensions: Record; + ["@@observable"]: () => Subscribable>>; + // (undocumented) + [Symbol.observable]: () => Subscribable>>; + constructor({ queryManager, options, transformedQuery, }: { + queryManager: QueryManager; + options: ApolloClient.WatchQueryOptions; + transformedQuery?: DocumentNode | TypedDocumentNode; + queryId?: string; + }); + // @internal @deprecated (undocumented) + applyOptions(newOptions: Partial>): void; + fetchMore(options: ObservableQuery.FetchMoreOptions): Promise>; + // @internal @deprecated (undocumented) + getCacheDiff({ optimistic }?: { + optimistic?: boolean | undefined; + }): Cache_2.DiffResult; // (undocumented) - getContext: () => DefaultContext; + getCurrentResult(): ObservableQuery.Result>; // (undocumented) - operationName: string; + hasObservers(): boolean; + // @internal @deprecated + _lastWrite?: unknown; + // @internal @deprecated (undocumented) + notify(scheduled?: boolean): void; // (undocumented) - query: DocumentNode; + readonly options: ObservableQuery.Options; + pipe: Observable>>["pipe"]; // (undocumented) - setContext: { - (context: Partial): void; - (updateContext: (previousContext: DefaultContext) => Partial): void; - }; + get query(): TypedDocumentNode; // (undocumented) - variables: Record; + readonly queryName?: string; + refetch(variables?: Partial): ObservableQuery.ResultPromise>; + reobserve(newOptions?: Partial>): ObservableQuery.ResultPromise>>; + // @internal @deprecated + reset(): void; + setVariables(variables: TVariables): Promise>; + startPolling(pollInterval: number): void; + stop(): void; + stopPolling(): void; + subscribe: (observerOrNext: Partial>>> | ((value: ObservableQuery.Result>) => void)) => Subscription; + subscribeToMore(options: ObservableQuery.SubscribeToMoreOptions): () => void; + updateQuery(mapFn: UpdateQueryMapFn): void; + get variables(): TVariables; } // @public (undocumented) -export function operationName(type: DocumentType_2): string; +export type OnQueryUpdated = (observableQuery: ObservableQuery, diff: Cache_2.DiffResult, lastDiff: Cache_2.DiffResult | undefined) => boolean | TResult; + +// @public @deprecated (undocumented) +export type Operation = ApolloLink.Operation; // @public (undocumented) export type OperationVariables = Record; @@ -2163,26 +1999,51 @@ export type OperationVariables = Record; export type OptimisticStoreItem = { id: string; data: NormalizedCacheObject; - transaction: Transaction; + transaction: Transaction; }; // @public (undocumented) -type OptionsUnion = WatchQueryOptions | QueryOptions | MutationOptions; - -// @public (undocumented) -export function parseAndCheckHttpResponse(operations: Operation | Operation[]): (response: Response) => Promise; - -// @public @deprecated (undocumented) -export function parser(document: DocumentNode): IDocumentDefinition; - -// @public (undocumented) -export namespace parser { - var // (undocumented) - resetCache: () => void; +namespace OverridableTypes { + // (undocumented) + interface Complete extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + // (undocumented) + interface Defaults { + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Complete: Complete; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Partial: Partial; + // Warning: (ae-forgotten-export) The symbol "OverridableTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + Streaming: Streaming; + } + // (undocumented) + interface Partial extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: DeepPartial; + } + // (undocumented) + interface Streaming extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } } -// @public @deprecated (undocumented) -export type Path = ReadonlyArray; +// @public (undocumented) +export function parseAndCheckHttpResponse(operations: ApolloLink.Operation | ApolloLink.Operation[]): (response: Response) => Promise; // @public (undocumented) class Policies { @@ -2231,192 +2092,91 @@ export type PossibleTypesMap = { [supertype: string]: string[]; }; -// @public -export interface PreloadedQueryRef extends QueryRef { - // @deprecated - toPromise(): Promise>; -} - -// @public (undocumented) -export type PreloadQueryFetchPolicy = Extract; - -// @public -export interface PreloadQueryFunction { - // Warning: (ae-forgotten-export) The symbol "PreloadQueryOptionsArg" needs to be exported by the entry point index.d.ts - >(query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg, TOptions>): PreloadedQueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef | undefined, TVariables>; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - errorPolicy: "ignore" | "all"; - }): PreloadedQueryRef; - (query: DocumentNode | TypedDocumentNode, options: PreloadQueryOptions> & { - returnPartialData: true; - }): PreloadedQueryRef, TVariables>; - (query: DocumentNode | TypedDocumentNode, ...[options]: PreloadQueryOptionsArg>): PreloadedQueryRef; - // (undocumented) - toPromise>(queryRef: TQueryRef): Promise; -} - -// @public (undocumented) -export type PreloadQueryOptions = { - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: PreloadQueryFetchPolicy; - returnPartialData?: boolean; - refetchWritePolicy?: RefetchWritePolicy; -} & VariablesOption; - -// @public (undocumented) -type PreloadQueryOptionsArg = [TVariables] extends [never] ? [ -options?: PreloadQueryOptions & TOptions -] : {} extends OnlyRequiredProperties ? [ -options?: PreloadQueryOptions> & Omit -] : [ -options: PreloadQueryOptions> & Omit -]; - -// @public (undocumented) -type Prettify = { - [K in keyof T]: T[K]; -} & {}; - -// @public (undocumented) -type Primitive = null | undefined | string | number | boolean | symbol | bigint; - -// @public (undocumented) -const print_2: ((ast: ASTNode) => string) & { - reset(): void; -}; - -// @public (undocumented) -interface Printer { - // Warning: (ae-forgotten-export) The symbol "print_2" needs to be exported by the entry point index.d.ts - // - // (undocumented) - (node: ASTNode, originalPrint: typeof print_2): string; -} - -// @public (undocumented) -const QUERY_REF_BRAND: unique symbol; - -// @public (undocumented) -interface QueryData { - // (undocumented) - fetchData(): Promise; - // (undocumented) - getOptions(): any; -} - -// @public (undocumented) -export interface QueryDataOptions extends QueryFunctionOptions { - // (undocumented) - children?: (result: QueryResult) => ReactTypes.ReactNode; - query: DocumentNode | TypedDocumentNode; -} - -// @public @deprecated (undocumented) -export interface QueryFunctionOptions extends BaseQueryOptions { - // @internal (undocumented) - defaultOptions?: Partial>; - // @deprecated - onCompleted?: (data: MaybeMasked) => void; - // @deprecated - onError?: (error: ApolloError) => void; - skip?: boolean; -} - -// @public (undocumented) -export interface QueryHookOptions extends QueryFunctionOptions { -} - // @public (undocumented) -class QueryInfo { - constructor(queryManager: QueryManager, queryId?: string); - // (undocumented) - document: DocumentNode | null; - // (undocumented) - getDiff(): Cache_2.DiffResult; - // (undocumented) - graphQLErrors?: ReadonlyArray; - // (undocumented) - init(query: { - document: DocumentNode; - variables: Record | undefined; - networkStatus?: NetworkStatus; - observableQuery?: ObservableQuery; - lastRequestId?: number; - }): this; - // (undocumented) - lastRequestId: number; +namespace PreserveTypes { // (undocumented) - markError(error: ApolloError): ApolloError; + type FragmentType<_TData> = never; // (undocumented) - markReady(): NetworkStatus; - // Warning: (ae-forgotten-export) The symbol "CacheWriteBehavior" needs to be exported by the entry point index.d.ts - // - // (undocumented) - markResult(result: FetchResult, document: DocumentNode, options: Pick, cacheWriteBehavior: CacheWriteBehavior): void; - // (undocumented) - networkError?: Error | null; - // (undocumented) - networkStatus?: NetworkStatus; - // (undocumented) - readonly observableQuery: ObservableQuery | null; - // (undocumented) - readonly queryId: string; - // (undocumented) - resetDiff(): void; - // (undocumented) - resetLastWrite(): void; - // (undocumented) - setDiff(diff: Cache_2.DiffResult | null): void; - // (undocumented) - setObservableQuery(oq: ObservableQuery | null): void; + namespace HKTImplementation { + // (undocumented) + interface FragmentType extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: never; + } + // (undocumented) + interface MaybeMasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + // (undocumented) + interface Unmasked extends HKT { + // (undocumented) + arg1: unknown; + // (undocumented) + return: this["arg1"]; + } + } // (undocumented) - stop(): void; + type MaybeMasked = TData; // (undocumented) - stopped: boolean; + interface TypeOverrides { + // Warning: (ae-forgotten-export) The symbol "PreserveTypes" needs to be exported by the entry point index.d.ts + // + // (undocumented) + FragmentType: HKTImplementation.FragmentType; + // (undocumented) + MaybeMasked: HKTImplementation.MaybeMasked; + // (undocumented) + Unmasked: HKTImplementation.Unmasked; + } // (undocumented) - variables?: Record; + type Unmasked = TData; } -// @public @deprecated (undocumented) -export interface QueryLazyOptions { - context?: DefaultContext; - variables?: TVariables; -} +// @internal @deprecated (undocumented) +type Primitive = null | undefined | string | number | boolean | symbol | bigint; // @public (undocumented) -class QueryManager { +class QueryManager { // Warning: (ae-forgotten-export) The symbol "QueryManagerOptions" needs to be exported by the entry point index.d.ts - constructor(options: QueryManagerOptions); + constructor(options: QueryManagerOptions); // (undocumented) readonly assumeImmutableResults: boolean; // (undocumented) broadcastQueries(): void; // (undocumented) - cache: ApolloCache; + get cache(): ApolloCache; // (undocumented) clearStore(options?: Cache_2.ResetOptions): Promise; // (undocumented) + readonly client: ApolloClient; + readonly clientOptions: ApolloClient.Options; + // (undocumented) readonly dataMasking: boolean; // (undocumented) readonly defaultContext: Partial; // (undocumented) - defaultOptions: DefaultOptions; + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) readonly documentTransform: DocumentTransform; // (undocumented) protected fetchCancelFns: Map any>; + // Warning: (ae-forgotten-export) The symbol "ObservableAndInfo" needs to be exported by the entry point index.d.ts + // // (undocumented) - fetchQuery(queryId: string, options: WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; - // (undocumented) - generateMutationId(): string; + fetchObservableWithInfo(options: ApolloClient.WatchQueryOptions, { networkStatus, query, fetchQueryOperator, onCacheHit, observableQuery, }: { + networkStatus?: NetworkStatus; + query?: DocumentNode; + fetchQueryOperator?: (source: Observable) => Observable; + onCacheHit?: () => void; + observableQuery?: ObservableQuery | undefined; + }): ObservableAndInfo; // (undocumented) - generateQueryId(): string; + fetchQuery(options: ApolloClient.WatchQueryOptions, networkStatus?: NetworkStatus): Promise>; // (undocumented) generateRequestId(): number; // Warning: (ae-forgotten-export) The symbol "TransformCacheEntry" needs to be exported by the entry point index.d.ts @@ -2424,50 +2184,20 @@ class QueryManager { // (undocumented) getDocumentInfo(document: DocumentNode): TransformCacheEntry; // (undocumented) - getLocalState(): LocalState; + getObservableQueries(include?: InternalRefetchQueriesInclude): Set>; // (undocumented) - getObservableQueries(include?: InternalRefetchQueriesInclude): Map>; - // (undocumented) - getOrCreateQuery(queryId: string): QueryInfo; - // Warning: (ae-forgotten-export) The symbol "QueryStoreValue" needs to be exported by the entry point index.d.ts - // + getVariables(document: DocumentNode, variables?: TVariables): TVariables; // (undocumented) - getQueryStore(): Record; + readonly incrementalHandler: Incremental.Handler; // (undocumented) protected inFlightLinkObservables: Trie<{ - observable?: Observable>; + observable?: Observable>; + restart?: () => void; }>; // (undocumented) - link: ApolloLink; - // (undocumented) - markMutationOptimistic>(optimisticResponse: any, mutation: { - mutationId: string; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - keepRootFields?: boolean; - }): boolean; + get link(): ApolloLink; // (undocumented) - markMutationResult>(mutation: { - mutationId: string; - result: FetchResult; - document: DocumentNode; - variables?: TVariables; - fetchPolicy?: MutationFetchPolicy; - errorPolicy: ErrorPolicy; - context?: TContext; - updateQueries: UpdateQueries; - update?: MutationUpdaterFunction; - awaitRefetchQueries?: boolean; - refetchQueries?: InternalRefetchQueriesInclude; - removeOptimistic?: string; - onQueryUpdated?: OnQueryUpdated; - keepRootFields?: boolean; - }, cache?: ApolloCache): Promise>; + localState: LocalState | undefined; // Warning: (ae-forgotten-export) The symbol "MaskFragmentOptions" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -2477,56 +2207,53 @@ class QueryManager { // (undocumented) maskOperation(options: MaskOperationOptions): MaybeMasked; // (undocumented) - mutate, TCache extends ApolloCache>({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: MutationOptions): Promise>>; + mutate({ mutation, variables, optimisticResponse, updateQueries, refetchQueries, awaitRefetchQueries, update: updateWithProxyFn, onQueryUpdated, fetchPolicy, errorPolicy, keepRootFields, context, }: ApolloClient.MutateOptions & { + errorPolicy: ErrorPolicy; + fetchPolicy: MutationFetchPolicy; + }): Promise>>; // (undocumented) mutationStore?: { [mutationId: string]: MutationStoreValue; }; + obsQueries: Set>; + prioritizeCacheValues: boolean; // (undocumented) - query(options: QueryOptions, queryId?: string): Promise>>; + query(options: ApolloClient.QueryOptions): Promise>>; // (undocumented) - reFetchObservableQueries(includeStandby?: boolean): Promise[]>; + refetchObservableQueries(includeStandby?: boolean): Promise[]>; // (undocumented) - refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions, TResult>): InternalRefetchQueriesMap; - // (undocumented) - removeQuery(queryId: string): void; - // (undocumented) - resetErrors(queryId: string): void; + refetchQueries({ updateCache, include, optimistic, removeOptimistic, onQueryUpdated, }: InternalRefetchQueriesOptions): InternalRefetchQueriesMap; // (undocumented) readonly ssrMode: boolean; // (undocumented) - startGraphQLSubscription(options: SubscriptionOptions): Observable>; + startGraphQLSubscription(options: ApolloClient.SubscribeOptions): SubscriptionObservable>; stop(): void; // (undocumented) - stopQuery(queryId: string): void; - // (undocumented) - stopQueryInStore(queryId: string): void; - // (undocumented) transform(document: DocumentNode): DocumentNode; // (undocumented) - watchQuery(options: WatchQueryOptions): ObservableQuery; + watchQuery(options: ApolloClient.WatchQueryOptions): ObservableQuery; } // @public (undocumented) -interface QueryManagerOptions { +interface QueryManagerOptions { // (undocumented) assumeImmutableResults: boolean; // (undocumented) - cache: ApolloCache; + client: ApolloClient; // (undocumented) - clientAwareness: Record; + clientOptions: ApolloClient.Options; // (undocumented) dataMasking: boolean; // (undocumented) defaultContext: Partial | undefined; // (undocumented) - defaultOptions: DefaultOptions; + defaultOptions: ApolloClient.DefaultOptions; // (undocumented) documentTransform: DocumentTransform | null | undefined; // (undocumented) - link: ApolloLink; + incrementalHandler: Incremental.Handler; // (undocumented) - localState: LocalState; + localState: LocalState | undefined; // (undocumented) onBroadcast: undefined | (() => void); // (undocumented) @@ -2535,55 +2262,37 @@ interface QueryManagerOptions { ssrMode: boolean; } -// @public -interface QueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: FetchPolicy; - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - query: DocumentNode | TypedDocumentNode; - returnPartialData?: boolean; - variables?: TVariables; -} -export { QueryOptions as PureQueryOptions } -export { QueryOptions } - -// @public -export interface QueryRef { - // @internal (undocumented) - [QUERY_REF_BRAND]?(variables: TVariables): TData; -} - -// @public @deprecated (undocumented) -export interface QueryReference extends QueryRef { - // @deprecated (undocumented) - toPromise?: unknown; -} - // @public (undocumented) -export interface QueryResult extends ObservableQueryFields { - called: boolean; - client: ApolloClient; - data: MaybeMasked | undefined; - error?: ApolloError; - // @deprecated (undocumented) - errors?: ReadonlyArray; - loading: boolean; - networkStatus: NetworkStatus; - observable: ObservableQuery; - previousData?: MaybeMasked; +namespace QueryNotification { + // (undocumented) + type FromCache = NextNotification> & { + source: "cache"; + }; + // (undocumented) + type FromNetwork = ObservableNotification> & { + source: "network"; + }; + // (undocumented) + type NewNetworkStatus = NextNotification<{ + resetError?: boolean; + }> & { + source: "newNetworkStatus"; + }; + // (undocumented) + type SetResult = NextNotification> & { + source: "setResult"; + }; + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "QueryNotification" needs to be exported by the entry point index.d.ts + // + // (undocumented) + type Value = FromCache | FromNetwork | NewNetworkStatus | SetResult; } -// @public (undocumented) -type QueryStoreValue = Pick; - // @public @deprecated (undocumented) -export type QueryTuple = LazyQueryResultTuple; +export type QueryOptions = ApolloClient.QueryOptions; // @public (undocumented) type ReactiveListener = (value: T) => any; @@ -2593,9 +2302,9 @@ export interface ReactiveVar { // (undocumented) (newValue?: T): T; // (undocumented) - attachCache(cache: ApolloCache): this; + attachCache(cache: ApolloCache): this; // (undocumented) - forgetCache(cache: ApolloCache): boolean; + forgetCache(cache: ApolloCache): boolean; // Warning: (ae-forgotten-export) The symbol "ReactiveListener" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -2621,7 +2330,7 @@ export interface ReadMergeModifyContext { // (undocumented) store: NormalizedCache; // (undocumented) - variables?: Record; + variables?: OperationVariables; // (undocumented) varString?: string; } @@ -2632,53 +2341,32 @@ export type ReadQueryOptions = { query: DocumentNode; variables?: Object; previousResult?: any; - canonizeResults?: boolean; rootId?: string; config?: ApolloReducerConfig; }; -// @public (undocumented) +// @public export interface Reference { // (undocumented) readonly __ref: string; } -// @public (undocumented) -type RefetchFunction = ObservableQueryFields["refetch"]; - -// @public (undocumented) -export type RefetchQueriesFunction = (...args: any[]) => InternalRefetchQueriesInclude; - // @public (undocumented) export type RefetchQueriesInclude = RefetchQueryDescriptor[] | RefetchQueriesIncludeShorthand; // @public (undocumented) type RefetchQueriesIncludeShorthand = "all" | "active"; +// @public @deprecated (undocumented) +export type RefetchQueriesOptions = ApolloClient.RefetchQueriesOptions; + +// Warning: (ae-forgotten-export) The symbol "IsAny" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -export interface RefetchQueriesOptions, TResult> { - // (undocumented) - include?: RefetchQueriesInclude; - // (undocumented) - onQueryUpdated?: OnQueryUpdated | null; - // (undocumented) - optimistic?: boolean; - // (undocumented) - updateCache?: (cache: TCache) => void; -} - -// Warning: (ae-forgotten-export) The symbol "IsStrictlyAny" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export type RefetchQueriesPromiseResults = IsStrictlyAny extends true ? any[] : TResult extends boolean ? InteropApolloQueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; +export type RefetchQueriesPromiseResults = IsAny extends true ? any[] : TResult extends boolean ? ApolloClient.QueryResult[] : TResult extends PromiseLike ? U[] : TResult[]; -// @public (undocumented) -export interface RefetchQueriesResult extends Promise> { - // (undocumented) - queries: ObservableQuery[]; - // (undocumented) - results: InternalRefetchQueriesResult[]; -} +// @public @deprecated (undocumented) +export type RefetchQueriesResult = ApolloClient.RefetchQueriesResult; // @public (undocumented) export type RefetchQueryDescriptor = string | DocumentNode; @@ -2686,66 +2374,18 @@ export type RefetchQueryDescriptor = string | DocumentNode; // @public (undocumented) export type RefetchWritePolicy = "merge" | "overwrite"; -// @public (undocumented) -type RemoveFragmentName = T extends any ? Omit : T; - -// @public (undocumented) +// @internal @deprecated (undocumented) type RemoveIndexSignature = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; }; -// @public (undocumented) -type RemoveMaskedMarker = Omit; - -// @public (undocumented) -class RenderPromises { - // (undocumented) - addObservableQueryPromise(obsQuery: ObservableQuery): ReactTypes.ReactNode; - // Warning: (ae-forgotten-export) The symbol "QueryData" needs to be exported by the entry point index.d.ts - // - // (undocumented) - addQueryPromise(queryInstance: QueryData, finish?: () => ReactTypes.ReactNode): ReactTypes.ReactNode; - // (undocumented) - consumeAndAwaitPromises(): Promise; - // (undocumented) - getSSRObservable(props: QueryDataOptions): ObservableQuery | null; - // (undocumented) - hasPromises(): boolean; - // (undocumented) - registerSSRObservable(observable: ObservableQuery): void; - // (undocumented) - stop(): void; -} - -// @public (undocumented) -export type RequestHandler = (operation: Operation, forward: NextLink) => Observable | null; - // @public @deprecated (undocumented) -export const resetApolloContext: typeof getApolloContext; +export type RequestHandler = ApolloLink.RequestHandler; export { resetCaches } // @public (undocumented) -type ResetFunction = () => void; - -// @public (undocumented) -export type Resolver = (rootValue?: any, args?: any, context?: any, info?: { - field: FieldNode; - fragmentMap: FragmentMap; -}) => any; - -// @public (undocumented) -export interface Resolvers { - // (undocumented) - [key: string]: { - [field: string]: Resolver; - }; -} - -// Warning: (ae-forgotten-export) The symbol "Body_2" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function rewriteURIForGET(chosenURI: string, body: Body_2): { +export function rewriteURIForGET(chosenURI: string, body: BaseHttpLink.Body): { parseError: unknown; newURI?: undefined; } | { @@ -2753,93 +2393,117 @@ export function rewriteURIForGET(chosenURI: string, body: Body_2): { parseError?: undefined; }; +// @public (undocumented) +class Root extends EntityStore { + constructor({ policies, resultCaching, seed, }: { + policies: Policies; + resultCaching?: boolean; + seed?: NormalizedCacheObject; + }); + // (undocumented) + addLayer(layerId: string, replay: (layer: EntityStore) => any): Layer; + // (undocumented) + getStorage(): StorageType; + // (undocumented) + removeLayer(): Root; + // (undocumented) + readonly storageTrie: Trie; + // Warning: (ae-forgotten-export) The symbol "Stump" needs to be exported by the entry point index.d.ts + // + // (undocumented) + readonly stump: Stump; +} + // @public (undocumented) type SafeReadonly = T extends object ? Readonly : T; // Warning: (ae-forgotten-export) The symbol "HttpConfig" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function selectHttpOptionsAndBody(operation: Operation, fallbackConfig: HttpConfig, ...configs: Array): { +export function selectHttpOptionsAndBody(operation: ApolloLink.Operation, fallbackConfig: HttpConfig, ...configs: Array): { options: HttpConfig & Record; - body: Body_2; + body: BaseHttpLink.Body; }; // @public (undocumented) -export function selectHttpOptionsAndBodyInternal(operation: Operation, printer: Printer, ...configs: HttpConfig[]): { +export function selectHttpOptionsAndBodyInternal(operation: ApolloLink.Operation, printer: BaseHttpLink.Printer, ...configs: HttpConfig[]): { options: HttpConfig & Record; - body: Body_2; + body: BaseHttpLink.Body; }; // @public (undocumented) -export const selectURI: (operation: Operation, fallbackURI?: string | ((operation: Operation) => string)) => any; - -// @public (undocumented) -export const serializeFetchParameter: (p: any, label: string) => string; +export const selectURI: (operation: ApolloLink.Operation, fallbackURI?: string | ((operation: ApolloLink.Operation) => string)) => any; // @public (undocumented) -export type ServerError = Error & { - response: Response; - result: Record | string; - statusCode: number; -}; - -// @public (undocumented) -export type ServerParseError = Error & { - response: Response; - statusCode: number; - bodyText: string; -}; - -export { setLogVerbosity } +export namespace ServerError { + // (undocumented) + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly bodyText: string; + readonly response: Response; + readonly statusCode: number; + } + } + // (undocumented) + export interface Options { + // (undocumented) + bodyText: string; + // (undocumented) + response: Response; + } +} -// @public (undocumented) -interface SharedWatchQueryOptions { - // @deprecated - canonizeResults?: boolean; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: WatchQueryFetchPolicy; - initialFetchPolicy?: WatchQueryFetchPolicy; - // Warning: (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts - nextFetchPolicy?: WatchQueryFetchPolicy | ((this: WatchQueryOptions, currentFetchPolicy: WatchQueryFetchPolicy, context: NextFetchPolicyContext) => WatchQueryFetchPolicy); - notifyOnNetworkStatusChange?: boolean; - // @deprecated - partialRefetch?: boolean; - pollInterval?: number; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - skipPollAttempt?: () => boolean; - variables?: TVariables; +// @public +export class ServerError extends Error { + constructor(message: string, options: ServerError.Options); + readonly bodyText: string; + static is(error: unknown): error is ServerError; + readonly response: Response; + readonly statusCode: number; } // @public (undocumented) -export interface SingleExecutionResult, TContext = DefaultContext, TExtensions = Record> { - // (undocumented) - context?: TContext; +export namespace ServerParseError { // (undocumented) - data?: TData | null; - // (undocumented) - errors?: ReadonlyArray; + export namespace DocumentationTypes { + // (undocumented) + export interface InstanceProperties { + readonly bodyText: string; + readonly response: Response; + readonly statusCode: number; + } + } // (undocumented) - extensions?: TExtensions; + export interface Options { + // (undocumented) + bodyText: string; + // (undocumented) + response: Response; + } } -// @public (undocumented) -export type SkipToken = typeof skipToken; - -// @public (undocumented) -export const skipToken: unique symbol; +// @public +export class ServerParseError extends Error { + constructor(originalParseError: unknown, options: ServerParseError.Options); + readonly bodyText: string; + static is(error: unknown): error is ServerParseError; + readonly response: Response; + readonly statusCode: number; +} +// Warning: (ae-forgotten-export) The symbol "VerbosityLevel" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -type Source = MaybeAsync>; +export function setLogVerbosity(level: VerbosityLevel): VerbosityLevel; -// @public (undocumented) +// @public @deprecated (undocumented) export const split: typeof ApolloLink.split; // @public (undocumented) type StorageType = Record; -// @public (undocumented) +// @public export interface StoreObject { // (undocumented) [storeFieldName: string]: StoreValue; @@ -2854,12 +2518,12 @@ type StoreObjectValueMaybeReference = StoreVal extends Array] ? ReadonlyArray | Reference> : never : never : StoreVal extends Record ? AsStoreObject | Reference : StoreVal; -// @public (undocumented) +// @public export type StoreValue = number | string | string[] | Reference | Reference[] | null | undefined | void | Object; // @public (undocumented) class Stump extends Layer { - constructor(root: EntityStore.Root); + constructor(root: Root); // (undocumented) merge(older: string | StoreObject, newer: string | StoreObject): void; // (undocumented) @@ -2869,107 +2533,35 @@ class Stump extends Layer { // @public (undocumented) export interface SubscribeToMoreFunction { // (undocumented) - (options: SubscribeToMoreOptions): () => void; + (options: ObservableQuery.SubscribeToMoreOptions): () => void; } -// @public (undocumented) -export interface SubscribeToMoreOptions { - // (undocumented) - context?: DefaultContext; - // (undocumented) - document: DocumentNode | TypedDocumentNode; - // (undocumented) - onError?: (error: Error) => void; - // (undocumented) - updateQuery?: SubscribeToMoreUpdateQueryFn; - // (undocumented) - variables?: TSubscriptionVariables; -} +// @public @deprecated (undocumented) +export type SubscribeToMoreOptions = ObservableQuery.SubscribeToMoreOptions; // @public (undocumented) -export type SubscribeToMoreUpdateQueryFn = { +export type SubscribeToMoreUpdateQueryFn = { ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions & { + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions & { subscriptionData: { data: Unmasked; }; }): Unmasked | void; }; -// @public (undocumented) -export interface SubscriptionCurrentObservable { - // (undocumented) - query?: Observable; - // (undocumented) - subscription?: ObservableSubscription; -} - -// @public @deprecated (undocumented) -export interface SubscriptionDataOptions extends BaseSubscriptionOptions { - // (undocumented) - children?: null | ((result: SubscriptionResult) => ReactTypes.ReactNode); - // (undocumented) - subscription: DocumentNode | TypedDocumentNode; -} - -// @public (undocumented) -export interface SubscriptionHookOptions extends BaseSubscriptionOptions { -} - -// @public (undocumented) -export interface SubscriptionOptions { - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - extensions?: Record; - fetchPolicy?: FetchPolicy; - query: DocumentNode | TypedDocumentNode; - variables?: TVariables; -} - -// @public (undocumented) -export interface SubscriptionResult { - data?: MaybeMasked; - error?: ApolloError; - loading: boolean; - // @internal @deprecated (undocumented) - variables?: TVariables; -} - -// @public (undocumented) -export type SuspenseQueryHookFetchPolicy = Extract; - -// @public (undocumented) -export interface SuspenseQueryHookOptions { - // @deprecated - canonizeResults?: boolean; - client?: ApolloClient; - context?: DefaultContext; - errorPolicy?: ErrorPolicy; - fetchPolicy?: SuspenseQueryHookFetchPolicy; - queryKey?: string | number | any[]; - refetchWritePolicy?: RefetchWritePolicy; - returnPartialData?: boolean; - // @deprecated - skip?: boolean; - variables?: TVariables; +// @public +export interface SubscriptionObservable extends Observable { + restart: () => void; } -// Warning: (ae-forgotten-export) The symbol "unionToIntersection" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -type takeOneFromUnion = unionToIntersection 0 : never> extends ((x: infer U) => 0) ? U : never; - // @public @deprecated (undocumented) -export const throwServerError: (response: Response, result: any, message: string) => never; - -// @public @deprecated (undocumented) -export function toPromise(observable: Observable): Promise; +export type SubscriptionOptions = ApolloClient.SubscribeOptions; // @public (undocumented) type ToReferenceFunction = (objOrIdOrRef: StoreObject | string | Reference, mergeIntoStore?: boolean) => Reference | undefined; // @public (undocumented) -export type Transaction = (c: ApolloCache) => void; +export type Transaction = (c: ApolloCache) => void; // @public (undocumented) interface TransformCacheEntry { @@ -2984,11 +2576,17 @@ interface TransformCacheEntry { // (undocumented) hasForcedResolvers: boolean; // (undocumented) + hasIncrementalDirective: boolean; + // (undocumented) hasNonreactiveDirective: boolean; // (undocumented) nonReactiveQuery: DocumentNode; // (undocumented) + operationType: OperationTypeNode | undefined; + // (undocumented) serverQuery: DocumentNode | null; + // (undocumented) + violation?: Error | undefined; } // @public (undocumented) @@ -2996,6 +2594,10 @@ type TransformFn = (document: DocumentNode) => DocumentNode; export { TypedDocumentNode } +// @public (undocumented) +export interface TypeOverrides { +} + // @public (undocumented) export type TypePolicies = { [__typename: string]: TypePolicy; @@ -3013,41 +2615,24 @@ export type TypePolicy = { }; }; -// @public (undocumented) -type UnionForAny = T extends never ? "a" : 1; - -// @public (undocumented) -type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -// @public (undocumented) -type unionToIntersection = (T extends unknown ? (x: T) => unknown : never) extends ((x: infer U) => unknown) ? U : never; - -// Warning: (ae-forgotten-export) The symbol "ContainsFragmentsRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "UnwrapFragmentRefs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "RemoveFragmentName" needs to be exported by the entry point index.d.ts -// // @public -export type Unmasked = true extends IsAny ? TData : TData extends object ? true extends ContainsFragmentsRefs ? UnwrapFragmentRefs>> : TData : TData; - -// @public (undocumented) -type UnwrapFragmentRefs = true extends IsAny ? TData : TData extends any ? TData extends Primitive ? TData : string extends keyof TData ? TData : keyof TData extends never ? TData : TData extends { - " $fragmentRefs"?: infer FragmentRefs; -} ? UnwrapFragmentRefs | RemoveFragmentName[keyof NonNullable]>>>> : TData extends object ? { - [K in keyof TData]: UnwrapFragmentRefs; -} : TData : never; +export class UnconventionalError extends Error { + constructor(errorType: unknown); + static is(error: unknown): error is UnconventionalError; +} -// @public (undocumented) -type UpdateQueries = MutationOptions["updateQueries"]; +// @public +export type Unmasked = ApplyHKTImplementationWithDefault; // @public (undocumented) -export interface UpdateQueryMapFn { +export interface UpdateQueryMapFn { // (undocumented) ( - unsafePreviousData: Unmasked, options: UpdateQueryOptions): Unmasked | void; + unsafePreviousData: DeepPartial>, options: UpdateQueryOptions): Unmasked | void; } // @public (undocumented) -export type UpdateQueryOptions = { +export type UpdateQueryOptions = { variables?: TVariables; } & ({ complete: true; @@ -3057,319 +2642,35 @@ export type UpdateQueryOptions = { previousData: DeepPartial> | undefined; }); -// @public (undocumented) -export interface UriFunction { - // (undocumented) - (operation: Operation): string; -} - -// @public (undocumented) -export function useApolloClient(override?: ApolloClient): ApolloClient; - -// Warning: (ae-forgotten-export) The symbol "BackgroundQueryHookOptionsNoInfer" needs to be exported by the entry point index.d.ts -// -// @public (undocumented) -export function useBackgroundQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer & TOptions): [ -(QueryRef | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables> | (TOptions["skip"] extends boolean ? undefined : never)), -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): [ -QueryRef | undefined, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - errorPolicy: "ignore" | "all"; -}): [ -QueryRef, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; - returnPartialData: true; -}): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -}): [ -QueryRef, TVariables>, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: BackgroundQueryHookOptionsNoInfer & { - skip: boolean; -}): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: BackgroundQueryHookOptionsNoInfer): [QueryRef, UseBackgroundQueryResult]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken): [undefined, UseBackgroundQueryResult]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (BackgroundQueryHookOptionsNoInfer & { - returnPartialData: true; -})): [ -QueryRef, TVariables> | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export function useBackgroundQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | BackgroundQueryHookOptionsNoInfer): [ -QueryRef | undefined, -UseBackgroundQueryResult -]; - -// @public (undocumented) -export type UseBackgroundQueryResult = { - subscribeToMore: SubscribeToMoreFunction; - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; -}; - -// @public (undocumented) -export function useFragment(options: UseFragmentOptions): UseFragmentResult; - -// @public (undocumented) -export interface UseFragmentOptions extends Omit, NoInfer_2>, "id" | "query" | "optimistic" | "previousResult" | "returnPartialData">, Omit, "id" | "variables" | "returnPartialData"> { - client?: ApolloClient; - // (undocumented) - from: StoreObject | Reference | FragmentType> | string | null; - // (undocumented) - optimistic?: boolean; -} - -// @public (undocumented) -export type UseFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing?: MissingTree; -}; - -// @public -export function useLazyQuery(query: DocumentNode | TypedDocumentNode, options?: LazyQueryHookOptions, NoInfer_2>): LazyQueryResultTuple; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions & TOptions): UseLoadableQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? DeepPartial : TData, TVariables>; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - errorPolicy: "ignore" | "all"; -}): UseLoadableQueryResult; - -// @public (undocumented) -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options: LoadableQueryHookOptions & { - returnPartialData: true; -}): UseLoadableQueryResult, TVariables>; - -// @public -export function useLoadableQuery(query: DocumentNode | TypedDocumentNode, options?: LoadableQueryHookOptions): UseLoadableQueryResult; - -// @public (undocumented) -export type UseLoadableQueryResult = [ -loadQuery: LoadQueryFunction, -queryRef: QueryRef | null, -handlers: { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; - reset: ResetFunction; -} -]; - -// @public -export function useMutation = ApolloCache>(mutation: DocumentNode | TypedDocumentNode, options?: MutationHookOptions, NoInfer_2, TContext, TCache>): MutationTuple; - -// @public -export function useQuery(query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions, NoInfer_2>): InteropQueryResult; - -// @public -export function useQueryRefHandlers(queryRef: QueryRef): UseQueryRefHandlersResult; - -// @public (undocumented) -export interface UseQueryRefHandlersResult { - fetchMore: FetchMoreFunction; - refetch: RefetchFunction; - subscribeToMore: SubscribeToMoreFunction; -} - -// @public -export function useReactiveVar(rv: ReactiveVar): T; - -// @public (undocumented) -export function useReadQuery(queryRef: QueryRef): UseReadQueryResult; - -// @public (undocumented) -export interface UseReadQueryResult { - data: MaybeMasked; - error: ApolloError | undefined; - networkStatus: NetworkStatus; -} - -// @public -export function useSubscription(subscription: DocumentNode | TypedDocumentNode, options?: SubscriptionHookOptions, NoInfer_2>): { - restart: () => void; - loading: boolean; - data?: TData | undefined; - error?: ApolloError; - variables?: TVariables | undefined; -}; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: NonNullable>; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: null; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions & { - from: From; -}): UseSuspenseFragmentResult; - -// @public (undocumented) -export function useSuspenseFragment(options: UseSuspenseFragmentOptions): UseSuspenseFragmentResult; - -// @public (undocumented) -export type UseSuspenseFragmentOptions = { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: From; - optimistic?: boolean; - client?: ApolloClient; -} & VariablesOption>; - -// @public (undocumented) -export type UseSuspenseFragmentResult = { - data: MaybeMasked; +// @internal @deprecated (undocumented) +type VariablesOption = {} extends TVariables ? { + variables?: TVariables; +} : { + variables: TVariables; }; +// Warning: (ae-forgotten-export) The symbol "verbosityLevels" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -export function useSuspenseQuery, "variables">>(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2> & TOptions): UseSuspenseQueryResult | undefined : TData | undefined : TOptions["returnPartialData"] extends true ? TOptions["skip"] extends boolean ? DeepPartial | undefined : DeepPartial : TOptions["skip"] extends boolean ? TData | undefined : TData, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - errorPolicy: "ignore" | "all"; -}): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; - returnPartialData: true; -}): UseSuspenseQueryResult | undefined, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -}): UseSuspenseQueryResult, TVariables>; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SuspenseQueryHookOptions, NoInfer_2> & { - skip: boolean; -}): UseSuspenseQueryResult; - -// @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; +type VerbosityLevel = (typeof verbosityLevels)[number]; // @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options: SkipToken | (SuspenseQueryHookOptions, NoInfer_2> & { - returnPartialData: true; -})): UseSuspenseQueryResult | undefined, TVariables>; +const verbosityLevels: readonly ["debug", "log", "warn", "error", "silent"]; // @public (undocumented) -export function useSuspenseQuery(query: DocumentNode | TypedDocumentNode, options?: SkipToken | SuspenseQueryHookOptions, NoInfer_2>): UseSuspenseQueryResult; +export const version: string; -// @public (undocumented) -export interface UseSuspenseQueryResult { - // (undocumented) - client: ApolloClient; - // (undocumented) - data: MaybeMasked; - // (undocumented) - error: ApolloError | undefined; - // (undocumented) - fetchMore: FetchMoreFunction; - // (undocumented) - networkStatus: NetworkStatus; - // (undocumented) - refetch: RefetchFunction; - // (undocumented) - subscribeToMore: SubscribeToMoreFunction; -} - -// @public (undocumented) -export type VariablesOption = [ -TVariables -] extends [never] ? { - variables?: Record; -} : Record extends OnlyRequiredProperties ? { - variables?: TVariables; -} : { - variables: TVariables; -}; - -// @public -export interface WatchFragmentOptions { - fragment: DocumentNode | TypedDocumentNode; - fragmentName?: string; - from: StoreObject | Reference | FragmentType> | string; - optimistic?: boolean; - variables?: TVars; -} +// @public @deprecated (undocumented) +export type WatchFragmentOptions = ApolloCache.WatchFragmentOptions; -// @public -export type WatchFragmentResult = { - data: MaybeMasked; - complete: true; - missing?: never; -} | { - data: DeepPartial>; - complete: false; - missing: MissingTree; -}; +// @public @deprecated (undocumented) +export type WatchFragmentResult = ApolloCache.WatchFragmentResult; // @public (undocumented) -export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network"; +export type WatchQueryFetchPolicy = FetchPolicy | "cache-and-network" | "standby"; -// @public -export interface WatchQueryOptions extends SharedWatchQueryOptions { - query: DocumentNode | TypedDocumentNode; -} +// @public @deprecated (undocumented) +export type WatchQueryOptions = ApolloClient.WatchQueryOptions; // @public (undocumented) interface WriteContext extends ReadMergeModifyContext { @@ -3405,19 +2706,18 @@ interface WriteContext extends ReadMergeModifyContext { // Warnings were encountered during analysis: // -// src/cache/inmemory/policies.ts:93:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeySpecifier" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/policies.ts:162:3 - (ae-forgotten-export) The symbol "KeyArgsFunction" needs to be exported by the entry point index.d.ts -// src/cache/inmemory/types.ts:139:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:145:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts -// src/core/ObservableQuery.ts:146:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:160:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts -// src/core/QueryManager.ts:415:7 - (ae-forgotten-export) The symbol "UpdateQueries" 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:52:3 - (ae-forgotten-export) The symbol "FetchMoreFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useBackgroundQuery.ts:76:4 - (ae-forgotten-export) The symbol "RefetchFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useLoadableQuery.ts:125:9 - (ae-forgotten-export) The symbol "ResetFunction" needs to be exported by the entry point index.d.ts -// src/react/hooks/useSuspenseFragment.ts:70:5 - (ae-forgotten-export) The symbol "From" needs to be exported by the entry point index.d.ts +// src/cache/core/cache.ts:94:9 - (ae-forgotten-export) The symbol "MissingTree" needs to be exported by the entry point index.d.ts +// src/cache/inmemory/policies.ts:98:3 - (ae-forgotten-export) The symbol "FragmentMap" needs to be exported by the entry point index.d.ts +// 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:134:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts +// src/core/ApolloClient.ts:159:5 - (ae-forgotten-export) The symbol "IgnoreModifier" needs to be exported by the entry point index.d.ts +// src/core/ApolloClient.ts:353:5 - (ae-forgotten-export) The symbol "NextFetchPolicyContext" needs to be exported by the entry point index.d.ts +// src/core/ObservableQuery.ts:360:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts +// src/core/QueryManager.ts:175:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts +// src/local-state/LocalState.ts:147:5 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/local-state/LocalState.ts:200:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts +// src/local-state/LocalState.ts:243:7 - (ae-forgotten-export) The symbol "LocalState" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/.changeset/afraid-grapes-call.md b/.changeset/afraid-grapes-call.md new file mode 100644 index 00000000000..e12a7b5c467 --- /dev/null +++ b/.changeset/afraid-grapes-call.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - imports +_superseded: "TODO" +--- + +Export `gql` from the `@apollo/client/react` entrypoint. diff --git a/.changeset/afraid-moons-arrive.md b/.changeset/afraid-moons-arrive.md new file mode 100644 index 00000000000..581204332ec --- /dev/null +++ b/.changeset/afraid-moons-arrive.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": minor +_tags: + - testing + - links +--- + +Allow mocked responses passed to `MockLink` to accept a callback for the `delay` option. The `delay` callback will be given the current operation which can be used to determine what delay should be used for the mock. diff --git a/.changeset/afraid-penguins-sniff.md b/.changeset/afraid-penguins-sniff.md new file mode 100644 index 00000000000..3dacabeea13 --- /dev/null +++ b/.changeset/afraid-penguins-sniff.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - errors + - graphql_over_http +--- + +Replace the `result` property on `ServerError` with `bodyText`. `bodyText` is set to the raw string body. `HttpLink` and `BatchHttpLink` no longer try and parse the response body as JSON when a `ServerError` is thrown. diff --git a/.changeset/beige-hornets-smash.md b/.changeset/beige-hornets-smash.md new file mode 100644 index 00000000000..147ff1284e7 --- /dev/null +++ b/.changeset/beige-hornets-smash.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - errors +--- + +Add an `extensions` property to `CombinedGraphQLErrors` to capture any extensions from the original response. diff --git a/.changeset/beige-houses-fail.md b/.changeset/beige-houses-fail.md new file mode 100644 index 00000000000..ee65601c254 --- /dev/null +++ b/.changeset/beige-houses-fail.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +The `includeExtensions` option of `HttpLink` and `BatchHttpLink` now defaults +to `true`. + +If `includeExtensions` is `true`, but `extensions` is not set or empty, extensions +will not be included in outgoing requests. diff --git a/.changeset/beige-kings-grow.md b/.changeset/beige-kings-grow.md new file mode 100644 index 00000000000..5f56dd2a524 --- /dev/null +++ b/.changeset/beige-kings-grow.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - defer + - network_status +--- + +A `@defer` query that has not yet finished streaming is now considered loading and thus the `loading` flag will be `true` until the response has completed. A new `NetworkStatus.streaming` value has been introduced and will be set as the `networkStatus` while the response is streaming. diff --git a/.changeset/beige-mirrors-talk.md b/.changeset/beige-mirrors-talk.md new file mode 100644 index 00000000000..9040729a8e2 --- /dev/null +++ b/.changeset/beige-mirrors-talk.md @@ -0,0 +1,18 @@ +--- +"@apollo/client": major +_tags: + - errors + - links +--- + +`onError` link now uses a single `error` property to report the error that caused the link callback to be called. This will be an instance of `CombinedGraphQLErrors` in the event GraphQL errors were emitted from the terminating link, `CombinedProtocolErrors` if the terminating link emitted protocol errors, or the unwrapped error type if any other non-GraphQL error was thrown or emitted. + +```diff +- const errorLink = onError(({ graphQLErrors, networkError, protocolErrors }) => { +- graphQLErrors.forEach(error => console.log(error.message)); ++ const errorLink = onError(({ error }) => { ++ if (error.name === 'CombinedGraphQLErrors') { ++ error.errors.forEach(rawError => console.log(rawError.message)); ++ } +}); +``` diff --git a/.changeset/beige-spiders-hope.md b/.changeset/beige-spiders-hope.md new file mode 100644 index 00000000000..f3d3dd3f714 --- /dev/null +++ b/.changeset/beige-spiders-hope.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - useQuery +--- + +When updating `skip` from `false` to `true` in `useQuery`, retain `data` if it is available rather than setting it to `undefined`. diff --git a/.changeset/big-paws-invent.md b/.changeset/big-paws-invent.md new file mode 100644 index 00000000000..5e235d1a00d --- /dev/null +++ b/.changeset/big-paws-invent.md @@ -0,0 +1,15 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": major +_tags: + - codemod +--- + +Add a codemod that renames old import locations from 3.x entrypoint to their 4.x entrypoint. + +Run the codemod using the following command: + +```sh +npx @apollo/client-codemod-migrate-3-to-4 --parser tsx ./src/**/*.{ts,tsx} +``` + +The codemod supports `.js`, `.jsx`, `.ts`, and `.tsx` files. diff --git a/.changeset/brave-moons-juggle.md b/.changeset/brave-moons-juggle.md new file mode 100644 index 00000000000..1ea288992a4 --- /dev/null +++ b/.changeset/brave-moons-juggle.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - ApolloClient +--- + +Remove the `typeDefs` option from `ApolloClient`. diff --git a/.changeset/brave-pandas-battle.md b/.changeset/brave-pandas-battle.md new file mode 100644 index 00000000000..a106913a2d7 --- /dev/null +++ b/.changeset/brave-pandas-battle.md @@ -0,0 +1,5 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": patch +--- + +Add a new `legacyEntryPoints` transformation step that moves imports from old legacy entry points like `@apollo/client/main.cjs` or `@apollo/client/react/react.cjs` to the new entry points like `@apollo/client` or `@apollo/client/react`. diff --git a/.changeset/brave-radios-wait.md b/.changeset/brave-radios-wait.md new file mode 100644 index 00000000000..97596c77414 --- /dev/null +++ b/.changeset/brave-radios-wait.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - rxjs +--- + +Remove the `asyncMap` utility function. Instead use one of the RxJS operators that creates Observables from promises, such as `from`. diff --git a/.changeset/bright-ads-share.md b/.changeset/bright-ads-share.md new file mode 100644 index 00000000000..559d639c058 --- /dev/null +++ b/.changeset/bright-ads-share.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ignore +_superseded: "Error.is" +--- + +Removes the `isApolloError` utility function to check if the error object is an `ApolloError` instance. Use `instanceof` to check for more specific error types that replace `ApolloError`. diff --git a/.changeset/brown-bobcats-joke.md b/.changeset/brown-bobcats-joke.md new file mode 100644 index 00000000000..dc238334806 --- /dev/null +++ b/.changeset/brown-bobcats-joke.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Ensure `HttpLink.ContextOptions` and `BatchHttpLink.ContextOptions` include `ClientAwarenessLink.ContextOptions`. diff --git a/.changeset/calm-frogs-remain.md b/.changeset/calm-frogs-remain.md new file mode 100644 index 00000000000..eecbead2265 --- /dev/null +++ b/.changeset/calm-frogs-remain.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - removals + - testing + - cache +--- + +Removes the `addTypename` option from `InMemoryCache` and `MockedProvider`. `__typename` is now always added to the outgoing query document when using `InMemoryCache` and cannot be disabled. + +If you are using `` with `addTypename={false}`, ensure that your mocked responses include a `__typename` field. This will ensure cache normalization kicks in and behaves more like production. diff --git a/.changeset/calm-seals-relate.md b/.changeset/calm-seals-relate.md new file mode 100644 index 00000000000..cb2762bab6c --- /dev/null +++ b/.changeset/calm-seals-relate.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - errors + - useQuery + - useLazyQuery +--- + +Remove the deprecated `errors` property from `useQuery` and `useLazyQuery`. Read errors from the `error` property instead. diff --git a/.changeset/chatty-planes-grin.md b/.changeset/chatty-planes-grin.md new file mode 100644 index 00000000000..4c318f7e749 --- /dev/null +++ b/.changeset/chatty-planes-grin.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - removals +--- + +Remove deprecated `resetApolloContext` export diff --git a/.changeset/chilly-hairs-kick.md b/.changeset/chilly-hairs-kick.md new file mode 100644 index 00000000000..9db6d7f4920 --- /dev/null +++ b/.changeset/chilly-hairs-kick.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`operation.getContext` now returns a `Readonly` type. diff --git a/.changeset/chilly-kiwis-pretend.md b/.changeset/chilly-kiwis-pretend.md new file mode 100644 index 00000000000..62b0220013b --- /dev/null +++ b/.changeset/chilly-kiwis-pretend.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +The `ApolloLink.Request` (i.e. `GraphQLRequest`) passed to `ApolloLink.execute` no longer accepts `operationName` and `operationType` options. These properties are derived from the `query` and set on the returned `ApolloLink.Operation` type. diff --git a/.changeset/clean-sheep-hide.md b/.changeset/clean-sheep-hide.md new file mode 100644 index 00000000000..c6544d76c85 --- /dev/null +++ b/.changeset/clean-sheep-hide.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": minor +_tags: + - removals + - dependencies +--- + +Drop `rehackt` dependency. +We can now directly import from `react` without causing build errors in RSC. diff --git a/.changeset/clean-sloths-travel.md b/.changeset/clean-sloths-travel.md new file mode 100644 index 00000000000..b5d962f5277 --- /dev/null +++ b/.changeset/clean-sloths-travel.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - imports +--- + +Export the `IgnoreModifier` type from `@apollo/client/cache`. diff --git a/.changeset/clever-islands-talk.md b/.changeset/clever-islands-talk.md new file mode 100644 index 00000000000..068b2757458 --- /dev/null +++ b/.changeset/clever-islands-talk.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - errors + - fetch_policy +--- + +An error is now thrown when trying to call `fetchMore` on a `cache-only` query. diff --git a/.changeset/clever-wolves-fly.md b/.changeset/clever-wolves-fly.md new file mode 100644 index 00000000000..bc8ab574502 --- /dev/null +++ b/.changeset/clever-wolves-fly.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +`cache.watchFragment` now returns an `Unmasked` result since `cache.watchFragment` does not mask fragment spreads. diff --git a/.changeset/clever-zebras-mate.md b/.changeset/clever-zebras-mate.md new file mode 100644 index 00000000000..6446650d0f1 --- /dev/null +++ b/.changeset/clever-zebras-mate.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - react +--- + +Drop support for React 16. diff --git a/.changeset/cool-bikes-shake.md b/.changeset/cool-bikes-shake.md new file mode 100644 index 00000000000..c89c5c72a57 --- /dev/null +++ b/.changeset/cool-bikes-shake.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": minor +_tags: + - removals + - polyfills +--- + +Remove polyfills for Object.freeze,seal and preventExtensions in React Native + +These polyfills were only necessary until React Native 0.59, which +[patched the problem](https://github.com/facebook/react-native/pull/21492) on +the React Native side. + +With React Native 0.61, the `Map` function was [completely replaced](https://github.com/facebook/react-native/commit/93b9ac74e59bbe84ea388d7c1879857b4acab114) +with a native implementation that never had the problems we guarded against. diff --git a/.changeset/cool-kiwis-hunt.md b/.changeset/cool-kiwis-hunt.md new file mode 100644 index 00000000000..bf8d4dfae94 --- /dev/null +++ b/.changeset/cool-kiwis-hunt.md @@ -0,0 +1,17 @@ +--- +"@apollo/client": minor +_tags: + - errors +--- + +Add ability to specify message formatter for `CombinedGraphQLErrors` and `CombinedProtocolErrors`. To provide your own message formatter, override the static `formatMessage` property on these classes. + +```ts +CombinedGraphQLErrors.formatMessage = (errors, { result, defaultFormatMessage }) => { + return "Some formatted message" +}; + +CombinedProtocolErrors.formatMessage = (errors, { defaultFormatMessage }) => { + return "Some formatted message" +}; +``` diff --git a/.changeset/cool-mice-visit.md b/.changeset/cool-mice-visit.md new file mode 100644 index 00000000000..06216034179 --- /dev/null +++ b/.changeset/cool-mice-visit.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +Add `dataState` to the value emitted from `client.watchFragment`. diff --git a/.changeset/cuddly-kangaroos-breathe.md b/.changeset/cuddly-kangaroos-breathe.md new file mode 100644 index 00000000000..b26dee3dd09 --- /dev/null +++ b/.changeset/cuddly-kangaroos-breathe.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Remove `DataProxy` namespace and interface. diff --git a/.changeset/cuddly-spiders-tie.md b/.changeset/cuddly-spiders-tie.md new file mode 100644 index 00000000000..7d3a381c229 --- /dev/null +++ b/.changeset/cuddly-spiders-tie.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - types +--- + +Remove `TSerialized` generic argument to `ApolloCache`. The `ApolloCache` base cache abstraction now returns `unknown` for `cache.extract` which can be overridden by a cache subclass. diff --git a/.changeset/curvy-flies-accept.md b/.changeset/curvy-flies-accept.md new file mode 100644 index 00000000000..307f72a7e84 --- /dev/null +++ b/.changeset/curvy-flies-accept.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - links +--- + +The `getCacheKey` function is no longer available from `operation.getContext()` in the link chain. Use `operation.client.cache.identify(obj)` in the link chain instead. diff --git a/.changeset/curvy-lamps-sing.md b/.changeset/curvy-lamps-sing.md new file mode 100644 index 00000000000..8dc30f2e57e --- /dev/null +++ b/.changeset/curvy-lamps-sing.md @@ -0,0 +1,46 @@ +--- +"@apollo/client": minor +_tags: + - types + - data_masking +--- + +Provide a mechanism to override the DataMasking types. + +Up until now, our types `Masked`, `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` would assume that you are stictly using the type output format of GraphQL Codegen. + +With this change, you can now modify the behaviour of those types if you use a different form of codegen that produces different types for your queries. + +A simple implementation that would override the `Masked` type to remove all fields starting with `_` from a type would look like this: + +```ts +// your actual implementation of `Masked` +type CustomMaskedImplementation = { + [K in keyof TData as K extends `_${string}` ? never : K]: TData[K]; +}; + +import { HKT } from "@apollo/client/utilities"; +// transform this type into a higher kinded type that can be evaulated at a later time +interface CustomMaskedType extends HKT { + arg1: unknown; // TData + return: CustomMaskedImplementation; +} + +// create an "implementation interface" for the types you want to override +export interface CustomDataMaskingImplementation { + Masked: CustomMaskedType; + // other possible keys: `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` +} +``` +then you would use that `CustomDataMaskingImplementation` interface in your project to extend the `TypeOverrides` interface exported by `@apollo/client` with it's functionality: + +```ts +declare module "@apollo/client" { + export interface TypeOverrides extends CustomDataMaskingImplementation {} +} +``` + +After that, all internal usage of `Masked` in Apollo Client as well as all usage in your code base will use the new `CustomMaskedType` implementation. + +If you don't specify overrides, Apollo Client will still default to the GraphQL Codegen data masking implementation. +The types for that are also explicitly exported as the `GraphQLCodegenDataMasking` namespace in `@apollo/client/masking`. diff --git a/.changeset/curvy-pianos-count.md b/.changeset/curvy-pianos-count.md new file mode 100644 index 00000000000..e568eebfa69 --- /dev/null +++ b/.changeset/curvy-pianos-count.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - useMutation +--- + +Remove deprecated `ignoreResults` option from `useMutation`. If you don't want to synchronize component state with the mutation, use `useApolloClient` to access your client instance and use `client.mutate` directly. diff --git a/.changeset/curvy-shoes-refuse.md b/.changeset/curvy-shoes-refuse.md new file mode 100644 index 00000000000..0a09e9174d1 --- /dev/null +++ b/.changeset/curvy-shoes-refuse.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - graphql_over_http + - errors +--- + +More strictly adhere to the [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http/draft/). This change adds support for the `application/graphql-response+json` media type and modifies the behavior of the `application/json` media type. + +- The client will parse the response as a well-formed GraphQL response when the server encodes `content-type` using `application/graphql-response+json` with a non-200 status code. +- The client will now throw a `ServerError` when the server encodes `content-type` using `application/json` and returns a non-200 status code. +- The client will now throw a `ServerError` when the server encodes using any other `content-type` and returns a non-200 status code. + +NOTE: If you use a testing utility to mock requests in your test, you may experience different behavior than production if your testing utility responds as `application/json` but your production server responds as `application/graphql-response+json`. If a `content-type` header is not set, the client interprets the response as `application/json`. diff --git a/.changeset/dirty-cobras-change.md b/.changeset/dirty-cobras-change.md new file mode 100644 index 00000000000..885c2367639 --- /dev/null +++ b/.changeset/dirty-cobras-change.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - removals + - imports +--- + +Move most of the utilities in `@apollo/client/utilities` to `@apollo/client/utilities/internal`. Many of the utilities exported from the `@apollo/client/utilities` endpoint were not considered stable. + +As a result of this change, utilities or types exported from `@apollo/client/utilities` are now documented and considered stable and will not undergo breaking changes. diff --git a/.changeset/dirty-eagles-poke.md b/.changeset/dirty-eagles-poke.md new file mode 100644 index 00000000000..0f21a97ace0 --- /dev/null +++ b/.changeset/dirty-eagles-poke.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - imports +--- + +Removed the `@apollo/client/react/context` and `@apollo/client/react/hooks` entry points. Please use `@apollo/client/react` instead. diff --git a/.changeset/dirty-trees-pump.md b/.changeset/dirty-trees-pump.md new file mode 100644 index 00000000000..e16e621715a --- /dev/null +++ b/.changeset/dirty-trees-pump.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +_superseded: "by retain" +--- + +Unusubscribing from `ObservableQuery` while a request is in flight will no longer terminate the request by unsubscribing from the link observable. diff --git a/.changeset/early-eggs-develop.md b/.changeset/early-eggs-develop.md new file mode 100644 index 00000000000..d3112d3c2c7 --- /dev/null +++ b/.changeset/early-eggs-develop.md @@ -0,0 +1,25 @@ +--- +"@apollo/client": minor +_tags: + - testing + - links +--- + +Introduce a new `realisticDelay` helper function for use with the `delay` callback for mocked responses used with `MockLink`. `realisticDelay` will generate a random value between 20 and 50ms to provide an experience closer to unpredictable network latency. `realisticDelay` can be configured with a `min` and `max` to set different thresholds if the defaults are not sufficient. + +```ts +import { realisticDelay } from '@apollo/client/testing'; + +new MockLink([ + { + request: { query }, + result: { data: { greeting: 'Hello' }}, + delay: realisticDelay() + }, + { + request: { query }, + result: { data: { greeting: 'Hello' }}, + delay: realisticDelay({ min: 10, max: 100 }) + }, +]); +``` diff --git a/.changeset/eighty-squids-fix.md b/.changeset/eighty-squids-fix.md new file mode 100644 index 00000000000..fb36d51b3a2 --- /dev/null +++ b/.changeset/eighty-squids-fix.md @@ -0,0 +1,18 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - removals +--- + +`ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead. + +```diff +const observable = client.watchQuery(options); + +// Use reobserve to set new options and reevaluate the query +- observable.setOptions(newOptions); ++ observable.reobserve(newOptions); +``` + +As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change. diff --git a/.changeset/eleven-candles-smoke.md b/.changeset/eleven-candles-smoke.md new file mode 100644 index 00000000000..5f7587f2086 --- /dev/null +++ b/.changeset/eleven-candles-smoke.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - types +--- + +Change the `unsafePreviousData` argument on `UpdateQueryMapFn` and `SubscribeToMoreQueryFn` to a `DeepPartial` since the result may contain partial data. diff --git a/.changeset/eleven-kangaroos-jump.md b/.changeset/eleven-kangaroos-jump.md new file mode 100644 index 00000000000..1bbde7e04be --- /dev/null +++ b/.changeset/eleven-kangaroos-jump.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useSubscription + - removals +--- + +Remove `variables` from the result returned from `useSubscription`. diff --git a/.changeset/eleven-moons-heal.md b/.changeset/eleven-moons-heal.md new file mode 100644 index 00000000000..8ef48e70015 --- /dev/null +++ b/.changeset/eleven-moons-heal.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - cache +--- + +Remove deprecated `resultCacheMaxSize` option from `InMemoryCache` options. diff --git a/.changeset/empty-meals-swim.md b/.changeset/empty-meals-swim.md new file mode 100644 index 00000000000..cab884a43b9 --- /dev/null +++ b/.changeset/empty-meals-swim.md @@ -0,0 +1,20 @@ +--- +"@apollo/client": major +_tags: + - ApolloClient +--- + +The `ApolloClient` constructor options `name` and `version` that are used to +configure the client awareness feature have moved onto a `clientAwareness` key. + +```diff +const client = new ApolloClient({ + // .. +- name: "my-app", +- version: "1.0.0", ++ clientAwareness: { ++ name: "my-app", ++ version: "1.0.0", ++ }, +}); +``` diff --git a/.changeset/empty-rabbits-move.md b/.changeset/empty-rabbits-move.md new file mode 100644 index 00000000000..c359b433444 --- /dev/null +++ b/.changeset/empty-rabbits-move.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +The `previousData` property on `useLazyQuery` will now change only when `data` changes. Previously `previousData` would change to the same value as `data` while the query was loading. diff --git a/.changeset/empty-rats-cough.md b/.changeset/empty-rats-cough.md new file mode 100644 index 00000000000..93628665122 --- /dev/null +++ b/.changeset/empty-rats-cough.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - queries +--- + +Aliasing any other field to `__typename` is now forbidden. diff --git a/.changeset/few-crabs-move.md b/.changeset/few-crabs-move.md new file mode 100644 index 00000000000..1815ca65798 --- /dev/null +++ b/.changeset/few-crabs-move.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +`ObservableQuery` will now keep previous `data` around when emitting a `loading` state, unless `query` or `variables` changed. +Note that `@exports` variables are not taken into account for this, so `data` will stay around even if they change. diff --git a/.changeset/few-donuts-perform.md b/.changeset/few-donuts-perform.md new file mode 100644 index 00000000000..c98dd0aec4f --- /dev/null +++ b/.changeset/few-donuts-perform.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Report masked fragments as complete even when a nested masked fragment contains partial data. diff --git a/.changeset/five-crabs-remember.md b/.changeset/five-crabs-remember.md new file mode 100644 index 00000000000..fee3d1c1bc5 --- /dev/null +++ b/.changeset/five-crabs-remember.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`TVariables` now always `extends OperationVariables` in all interfaces. diff --git a/.changeset/flat-readers-invite.md b/.changeset/flat-readers-invite.md new file mode 100644 index 00000000000..8ca29e27e49 --- /dev/null +++ b/.changeset/flat-readers-invite.md @@ -0,0 +1,68 @@ +--- +"@apollo/client-graphql-codegen": major +_tags: + - codegen + - LocalState +--- + +Introduce a new GraphQL Codegen plugin aimed at creating resolver types for `LocalState`. This plugin is similar to `@graphql-codegen/typescript-resolvers` but tailored to provide types that work with `LocalState`. + +To use the plugin, install `@apollo/client-graphql-codegen` and add the following to your codegen config: + +```ts +// codegen.ts + +const config: CodegenConfig = { + // ... + generates: { + "./path/to/local/resolvers.ts": { + schema: [ + "./path/to/localSchema.graphql", + ], + plugins: [ + "typescript", + "@apollo/client-graphql-codegen/local-state", + ], + // ... + } + } +} +``` + +This will generate a `Resolvers` type in the generated file that can be used to provide type information to `LocalState`. + +```ts +import type { Resolvers } from "./path/to/resolvers-types.ts"; + +const localState = new LocalState({ + // ... +}); +``` + +It is also recommended to add the following config: +```ts +// codegen.ts +import type { LocalStatePluginConfig } from "@apollo/client-graphql-codegen/local-state"; + +const config: CodegenConfig = { + // ... + generates: { + "./path/to/local/resolvers.ts": { + config: { + // Ensures you return a `__typename` for any `@client` fields that + // return object or array types + nonOptionalTypename: true, + + // Required if your localSchema extends existing schema types. + baseTypesPath: "./relative/path/to/base/schema/types", + + // If you provide a `context` function to customize the context value, + // provide the path or type here. + contextType: "./path/to/contextValue#ContextValue", + } satisfies LocalStatePluginConfig + } + } +} +``` + +NOTE: It is recommended that the schema file passed to the `schema` option is your local schema, not your entire app schema in order to only generate resolver types for your local fields, otherwise the plugin will generate resolver types for your entire remote schema as well. diff --git a/.changeset/flat-suns-watch.md b/.changeset/flat-suns-watch.md new file mode 100644 index 00000000000..aca2c786b17 --- /dev/null +++ b/.changeset/flat-suns-watch.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +Add an entrypoint at `@apollo/client/v4-migration` that includes removed values and types. Each export includes doc blocks on how to migrate away from the removed type. diff --git a/.changeset/fluffy-shoes-applaud.md b/.changeset/fluffy-shoes-applaud.md new file mode 100644 index 00000000000..ba54e286819 --- /dev/null +++ b/.changeset/fluffy-shoes-applaud.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - removals + - client.watchQuery + - useQuery +--- + +Remove deprecated `partialRefetch` option. diff --git a/.changeset/forty-hairs-occur.md b/.changeset/forty-hairs-occur.md new file mode 100644 index 00000000000..e25d491286a --- /dev/null +++ b/.changeset/forty-hairs-occur.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - network_status +--- + +Calling `refetch` with new variables will now set the `networkStatus` to `refetch` instead of `setVariables`. diff --git a/.changeset/forty-shrimps-fry.md b/.changeset/forty-shrimps-fry.md new file mode 100644 index 00000000000..27d5c0c880d --- /dev/null +++ b/.changeset/forty-shrimps-fry.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - types + - errors + - client.subscribe +--- + +Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`. diff --git a/.changeset/forty-tomatoes-punch.md b/.changeset/forty-tomatoes-punch.md new file mode 100644 index 00000000000..72cd28d5599 --- /dev/null +++ b/.changeset/forty-tomatoes-punch.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - useLazyQuery + - network_status +--- + +The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables. diff --git a/.changeset/four-countries-clean.md b/.changeset/four-countries-clean.md new file mode 100644 index 00000000000..72e5151fcae --- /dev/null +++ b/.changeset/four-countries-clean.md @@ -0,0 +1,26 @@ +--- +"@apollo/client": minor +_tags: + - errors +--- + +Add a static `is` method to error types defined by Apollo Client. `is` makes it simpler to determine whether an error is a specific type, which can be helpful in cases where you'd like to narrow the error type in order to use specific properties from that error. + +This change applies to the following error types: +- `CombinedGraphQLErrors` +- `CombinedProtocolErrors` +- `ServerError` +- `ServerParseError` +- `UnconventionalError` + +**Example** + +```ts +import { CombinedGraphQLErrors } from "@apollo/client"; + +if (CombinedGraphQLErrors.is(error)) { + console.log(error.message); + error.errors.forEach((graphQLError) => console.log(graphQLError.message)) +} +``` + diff --git a/.changeset/four-ghosts-watch.md b/.changeset/four-ghosts-watch.md new file mode 100644 index 00000000000..b53a278b715 --- /dev/null +++ b/.changeset/four-ghosts-watch.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - errors +--- + +Network errors triggered by queries now adhere to the `errorPolicy`. This means that GraphQL errors and network errors now behave the same way. Previously promise-based APIs, such as `client.query`, would reject the promise with the network error even if `errorPolicy` was set to `ignore`. The promise is now resolved with the `error` property set to the network error instead. diff --git a/.changeset/four-rockets-live.md b/.changeset/four-rockets-live.md new file mode 100644 index 00000000000..a98757de067 --- /dev/null +++ b/.changeset/four-rockets-live.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +--- + +If you use an incremental delivery handler, you now have to explicitly opt into adding the chunk types to the `ApolloLink.Result` type. + + +```ts title="apollo-client.d.ts +import { Defer20220824Handler } from "@apollo/client/incremental"; + +declare module "@apollo/client" { + export interface TypeOverrides extends Defer20220824Handler.TypeOverrides {} +} +``` diff --git a/.changeset/four-tables-cheat.md b/.changeset/four-tables-cheat.md new file mode 100644 index 00000000000..9fca92cfade --- /dev/null +++ b/.changeset/four-tables-cheat.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +`cache-only` queries are no longer refetched when calling `client.reFetchObservableQueries` when `includeStandby` is `true`. diff --git a/.changeset/four-toes-serve.md b/.changeset/four-toes-serve.md new file mode 100644 index 00000000000..b5952482011 --- /dev/null +++ b/.changeset/four-toes-serve.md @@ -0,0 +1,6 @@ +--- +"@apollo/client": major +--- + +HTTP Multipart handling will now throw an error if the connection closed before the final boundary has been received. +Data after the final boundary will be ignored. diff --git a/.changeset/fresh-moose-hope.md b/.changeset/fresh-moose-hope.md new file mode 100644 index 00000000000..cd3cc41fb53 --- /dev/null +++ b/.changeset/fresh-moose-hope.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove the `iterateObserversSafely` utility function. diff --git a/.changeset/fresh-swans-remain.md b/.changeset/fresh-swans-remain.md new file mode 100644 index 00000000000..a6d8b8db8f0 --- /dev/null +++ b/.changeset/fresh-swans-remain.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - ignore +--- + +Fix a bug where the new `operationType` property wasn't passed into `operation`. diff --git a/.changeset/friendly-news-drive.md b/.changeset/friendly-news-drive.md new file mode 100644 index 00000000000..434b76ecb68 --- /dev/null +++ b/.changeset/friendly-news-drive.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +The `serializeFetchParameter` helper is no longer exported and `JSON.stringify` is used directly. As such, the `ClientParseError` type has also been removed in favor of throwing any JSON serialize errors directly. diff --git a/.changeset/friendly-olives-refuse.md b/.changeset/friendly-olives-refuse.md new file mode 100644 index 00000000000..4994b0b5598 --- /dev/null +++ b/.changeset/friendly-olives-refuse.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - testing +--- + +Remove the `@apollo/client/testing/experimental` test utilities. Use [GraphQL Testing Library](https://github.com/apollographql/graphql-testing-library) instead. diff --git a/.changeset/friendly-walls-think.md b/.changeset/friendly-walls-think.md new file mode 100644 index 00000000000..de59793b9fb --- /dev/null +++ b/.changeset/friendly-walls-think.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ignore +--- + +Version bump only to release latest as `rc`. diff --git a/.changeset/funny-boats-wink.md b/.changeset/funny-boats-wink.md new file mode 100644 index 00000000000..6dc803f2687 --- /dev/null +++ b/.changeset/funny-boats-wink.md @@ -0,0 +1,37 @@ +--- +"@apollo/client": minor +_tags: + - LocalState +--- + +Revamp local resolvers and fix several issues from the existing `resolvers` option. +- Throwing errors in a resolver will set the field value as `null` and add an error to the response's `errors` array. +- Remote results are dealiased before they are passed as the parent object to a resolver so that you can access fields by their field name. +- You can now specify a `context` function that you can use to customize the `requestContext` given to resolvers. +- The `LocalState` class accepts a `Resolvers` generic that provides autocompletion and type checking against your resolver types to ensure your resolvers are type-safe. +- `data: null` is now handled correctly and does not call your local resolvers when the server does not provide a result. +- Additional warnings have been added to provide hints when resolvers behave unexpectedly. + +```ts +import { LocalState } from "@apollo/client/local-state"; + +import { Resolvers } from "./path/to/local-resolvers-types.ts"; + +// LocalState now accepts a `Resolvers` generic. +const localState = new LocalState({ + // The return value of this funciton + context: (options) => ({ + // ... + }), + resolvers: { + // ... + } +}); + +// You may also pass a `ContextValue` generic used to ensure the `context` +// function returns the correct type. This type is inferred from your resolvers +// if not provided. +new LocalState({ + // ... +}); +``` diff --git a/.changeset/funny-jeans-invent.md b/.changeset/funny-jeans-invent.md new file mode 100644 index 00000000000..38fda07aa98 --- /dev/null +++ b/.changeset/funny-jeans-invent.md @@ -0,0 +1,20 @@ +--- +"@apollo/client": major +_tags: + - ssr + - ApolloClient + - fetch_policy +--- + +`ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked: + +Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery` +while one of those were active would permanently be changed from a `fetchPolicy` +of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way +even long after `disableNetworkFetches` would have been deactivated. + +Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries +made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement +at request time, just for that one request. + +`ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour. diff --git a/.changeset/funny-terms-deny.md b/.changeset/funny-terms-deny.md new file mode 100644 index 00000000000..8dad340b3d0 --- /dev/null +++ b/.changeset/funny-terms-deny.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +`ObservableQuery.variables` can now be reset back to empty when calling `reobserve` with `variables: undefined`. Previously the `variables` key would be ignored so `variables` would remain unchanged. diff --git a/.changeset/fuzzy-plants-approve.md b/.changeset/fuzzy-plants-approve.md new file mode 100644 index 00000000000..1c77c64d182 --- /dev/null +++ b/.changeset/fuzzy-plants-approve.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": patch +_tags: + - removals + - types +--- + +Remove these incremental-format-specific types: + +* `ExecutionPatchIncrementalResult` +* `ExecutionPatchInitialResult` +* `ExecutionPatchResult` +* `IncrementalPayload` +* `Path` diff --git a/.changeset/fuzzy-seahorses-hunt.md b/.changeset/fuzzy-seahorses-hunt.md new file mode 100644 index 00000000000..19e750c6d30 --- /dev/null +++ b/.changeset/fuzzy-seahorses-hunt.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - links + - removals +--- + +Remove code that strips `@client` fields in `HttpLink` and `BatchHttpLink`. This was unused code since core handles removing `@client` fields and should have no observable change. diff --git a/.changeset/fuzzy-tips-sit.md b/.changeset/fuzzy-tips-sit.md new file mode 100644 index 00000000000..4518791cd6d --- /dev/null +++ b/.changeset/fuzzy-tips-sit.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - ObservableQuery + - polling +--- + +Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume. diff --git a/.changeset/gentle-badgers-train.md b/.changeset/gentle-badgers-train.md new file mode 100644 index 00000000000..e8381063dc8 --- /dev/null +++ b/.changeset/gentle-badgers-train.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - types +--- + +`never` is no longer supported as a valid `TVariables` generic argument for APIs that require `variables` as part of its type. Use `Record` instead. diff --git a/.changeset/gentle-files-laugh.md b/.changeset/gentle-files-laugh.md new file mode 100644 index 00000000000..497fdd09ec1 --- /dev/null +++ b/.changeset/gentle-files-laugh.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - ApolloClient +--- + +Remove deprecated `connectToDevtools` option from `ApolloClientOptions`. Use `devtools.enabled` instead. diff --git a/.changeset/gentle-waves-cough.md b/.changeset/gentle-waves-cough.md new file mode 100644 index 00000000000..eb9d9d8fdab --- /dev/null +++ b/.changeset/gentle-waves-cough.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - links + - removals +--- + +The `cache` and `forceFetch` properties are no longer available on context when calling `operation.getContext()`. `cache` can be accessed through the `operation` with `operation.client.cache` instead. `forceFetch` has been replaced with `queryDeduplication` which specifies whether `queryDeduplication` was enabled for the request or not. diff --git a/.changeset/giant-apes-thank.md b/.changeset/giant-apes-thank.md new file mode 100644 index 00000000000..0f13c4b8d1c --- /dev/null +++ b/.changeset/giant-apes-thank.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - links + - removals +--- + +Remove the `onError` and `setOnError` methods from `ApolloLink`. `onError` was only used by `MockLink` to rewrite errors if `setOnError` was used. diff --git a/.changeset/giant-bags-share.md b/.changeset/giant-bags-share.md new file mode 100644 index 00000000000..4af1c7d38d4 --- /dev/null +++ b/.changeset/giant-bags-share.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - errors + - links +--- + +Throw an error for queries and mutations if the link chain completes without emitting a value. diff --git a/.changeset/gold-oranges-double.md b/.changeset/gold-oranges-double.md new file mode 100644 index 00000000000..5fc6f7d4569 --- /dev/null +++ b/.changeset/gold-oranges-double.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - removals +--- + +Removed `getLastResult`, `getLastError` and `resetLastResults` from `ObservableQuery` diff --git a/.changeset/gold-planets-cover.md b/.changeset/gold-planets-cover.md new file mode 100644 index 00000000000..fa6b0ea4d2b --- /dev/null +++ b/.changeset/gold-planets-cover.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - rxjs + - dependencies +--- + +Downgrade minimum supported `rxjs` peer dependency version to 7.3.0. diff --git a/.changeset/gold-sloths-battle.md b/.changeset/gold-sloths-battle.md new file mode 100644 index 00000000000..abebd42f685 --- /dev/null +++ b/.changeset/gold-sloths-battle.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +Unsubscribing from an `ObservableQuery` before a value has been emitted will remove the query from the tracked list of queries and will no longer be eligible for query deduplication. diff --git a/.changeset/gold-worms-compete.md b/.changeset/gold-worms-compete.md new file mode 100644 index 00000000000..6acbdc6ad98 --- /dev/null +++ b/.changeset/gold-worms-compete.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`operation.operationType` is now a non-null `OperationTypeNode`. It is now safe to compare this value without having to check for `undefined`. diff --git a/.changeset/good-dolphins-peel.md b/.changeset/good-dolphins-peel.md new file mode 100644 index 00000000000..aaed53711cd --- /dev/null +++ b/.changeset/good-dolphins-peel.md @@ -0,0 +1,116 @@ +--- +"@apollo/client": major +_tags: + - errors + - removals +--- + +Apollo Client no longer wraps errors in `ApolloError`. `ApolloError` has been replaced with separate error classes depending on the cause of the error. As such, APIs that return an `error` property have been updated to use the generic `Error` type. Use `instanceof` to check for more specific error types. + +## Migration guide + +`ApolloError` encapsulated 4 main error properties. The type of error would determine which property was set: +- `graphqlErrors` - Errors returned from the `errors` field by the GraphQL server +- `networkError` - Any non-GraphQL error that caused the query to fail +- `protocolErrors` - Transport-level errors that occur during [multipart HTTP subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) +- `clientErrors` - A space to define custom errors. Mostly unused. + +These errors were mutally exclusive, meaning both `networkError` and `graphqlErrors` were never set simultaneously. The following replaces each of these fields from `ApolloError`. + +### `graphqlErrors` + +GraphQL errors are now encapsulated in a `CombinedGraphQLErrors` instance. You can access the raw GraphQL errors via the `errors` property. + +```js +import { CombinedGraphQLErrors } from '@apollo/client'; + +// ... + +const { error } = useQuery(query); + +if (error && error instanceof CombinedGraphQLErrors) { + console.log(error.errors); +} +``` + +### `networkError` + +Network errors are no longer wrapped and are instead passed through directly. + +```js +const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + observer.error(new Error('Test error')); + }) + }) +}) + +// ... + +const { error } = useQuery(query); + +// error is `new Error('Test error')`; +``` + +### `protocolErrors` + +Protocol errors are now encapsulated in a `CombinedProtocolErrors` instance. You can access the raw protocol errors via the `errors` property. + + +```js +import { CombinedProtocolErrors } from '@apollo/client'; + +// ... + +const { error } = useSubscription(subscription); + +if (error && error instanceof CombinedProtocolErrors) { + console.log(error.errors); +} +``` + +### `clientErrors` + +These were unused by the client and have no replacement. Any non-GraphQL or non-protocol errors are now passed through unwrapped. + +### Strings as errors + +If the link sends a string error, Apollo Client will wrap this in an `Error` instance. This ensures `error` properties are guaranteed to be of type `Error`. + +```js +const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + // Oops we sent a string instead of wrapping it in an `Error` + observer.error('Test error'); + }) + }) +}) + +// ... + +const { error } = useQuery(query); + +// The error string is wrapped and returned as `new Error('Test error')`; +``` + +### Non-error types + +If the link chain sends any other object type as an error, Apollo Client will wrap this in an `UnknownError` instance with the [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) set to the original object. This ensures `error` properties are guaranteed to be of type `Error`. + +```js +const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + observer.error({ message: 'Not a proper error type' }); + }) + }) +}) + +// ... + +const { error } = useQuery(query); + +// error is an `UnknownError` instance. error.cause returns the original object. +``` diff --git a/.changeset/good-kings-tell.md b/.changeset/good-kings-tell.md new file mode 100644 index 00000000000..0e334e8b60c --- /dev/null +++ b/.changeset/good-kings-tell.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`operation.operationName` is now set as `string | undefined` where `undefined` represents an anonymous query. Previously `operationName` would return an empty string as the `operationName` for anonymous queries. diff --git a/.changeset/gorgeous-chefs-tap.md b/.changeset/gorgeous-chefs-tap.md new file mode 100644 index 00000000000..67b1b97ae1e --- /dev/null +++ b/.changeset/gorgeous-chefs-tap.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - types + - ApolloClient + - removals +--- + +Remove the `TCacheShape` generic argument to `ApolloClient`. `client.extract()` now returns `unknown` by default. You will either need to type-cast this to the expected serialized shape, or use the `cache.extract()` directly from the subclass to get more specific types. diff --git a/.changeset/great-peaches-design.md b/.changeset/great-peaches-design.md new file mode 100644 index 00000000000..8008736dcc3 --- /dev/null +++ b/.changeset/great-peaches-design.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +--- + +Apply document transforms before reading data from the cache for `client.readQuery`, `client.readFragment`, `client.watchFragment`, `useFragment`, and `useSuspenseFragment`. + +NOTE: This change does not affect the equivalent `cache.*` APIs. To read data from the cache without first running document transforms, run `cache.readQuery`, `cache.readFragment`, etc. diff --git a/.changeset/great-roses-jog.md b/.changeset/great-roses-jog.md new file mode 100644 index 00000000000..f418b46a675 --- /dev/null +++ b/.changeset/great-roses-jog.md @@ -0,0 +1,25 @@ +--- +"@apollo/client": patch +_tags: + - types + - client.query + - client.mutate + - client.subscribe + - client.watchQuery + - useBackgroundQuery + - useQuery + - useSubscription + - useSuspenseQuery +--- + +The `variables` option used with various APIs are now enforced more consistently across the client when `TVariables` contains required variables. If required `variables` are not provided, TypeScript will now complain that it requires a `variables` option. + +This change affects the following APIs: +- `client.query` +- `client.mutate` +- `client.subscribe` +- `client.watchQuery` +- `useBackgroundQuery` +- `useQuery` +- `useSubscription` +- `useSuspenseQuery` diff --git a/.changeset/great-scissors-jam.md b/.changeset/great-scissors-jam.md new file mode 100644 index 00000000000..05ecc29c0ef --- /dev/null +++ b/.changeset/great-scissors-jam.md @@ -0,0 +1,12 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - network_status + - fetch_policy + - useQuery +--- + +`cache-only` queries will now initialize with `loading: false` and `networkStatus: NetworkStatus.ready` when there is no data in the cache. + +This means `useQuery` will no longer render a short initial loading state before rendering `loading: false` and `ObservableQuery.getCurrentResult()` will now return `loading: false` immediately. diff --git a/.changeset/great-seas-buy.md b/.changeset/great-seas-buy.md new file mode 100644 index 00000000000..d4542886e4c --- /dev/null +++ b/.changeset/great-seas-buy.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +`invariant.error` will now also log in production builds, not only dev builds diff --git a/.changeset/grumpy-vans-type.md b/.changeset/grumpy-vans-type.md new file mode 100644 index 00000000000..118468eee89 --- /dev/null +++ b/.changeset/grumpy-vans-type.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - errors +--- + +Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`. diff --git a/.changeset/healthy-apes-sneeze.md b/.changeset/healthy-apes-sneeze.md new file mode 100644 index 00000000000..eb4afc5b939 --- /dev/null +++ b/.changeset/healthy-apes-sneeze.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - errors + - removals + - rxjs +--- + +Remove `fromError` utility function. Use [`throwError`](https://rxjs.dev/api/index/function/throwError) instead. diff --git a/.changeset/healthy-books-flash.md b/.changeset/healthy-books-flash.md new file mode 100644 index 00000000000..9929998acb7 --- /dev/null +++ b/.changeset/healthy-books-flash.md @@ -0,0 +1,38 @@ +--- +"@apollo/client": major +_tags: + - types + - dataState +--- + +The `TData` generic provided to types that return a `dataState` property is now modified by the given `DataState` generic instead of passing a modified `TData` type. For example, a `QueryRef` that could return partial data was defined as `QueryRef, TVariables>`. Now `TData` should be provided unmodified and a set of allowed states should be given instead: `QueryRef`. + +To migrate, use the following guide to replace your type with the right set of states (all types listed below are changed the same way): + +```diff +- QueryRef +// `QueryRef`'s default is 'complete' | 'streaming' so this can also be left alone if you prefer +// All other types affected by this change default to all states ++ QueryRef ++ QueryRef + +- QueryRef ++ QueryRef + +- QueryRef, TVariables> ++ QueryRef + +- QueryRef | undefined, TVariables> ++ QueryRef +``` + +The following types are affected. Provide the allowed `dataState` values to the `TDataState` generic: +- `ApolloQueryResult` +- `QueryRef` +- `PreloadedQueryRef` +- `useLazyQuery.Result` +- `useQuery.Result` +- `useReadQuery.Result` +- `useSuspenseQuery.Result` + +All `*QueryRef` types default to `complete | streaming` states while the rest of the types default to `'complete' | 'streaming' | 'partial' | 'empty'` states. You shouldn't need to provide the states unless you need to either allow for partial data/empty values (`*QueryRef`) or a restricted set of states. diff --git a/.changeset/healthy-ghosts-report.md b/.changeset/healthy-ghosts-report.md new file mode 100644 index 00000000000..e2ce1a1b76f --- /dev/null +++ b/.changeset/healthy-ghosts-report.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": minor +_tags: + - types + - dataState +--- + +The callback function that can be passed to the `ApolloClient.mutate` +`refetchQueries` option will now receive a `FormattedExecutionResult` with an +additional `dataState` option that describes if the result is `"streaming"` +or `"complete"`. +This indicates whether the `data` value is of type +* `Unmasked` (if `"complete"`) +* `Streaming>` (if `"streaming"`) diff --git a/.changeset/heavy-donkeys-arrive.md b/.changeset/heavy-donkeys-arrive.md new file mode 100644 index 00000000000..65b98a4189e --- /dev/null +++ b/.changeset/heavy-donkeys-arrive.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Introduce a versioning policy. diff --git a/.changeset/heavy-files-smash.md b/.changeset/heavy-files-smash.md new file mode 100644 index 00000000000..1d2c6a57dda --- /dev/null +++ b/.changeset/heavy-files-smash.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +--- + +The `concat`, `from`, and `split` functions on `ApollLink` no longer support a plain request handler function. Please wrap the request handler with `new ApolloLink`. + +```diff +const link = new ApolloLink(/* ... */); + +link.concat( +- (operation, forward) => forward(operation), ++ new ApolloLink((operation, forward) => forward(operation)), +); +``` diff --git a/.changeset/heavy-ways-call.md b/.changeset/heavy-ways-call.md new file mode 100644 index 00000000000..a6910b6140d --- /dev/null +++ b/.changeset/heavy-ways-call.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Disallow the `mutation` option for the `mutate` function returned from `useMutation`. diff --git a/.changeset/hip-vans-act.md b/.changeset/hip-vans-act.md new file mode 100644 index 00000000000..862d693b0d7 --- /dev/null +++ b/.changeset/hip-vans-act.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - types +--- + +Default `TVariables` generic type to `OperationVariables` instead of `any` throughout the client in areas that did not yet have the default as such. diff --git a/.changeset/hot-cycles-notice.md b/.changeset/hot-cycles-notice.md new file mode 100644 index 00000000000..3840b5bdf92 --- /dev/null +++ b/.changeset/hot-cycles-notice.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove the deprecated `graphql`, `withQuery`, `withMutation`, `withSubscription`, and `withApollo` hoc components. Use the provided React hooks instead. diff --git a/.changeset/hot-seahorses-film.md b/.changeset/hot-seahorses-film.md new file mode 100644 index 00000000000..166e1ba7bce --- /dev/null +++ b/.changeset/hot-seahorses-film.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - queries +--- + +Aliasing a field to an alias beginning with `__ac_` is now forbidden - this namespace is now reserved for internal use. diff --git a/.changeset/hungry-bikes-cough.md b/.changeset/hungry-bikes-cough.md new file mode 100644 index 00000000000..b579f0634bd --- /dev/null +++ b/.changeset/hungry-bikes-cough.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - types + - useLazyQuery +--- + +Fix type of `variables` returned from `useLazyQuery`. When `called` is `false`, `variables` is now `Partial` instead of `TVariables`. diff --git a/.changeset/itchy-chefs-run.md b/.changeset/itchy-chefs-run.md new file mode 100644 index 00000000000..7b64ed8a8af --- /dev/null +++ b/.changeset/itchy-chefs-run.md @@ -0,0 +1,26 @@ +--- +"@apollo/client": major +_tags: + - queries + - ObservableQuery +--- + +When passing a `variables` key with the value `undefined`, the value will be replaced by the default value in the query, if it is provided, rather than leave it as `undefined`. + +```ts +// given this query +const query = gql` + query PaginatedQuery($limit: Int! = 10, $offset: Int) { + list(limit: $limit, offset: $offset) { + id + } + } +` + +const observable = client.query({ query, variables: { limit: 5, offset: 0 }}); +console.log(observable.variables) // => { limit: 5, offset: 0 } + +observable.reobserve({ variables: { limit: undefined, offset: 10 }}) +// limit is now `10`. This would previously be `undefined` +console.log(observable.variables) // => { limit: 10, offset: 10 } +``` diff --git a/.changeset/itchy-drinks-refuse.md b/.changeset/itchy-drinks-refuse.md new file mode 100644 index 00000000000..83bbd8c4ee8 --- /dev/null +++ b/.changeset/itchy-drinks-refuse.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove `itAsync` test utility. diff --git a/.changeset/itchy-roses-accept.md b/.changeset/itchy-roses-accept.md new file mode 100644 index 00000000000..2a1146d7469 --- /dev/null +++ b/.changeset/itchy-roses-accept.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - other +--- + +Use an an empty object (`{}`) rather than an object with `null` prototype (`Object.create(null)`) in all areas that instantiate objects. diff --git a/.changeset/khaki-bears-destroy.md b/.changeset/khaki-bears-destroy.md new file mode 100644 index 00000000000..e7d70733b47 --- /dev/null +++ b/.changeset/khaki-bears-destroy.md @@ -0,0 +1,31 @@ +--- +"@apollo/client": major +_tags: + - features + - links +--- + +Adds enhanced client awareness to the client. + +`HttpLink` and `BatchHttpLink` will now per default send information about the +client library you are using in `extensions`. + +This could look like this: + +```json +{ + "query": "query GetUser($id: ID!) { user(id: $id) { __typename id name } }", + "variables": { + "id": 5 + }, + "extensions": { + "clientLibrary": { + "name": "@apollo/client", + "version": "4.0.0" + } + } +} +``` + +This feature can be disabled by passing `enhancedClientAwareness: { transport: false }` to your +`ApolloClient`, `HttpLink` or `BatchHttpLink` constructor options. diff --git a/.changeset/khaki-coats-prove.md b/.changeset/khaki-coats-prove.md new file mode 100644 index 00000000000..60e21a0b4d1 --- /dev/null +++ b/.changeset/khaki-coats-prove.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +The new `SetContextLink` flips the `prevContext` and `operation` arguments in the callback. The `setContext` function has remained unchanged. + +```diff +- new SetContextLink((operation, prevContext) => { ++ new SetContextLink((prevContext, operation) => { + // ... +}) +``` diff --git a/.changeset/khaki-keys-deliver.md b/.changeset/khaki-keys-deliver.md new file mode 100644 index 00000000000..7c8ccb19b6b --- /dev/null +++ b/.changeset/khaki-keys-deliver.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - network_status +--- + +An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`. diff --git a/.changeset/khaki-spies-work.md b/.changeset/khaki-spies-work.md new file mode 100644 index 00000000000..82747689996 --- /dev/null +++ b/.changeset/khaki-spies-work.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - types + - removals +--- + +Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include: +- `BaseMutationOptions` +- `BaseQueryOptions` +- `BaseSubscriptionOptions` +- `ObservableQueryFields` +- `MutationSharedOptions` +- `QueryFunctionOptions` diff --git a/.changeset/kind-crews-warn.md b/.changeset/kind-crews-warn.md new file mode 100644 index 00000000000..3e6cf4590b9 --- /dev/null +++ b/.changeset/kind-crews-warn.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - removals +--- + +`ObservableQuery` no longer has a `queryId` property. +`ApolloClient.getObservableQueries` no longer returns a `Map`, but a `Set`. diff --git a/.changeset/kind-fishes-develop.md b/.changeset/kind-fishes-develop.md new file mode 100644 index 00000000000..bce3cafbda2 --- /dev/null +++ b/.changeset/kind-fishes-develop.md @@ -0,0 +1,20 @@ +--- +"@apollo/client": major +_tags: + - errors +_superseded: "XError.is" +--- + +Updates the `ServerError` and `ServerParseError` types to be proper `Error` subclasses. Perviously these were plain `Error` intances with additional properties added at runtime. All properties are retained, but `instanceof` checks now work correctly. + +```js +import { ServerError, ServerParseError } from '@apollo/client'; + +if (error instanceof ServerError) { + // ... +} + +if (error instanceof ServerParseError) { + // ... +} +``` diff --git a/.changeset/kind-taxis-thank.md b/.changeset/kind-taxis-thank.md new file mode 100644 index 00000000000..cb596152c91 --- /dev/null +++ b/.changeset/kind-taxis-thank.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": patch +_tags: + - LocalState +--- + +Don't warn about a missing resolver if a `@client` does not have a configured resolver. It is possible the cache contains a `read` function for the field and the warning added confusion. + +Note that `read` functions without a defined resolver will receive the `existing` argument as `null` instead of `undefined` even when data hasn't been written to the cache. This is because `LocalState` sets a default value of `null` when a resolver is not defined to ensure that the field contains a value in case a `read` function is not defined rather than omitting the field entirely. diff --git a/.changeset/large-plants-know.md b/.changeset/large-plants-know.md new file mode 100644 index 00000000000..40909215cb5 --- /dev/null +++ b/.changeset/large-plants-know.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - useLazyQuery + - network_status +--- + +Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`. diff --git a/.changeset/late-bottles-add.md b/.changeset/late-bottles-add.md new file mode 100644 index 00000000000..72c0786399d --- /dev/null +++ b/.changeset/late-bottles-add.md @@ -0,0 +1,23 @@ +--- +"@apollo/client": patch +--- + +`InMemoryCache`: Fields with an empty argument object are now saved the same way as fields without arguments. + +Previously, it was possible that the reponses for these two queries would be stored differently in the cache: + +```gql +query PlainAccess { + myField +} +``` +would be stored as `myField` +and +```gql +query AccessWithoutOptionalArgument($optional: String) { + myField(optional: $optional) +} +``` +would be stored as `myField({"optional":"Foo"})` if called with `{optional: "Foo"}` and as `myField({})` if called without the optional argument. + +The cases `myField` and `myField({})` are equivalent from the perspective of a GraphQL server, and so in the future both of these will be stored as `myField` in the cache. diff --git a/.changeset/late-trainers-peel.md b/.changeset/late-trainers-peel.md new file mode 100644 index 00000000000..e5b2efdd6ba --- /dev/null +++ b/.changeset/late-trainers-peel.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": patch +_tags: + - bundling + - removals + - imports +--- + +* dropped the deprecated `DEV` export from `@apollo/client/utilities` and `@apollo/client/utilities/globals` +* moved the `__DEV__` export from `@apollo/client/utilities/globals` to `@apollo/client/utilities/environment` +* moved the `invariant`, `newInvariantError` and `InvariantError` exports from `@apollo/client/utilities/globals` to `@apollo/client/utilities/invariant` diff --git a/.changeset/lazy-baboons-rescue.md b/.changeset/lazy-baboons-rescue.md new file mode 100644 index 00000000000..772dd99ca32 --- /dev/null +++ b/.changeset/lazy-baboons-rescue.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": patch +_tags: + - defer + - links +--- + +Slightly rework multipart response parsing. + +This removes last incremental-protocol-specific details from `HttpLink` and `BatchHttpLink`. diff --git a/.changeset/lemon-carrots-breathe.md b/.changeset/lemon-carrots-breathe.md new file mode 100644 index 00000000000..66f62caf4e0 --- /dev/null +++ b/.changeset/lemon-carrots-breathe.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +`RetryLink` now emits a `next` event instead of an `error` event when encountering a protocol errors for multipart subscriptions when the operation is not retried. This ensures the observable notification remains the same as when `RetryLink` is not used. diff --git a/.changeset/lemon-pans-sit.md b/.changeset/lemon-pans-sit.md new file mode 100644 index 00000000000..80b760c43d1 --- /dev/null +++ b/.changeset/lemon-pans-sit.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - client.refetchQueries +--- + +`cache-only` queries are now excluded from `client.refetchQueries` in all situations. `cache-only` queries affected by `updateCache` are also excluded from `refetchQueries` when `onQueryUpdated` is not provided. diff --git a/.changeset/light-apes-rescue.md b/.changeset/light-apes-rescue.md new file mode 100644 index 00000000000..fa573557cca --- /dev/null +++ b/.changeset/light-apes-rescue.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useQuery + - removals +--- + +`useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options. diff --git a/.changeset/light-dolphins-taste.md b/.changeset/light-dolphins-taste.md new file mode 100644 index 00000000000..5db39f6cfc1 --- /dev/null +++ b/.changeset/light-dolphins-taste.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery + - ssr +--- + +`useLazyQuery` no longer supports SSR environments and will now throw if the `execute` function is called in SSR. If you need to run a query in an SSR environment, use `useQuery` instead. diff --git a/.changeset/light-sloths-end.md b/.changeset/light-sloths-end.md new file mode 100644 index 00000000000..65caaf129c6 --- /dev/null +++ b/.changeset/light-sloths-end.md @@ -0,0 +1,19 @@ +--- +"@apollo/client": minor +_tags: + - bundling + - dependencies +--- + +Apollo Client is no longer using `ts-invariant`, but ships with a modified variant of it. + +The existing export `setLogVerbosity` from `@apollo/client` is still available and +now points to this new integration. +**In most cases, you should be using this export.** +It will no longer adjust the verbosity of `ts-invariant` and as such no longer +influence other packages relying on `ts-invariant`. + +The new entry point `@apollo/client/utilities/invariant` now exports `invariant`, +`InvariantError` and `setVerbosity`. +(Note that these tools are mostly meant to be used by Apollo Client and libraries directly +based on Apollo Client like the `@apollo/client-integration-*` packages.) diff --git a/.changeset/little-parrots-bow.md b/.changeset/little-parrots-bow.md new file mode 100644 index 00000000000..ca6a7fb5bd9 --- /dev/null +++ b/.changeset/little-parrots-bow.md @@ -0,0 +1,18 @@ +--- +"@apollo/client": major +_tags: + - removals + - LocalState + - ApolloClient +--- + +Removes the `resolvers` option from `ApolloClient`. Local resolvers have instead been moved to the new `LocalState` instance which is assigned to the `localState` option in `ApolloClient`. To migrate, move the `resolvers` values into a `LocalState` instance and assign that instance to `localState`. + +```diff +new ApolloClient({ +- resolvers: { /* ... */ } ++ localState: new LocalState({ ++ resolvers: { /* ... */ } ++ }), +}); +``` diff --git a/.changeset/little-spoons-kick.md b/.changeset/little-spoons-kick.md new file mode 100644 index 00000000000..a8c780a4541 --- /dev/null +++ b/.changeset/little-spoons-kick.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - types + - errors + - removals +--- + +`client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server. + +`useMutation` now also returns a `MutateResult` instead of a `FetchResult`. diff --git a/.changeset/loud-cows-raise.md b/.changeset/loud-cows-raise.md new file mode 100644 index 00000000000..7261b42d70a --- /dev/null +++ b/.changeset/loud-cows-raise.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": patch +_tags: + - useQuery + - ssr + - fetch_policy +--- + +`useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`). + +This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set. diff --git a/.changeset/lucky-camels-compete.md b/.changeset/lucky-camels-compete.md new file mode 100644 index 00000000000..f3251a6a2b7 --- /dev/null +++ b/.changeset/lucky-camels-compete.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - ignore +--- + +Export `getMainDefinition` from `@apollo/client/utilities`. diff --git a/.changeset/lucky-donkeys-behave.md b/.changeset/lucky-donkeys-behave.md new file mode 100644 index 00000000000..5b4143f5506 --- /dev/null +++ b/.changeset/lucky-donkeys-behave.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - ignore +--- + +Version bump only to release latest as `rc`. diff --git a/.changeset/lucky-hats-push.md b/.changeset/lucky-hats-push.md new file mode 100644 index 00000000000..16a20b3b050 --- /dev/null +++ b/.changeset/lucky-hats-push.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery + - removals +--- + +The execute function returned from `useLazyQuery` now only supports the `context` and `variables` options. This means that passing options supported by the hook no longer override the hook value. + +To change options, rerender the component with new options. These options will take effect with the next query execution. diff --git a/.changeset/lucky-sheep-explain.md b/.changeset/lucky-sheep-explain.md new file mode 100644 index 00000000000..d805c79d719 --- /dev/null +++ b/.changeset/lucky-sheep-explain.md @@ -0,0 +1,37 @@ +--- +"@apollo/client": minor +_tags: + - types + - links +--- + +Provide an extension to define types for `context` passed to the link chain. To define your own types, use [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) to add properties to the `DefaultContext` type. + +```ts +// @apollo-client.d.ts +// This import is necessary to ensure all Apollo Client imports +// are still available to the rest of the application. +import '@apollo/client'; + +declare module "@apollo/client" { + interface DefaultContext extends Record { + myProperty: string; + } +} +``` + +Links that provide context options can be used with this type to add those context types to `DefaultContext`. For example, to add context options from `HttpLink`, add the following code: + +```ts +import { HttpLink } from "@apollo/client"; + +declare module "@apollo/client" { + interface DefaultContext extends HttpLink.ContextOptions { + myProperty: string; + } +} +``` + +At this time, the following built-in links support context options: +- `HttpLink.ContextOptions` +- `BatchHttpLink.ContextOptions` diff --git a/.changeset/many-buses-allow.md b/.changeset/many-buses-allow.md new file mode 100644 index 00000000000..0683422bcce --- /dev/null +++ b/.changeset/many-buses-allow.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": patch +_tags: + - useMutation + - errors + - bugfix +--- + +Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`. diff --git a/.changeset/many-papayas-hide.md b/.changeset/many-papayas-hide.md new file mode 100644 index 00000000000..fc43751f8a5 --- /dev/null +++ b/.changeset/many-papayas-hide.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - errors +--- + +`ObservableQuery` will no longer terminate on errors and will instead emit a `next` value with an `error` property. This ensures that `ObservableQuery` instances can continue to receive updates after errors are returned in requests without the need to resubscribe to the observable. diff --git a/.changeset/many-seas-call.md b/.changeset/many-seas-call.md new file mode 100644 index 00000000000..923ecfe8945 --- /dev/null +++ b/.changeset/many-seas-call.md @@ -0,0 +1,13 @@ +--- +"@apollo/client": major +_tags: + - useQuery +--- + +Changing most options when rerendering `useQuery` will no longer trigger a `reobserve` which may cause network fetches. Instead, the changed options will be applied to the next cache update or fetch. + +Options that now trigger a `reobserve` when changed between renders are: +- `query` +- `variables` +- `skip` +- Changing `fetchPolicy` to or from `standby` diff --git a/.changeset/mean-beans-agree.md b/.changeset/mean-beans-agree.md new file mode 100644 index 00000000000..afb83479439 --- /dev/null +++ b/.changeset/mean-beans-agree.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Generic arguments for `Cache.ReadOptions` were flipped from `TVariables, TData` to `TData, TVariables`. diff --git a/.changeset/mean-doors-clap.md b/.changeset/mean-doors-clap.md new file mode 100644 index 00000000000..4d906c1fdbc --- /dev/null +++ b/.changeset/mean-doors-clap.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": major +--- + +You must now opt in to use GraphQL Codegen data masking types when using Apollo Client's data masking feature. By default, Apollo Client now uses an identity type to apply to masked/unmasked types. + +If you're using GraphQL Codegen to generate masked types, opt into the GraphQL Codegen masked types using declaration merging on the `TypeOverides` interface. + +```ts title="apollo-client.d.ts +import { GraphQLCodegenDataMasking } from "@apollo/client/masking"; + +declare module "@apollo/client" { + export interface TypeOverrides extends GraphQLCodegenDataMasking.TypeOverrides {} +} +``` diff --git a/.changeset/mean-lizards-think.md b/.changeset/mean-lizards-think.md new file mode 100644 index 00000000000..c1469d9ced0 --- /dev/null +++ b/.changeset/mean-lizards-think.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - useLazyQuery + - removals +--- + +Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type. diff --git a/.changeset/metal-needles-search.md b/.changeset/metal-needles-search.md new file mode 100644 index 00000000000..15a688b140f --- /dev/null +++ b/.changeset/metal-needles-search.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - ObservableQuery + - rxjs +--- + +ObservableQuery: implement the `rxjs` `InteropObservable` interface to ensure `from(observableQuery)` stays possible diff --git a/.changeset/mighty-buckets-hide.md b/.changeset/mighty-buckets-hide.md new file mode 100644 index 00000000000..11b5d00be08 --- /dev/null +++ b/.changeset/mighty-buckets-hide.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Ensure the `error` argument for the `delay` and `attempts` functions on `RetryLink` are an `ErrorLike`. diff --git a/.changeset/mighty-carrots-bathe.md b/.changeset/mighty-carrots-bathe.md new file mode 100644 index 00000000000..90f279a52fc --- /dev/null +++ b/.changeset/mighty-carrots-bathe.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": minor +_tags: + - fetchMore +--- + +Allow passing `errorPolicy` option to `fetchMore` and change default value to "none". + diff --git a/.changeset/mighty-jobs-drum.md b/.changeset/mighty-jobs-drum.md new file mode 100644 index 00000000000..ab1f4136e99 --- /dev/null +++ b/.changeset/mighty-jobs-drum.md @@ -0,0 +1,6 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": patch +"@apollo/client": patch +--- + +Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead. diff --git a/.changeset/mighty-penguins-wink.md b/.changeset/mighty-penguins-wink.md new file mode 100644 index 00000000000..1aa0f1f9014 --- /dev/null +++ b/.changeset/mighty-penguins-wink.md @@ -0,0 +1,20 @@ +--- +"@apollo/client": major +_tags: + - removals + - errors + - links +--- + +Removes the `throwServerError` utility function. Now that `ServerError` is an +`Error` subclass, you can throw these errors directly: + +```js +import { ServerError } from '@apollo/client'; + +// instead of +throwServerError(response, result, 'error message') + +// Use +throw new ServerError('error message', { response, result }) +``` diff --git a/.changeset/mighty-spies-mix.md b/.changeset/mighty-spies-mix.md new file mode 100644 index 00000000000..7cbcab88791 --- /dev/null +++ b/.changeset/mighty-spies-mix.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +--- + +The types mode for data masking has been removed. Adding a types mode to the `DataMasking` interface has no effect. Remove the `mode` key in the module where you declare the `DataMasking` type for the `@apollo/client` module. + +As a result, the `Masked` and `MaskedDocumentNode` types have also been removed since these have no effect when types are preserved. diff --git a/.changeset/modern-feet-do.md b/.changeset/modern-feet-do.md new file mode 100644 index 00000000000..fb54f451c30 --- /dev/null +++ b/.changeset/modern-feet-do.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - types + - removals +--- + +`@apollo/client`, `@apollo/client/core` and `@apollo/client/cache` no longer export an empty `Cache` runtime object. This is meant to be a type-only namespace. diff --git a/.changeset/moody-lobsters-listen.md b/.changeset/moody-lobsters-listen.md new file mode 100644 index 00000000000..684fb6453a3 --- /dev/null +++ b/.changeset/moody-lobsters-listen.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - types + - cache +--- + +The `Cache.DiffResult` type is now a union type with better type safety for both complete and partial results. Checking `diff.complete` will now narrow the type of `result` depending on whether the value is `true` or `false`. + +When `true`, `diff.result` will be a non-null value equal to the `T` generic type. When `false`, `diff.result` now reports `result` as `DeepPartial | null` indicating that fields in the result may be missing (`DeepPartial`) or empty entirely (`null`). diff --git a/.changeset/nasty-mayflies-smoke.md b/.changeset/nasty-mayflies-smoke.md new file mode 100644 index 00000000000..cf1e62cecfa --- /dev/null +++ b/.changeset/nasty-mayflies-smoke.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - bundling +--- + +Ship React Compiler compiled React hooks in `@apollo/client/react/compiled`. + +We now ship a React-Compiler compiled version of the React hooks in +`@apollo/client/react/compiled`. + +This entry point contains everything that `@apollo/client/react` does, +so you can use it as a drop-in replacement in your whole application +if you choose to use the compiled hooks. diff --git a/.changeset/nervous-fireants-bow.md b/.changeset/nervous-fireants-bow.md new file mode 100644 index 00000000000..fdd0288d929 --- /dev/null +++ b/.changeset/nervous-fireants-bow.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - errors +--- + +Add a `data` property to `CombinedGraphQLErrors` that captures any partial data returned by the GraphQL response when `errors` are also returned. diff --git a/.changeset/nervous-goats-allow.md b/.changeset/nervous-goats-allow.md new file mode 100644 index 00000000000..3c81d04c1df --- /dev/null +++ b/.changeset/nervous-goats-allow.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useQuery + - removals +--- + +Removes the `defaultOptions` option from `useQuery`. Use options directly or use the global `ApolloClient` `defaultOptions`. diff --git a/.changeset/new-apes-care.md b/.changeset/new-apes-care.md new file mode 100644 index 00000000000..ecda90b23ff --- /dev/null +++ b/.changeset/new-apes-care.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - types + - removals +--- + +Remove the deprecated `QueryReference` type. Please use `QueryRef` instead. diff --git a/.changeset/nice-donkeys-reflect.md b/.changeset/nice-donkeys-reflect.md new file mode 100644 index 00000000000..2057cd375a8 --- /dev/null +++ b/.changeset/nice-donkeys-reflect.md @@ -0,0 +1,13 @@ +--- +"@apollo/client": major +_tags: + - errors + - removals + - ObservableQuery + - client.watchQuery + - client.query + - useQuery + - useLazyQuery +--- + +Remove the `errors` property from the results emitted from `ObservableQuery` or returned from `client.query`. Read errors from the `error` property instead. diff --git a/.changeset/nice-dots-matter.md b/.changeset/nice-dots-matter.md new file mode 100644 index 00000000000..ee91cba47c5 --- /dev/null +++ b/.changeset/nice-dots-matter.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - removals +--- + +Removed the `parser` cache. The functionality has been replaced in a way that doesn't need caching. diff --git a/.changeset/nice-waves-work.md b/.changeset/nice-waves-work.md new file mode 100644 index 00000000000..e981ad4ac6c --- /dev/null +++ b/.changeset/nice-waves-work.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - types + - useLazyQuery +_superseded: "return type" +--- + +The result resolved from the promise returned from the execute function in `useLazyQuery` is now an `ApolloQueryResult` type and no longer includes all the fields returned from the `useLazyQuery` hook tuple. + +If you need access to the additional properties such as `called`, `refetch`, etc. not included in `ApolloQueryResult`, read them from the hook instead. diff --git a/.changeset/nine-jokes-kiss.md b/.changeset/nine-jokes-kiss.md new file mode 100644 index 00000000000..b0e2b5bad68 --- /dev/null +++ b/.changeset/nine-jokes-kiss.md @@ -0,0 +1,5 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": minor +--- + +Extend `imports` codemod, add new `links` and `removals` (via #12838) codemods. diff --git a/.changeset/nine-lamps-accept.md b/.changeset/nine-lamps-accept.md new file mode 100644 index 00000000000..248c705d414 --- /dev/null +++ b/.changeset/nine-lamps-accept.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": minor +--- + +`ApolloLink`'s `concat` method now accepts multiple links to concatenate together. + +```ts +const first = new ApolloLink(); + +const link = first.concat(second, third, fouth); +``` diff --git a/.changeset/ninety-bags-bake.md b/.changeset/ninety-bags-bake.md new file mode 100644 index 00000000000..93719f32209 --- /dev/null +++ b/.changeset/ninety-bags-bake.md @@ -0,0 +1,21 @@ +--- +"@apollo/client": major +_tags: + - testing + - links + - removals +--- + +Mocked responses passed to `MockLink` now accept a callback for the `request.variables` option. This is used to determine if the mock should be matched for a set of request variables. With this change, the `variableMatcher` option has been removed in favor of passing a callback to `variables`. Update by moving the callback function from `variableMatcher` to `request.variables`. + +```diff +new MockLink([ + { + request: { + query, ++ variables: (requestVariables) => true + }, +- variableMatcher: (requestVariables) => true + } +]); +``` diff --git a/.changeset/ninety-nails-compete.md b/.changeset/ninety-nails-compete.md new file mode 100644 index 00000000000..cd879b8e425 --- /dev/null +++ b/.changeset/ninety-nails-compete.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": minor +_tags: + - ApolloClient +--- + +Renamed `client.reFetchObservableQueries` to `client.refetchObservableQueries`. +`client.reFetchObservableQueries` is still available as an alias, but is now +deprecated and will be removed in a future major version. diff --git a/.changeset/odd-chicken-hide.md b/.changeset/odd-chicken-hide.md new file mode 100644 index 00000000000..d58e46da150 --- /dev/null +++ b/.changeset/odd-chicken-hide.md @@ -0,0 +1,20 @@ +--- +"@apollo/client": minor +_tags: + - errors + - links +--- + +Add the ability to detect if an error was an error was emitted from the link chain. This is useful if your application throws custom errors in other areas of the application and you'd like to differentiate them from errors emitted by the link chain itself. + +To detect if an error was emitted from the link chain, use `LinkError.is`. + +```ts +import { LinkError } from "@apollo/client"; + +client.query({ query }).catch((error) => { + if (LinkError.is(error)) { + // This error originated from the link chain + } +}); +``` diff --git a/.changeset/odd-lemons-relax.md b/.changeset/odd-lemons-relax.md new file mode 100644 index 00000000000..c09a7c6dad6 --- /dev/null +++ b/.changeset/odd-lemons-relax.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - types +--- + +Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5. diff --git a/.changeset/odd-spiders-dream.md b/.changeset/odd-spiders-dream.md new file mode 100644 index 00000000000..41dba93ca75 --- /dev/null +++ b/.changeset/odd-spiders-dream.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`ApolloConsumer` has been removed - please use `useApolloClient` instead. diff --git a/.changeset/old-avocados-cover.md b/.changeset/old-avocados-cover.md new file mode 100644 index 00000000000..ca9d7dea6b4 --- /dev/null +++ b/.changeset/old-avocados-cover.md @@ -0,0 +1,17 @@ +--- +"@apollo/client": minor +_tags: + - graphql_over_http +--- + +Adjusted the accept header for multipart requests according to the new GraphQL over HTTP spec with these changes: + +```diff +-multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json ++multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/graphql-response+json,application/json;q=0.9 +``` + +```diff +-multipart/mixed;deferSpec=20220824,application/json ++multipart/mixed;deferSpec=20220824,application/graphql-response+json,application/json;q=0.9 +``` diff --git a/.changeset/old-mangos-grin.md b/.changeset/old-mangos-grin.md new file mode 100644 index 00000000000..9e8eda5388b --- /dev/null +++ b/.changeset/old-mangos-grin.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - types + - errors +--- + +Fix type of `error` argument on the `onError` option for `subscribeToMore` to `ErrorLike`. diff --git a/.changeset/old-melons-double.md b/.changeset/old-melons-double.md new file mode 100644 index 00000000000..246f10a82e2 --- /dev/null +++ b/.changeset/old-melons-double.md @@ -0,0 +1,13 @@ +--- +"@apollo/client": major +_tags: + - fetchMore +--- + +Rework option handling for `fetchMore`. + +* Previously, if the `query` option was specified, no options would be inherited +from the underlying `ObservableQuery`. +Now, even if `query` is specified, all unspecified options except for `variables` will be inherited from the underlying `ObservableQuery`. +* If `query` is not specified, `variables` will still be shallowly merged with the `variables` of the underlying `ObservableQuery`. If a `query` option is specified, the `variables` passed to `fetchMore` are used instead. +* `errorPolicy` of `fetchMore` will now always default to `"none"` instead of inherited from the `ObservableQuery` options. This can prevent accidental cache writes of partial data for a paginated query. To opt into receive partial data that may be written to the cache, pass an `errorPolicy` to `fetchMore` to override the default. diff --git a/.changeset/olive-cougars-ring.md b/.changeset/olive-cougars-ring.md new file mode 100644 index 00000000000..e817a04f81b --- /dev/null +++ b/.changeset/olive-cougars-ring.md @@ -0,0 +1,13 @@ +--- +"@apollo/client": major +_tags: + - LocalState + - removals + - ApolloClient +--- + +Remove local resolvers APIs from `ApolloClient` in favor of `localState`. Methods removed are: +- `addResolvers` +- `getResolvers` +- `setResolvers` +- `setLocalStateFragmentMatcher` diff --git a/.changeset/orange-suits-laugh.md b/.changeset/orange-suits-laugh.md new file mode 100644 index 00000000000..db34a33775b --- /dev/null +++ b/.changeset/orange-suits-laugh.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - types + - useMutation +--- + +Adjust `useMutation` types to better handle required variables. When required variables are missing, TypeScript will now complain if they are not provided either to the hook or the returned `mutate` function. Providing required variables to `useMutation` will make them optional in the returned `mutate` function. diff --git a/.changeset/perfect-ducks-reflect.md b/.changeset/perfect-ducks-reflect.md new file mode 100644 index 00000000000..6b5a0961ee2 --- /dev/null +++ b/.changeset/perfect-ducks-reflect.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +`ApolloLink.execute` now requires a third argument which provides the `client` that initiated the request to the link chain. If you use `execute` directly, add a third argument with a `client` property: + +```ts +ApolloLink.execute(link, operation, { client }); + +// or if you import the `execute` function directly: +execute(link, operation, { client }); +``` diff --git a/.changeset/perfect-vans-give.md b/.changeset/perfect-vans-give.md new file mode 100644 index 00000000000..ec2357424ff --- /dev/null +++ b/.changeset/perfect-vans-give.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - imports + - bundling +--- + +The `@apollo/client` and `@apollo/client/core` entry points are now equal. +In the next major, the `@apollo/client/core` entry point will be removed. +Please change imports over from `@apollo/client/core` to `@apollo/client`. diff --git a/.changeset/pink-ladybugs-cough.md b/.changeset/pink-ladybugs-cough.md new file mode 100644 index 00000000000..30b4d9cf5be --- /dev/null +++ b/.changeset/pink-ladybugs-cough.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": minor +_tags: + - client.subscribe + - features +--- + +Subscriptions created by `client.subscribe()` can now be restarted. Restarting a subscription will terminate the connection with the link chain and recreate the request. Restarts also work across deduplicated subscriptions so calling `restart` on an `observable` who's request is deduplicated will restart the connection for each observable. + +```ts +const observable = client.subscribe({ query: subscription }); + +// Restart the connection to the link +observable.restart(); +``` diff --git a/.changeset/plenty-deers-clean.md b/.changeset/plenty-deers-clean.md new file mode 100644 index 00000000000..25b5e852772 --- /dev/null +++ b/.changeset/plenty-deers-clean.md @@ -0,0 +1,30 @@ +--- +"@apollo/client": major +_tags: + - types + - dataState +--- + +Added a new `Streaming` type that will mark `data` in results while `dataState` +is `"streaming"`. + +`Streaming` defaults to `TData`, but can be overwritten in userland to +integrate with different codegen dialects. + +You can override this type globally - this example shows how to override it +with `DeepPartial`: +```ts +import { HKT, DeepPartial } from "@apollo/client/utilities"; + +type StreamingOverride = DeepPartial; + +interface StreamingOverrideHKT extends HKT { + return: StreamingOverride; +} + +declare module "@apollo/client" { + export interface TypeOverrides { + Streaming: StreamingOverrideHKT; + } +} +``` diff --git a/.changeset/plenty-flies-relate.md b/.changeset/plenty-flies-relate.md new file mode 100644 index 00000000000..6dc22b133e1 --- /dev/null +++ b/.changeset/plenty-flies-relate.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +update type of `HttpLink.Options.fetchOptions` to `RequestInit` diff --git a/.changeset/polite-bees-care.md b/.changeset/polite-bees-care.md new file mode 100644 index 00000000000..7e589c918bb --- /dev/null +++ b/.changeset/polite-bees-care.md @@ -0,0 +1,29 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery + - network_status +--- + +`useLazyQuery` will no longer rerender with the loading state when calling the execute function the first time unless the `notifyOnNetworkStatusChange` option is set to `true` (which is the new default). + +If you prefer the behavior from 3.x, rerender the component with +`notifyOnNetworkStatusChange` set to `false` after the execute function is +called the first time. + +```ts +function MyComponent() { + const [notifyOnNetworkStatusChange, setNotifyOnNetworkStatusChange] = useState(true); + const [execute] = useLazyQuery(query, { notifyOnNetworkStatusChange }); + + async function runExecute() { + await execute(); + + // Set to false after the initial fetch to stop receiving notifications + // about changes to the loading states. + setNotifyOnNetworkStatusChange(false); + } + + // ... +} +``` diff --git a/.changeset/poor-eels-punch.md b/.changeset/poor-eels-punch.md new file mode 100644 index 00000000000..ba154678a83 --- /dev/null +++ b/.changeset/poor-eels-punch.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - errors +--- + +Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors. diff --git a/.changeset/poor-spiders-hunt.md b/.changeset/poor-spiders-hunt.md new file mode 100644 index 00000000000..ae81d925bf2 --- /dev/null +++ b/.changeset/poor-spiders-hunt.md @@ -0,0 +1,25 @@ +--- +"@apollo/client": minor +_tags: + - types +--- + +Move `MockLink` types to `MockLink` namespace. This affects the `MockedResponse`, `MockLinkOptions`, and `ResultFunction` types. These types are still exported but are deprecated in favor of the namespace. To migrate, use the types on the `MockLink` namespace instead. + +```diff +import { +- MockedResponse, +- MockLinkOptions, +- ResultFunction, ++ MockLink +} from "@apollo/client/testing"; + +- const mocks: MockedResponse = []; ++ const mocks: MockLink.MockedResponse = []; + +- const result: ResultFunction = () => {/* ... */ } ++ const result: MockLink.ResultFunction = () => {/* ... */ } + +- const options: MockLinkOptions = {} ++ const options: MockLink.Options = {} +``` diff --git a/.changeset/popular-games-sleep.md b/.changeset/popular-games-sleep.md new file mode 100644 index 00000000000..03de0511de6 --- /dev/null +++ b/.changeset/popular-games-sleep.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - graphql_over_http +_superseded: "real-onions-drive" +--- + +Changes the default `Accept` header to `application/graphql-response+json`. diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000000..4d628cc4a6c --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,294 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "@apollo/client": "3.12.2", + "@apollo/client-codemod-migrate-3-to-4": "0.0.0", + "@apollo/client-graphql-codegen": "0.0.0" + }, + "changesets": [ + "afraid-grapes-call", + "afraid-moons-arrive", + "afraid-penguins-sniff", + "beige-hornets-smash", + "beige-houses-fail", + "beige-kings-grow", + "beige-mirrors-talk", + "beige-spiders-hope", + "big-paws-invent", + "brave-moons-juggle", + "brave-pandas-battle", + "brave-radios-wait", + "bright-ads-share", + "brown-bobcats-joke", + "calm-frogs-remain", + "calm-seals-relate", + "chatty-planes-grin", + "chilly-hairs-kick", + "chilly-kiwis-pretend", + "clean-sheep-hide", + "clean-sloths-travel", + "clever-islands-talk", + "clever-wolves-fly", + "clever-zebras-mate", + "cool-bikes-shake", + "cool-kiwis-hunt", + "cool-mice-visit", + "cuddly-kangaroos-breathe", + "cuddly-spiders-tie", + "curvy-flies-accept", + "curvy-lamps-sing", + "curvy-pianos-count", + "curvy-shoes-refuse", + "dirty-cobras-change", + "dirty-eagles-poke", + "dirty-trees-pump", + "early-eggs-develop", + "eighty-squids-fix", + "eleven-candles-smoke", + "eleven-kangaroos-jump", + "eleven-moons-heal", + "empty-meals-swim", + "empty-rabbits-move", + "empty-rats-cough", + "few-crabs-move", + "few-donuts-perform", + "five-crabs-remember", + "flat-readers-invite", + "flat-suns-watch", + "fluffy-shoes-applaud", + "forty-hairs-occur", + "forty-shrimps-fry", + "forty-tomatoes-punch", + "four-countries-clean", + "four-ghosts-watch", + "four-rockets-live", + "four-tables-cheat", + "four-toes-serve", + "fresh-moose-hope", + "fresh-swans-remain", + "friendly-news-drive", + "friendly-olives-refuse", + "friendly-walls-think", + "funny-boats-wink", + "funny-jeans-invent", + "funny-terms-deny", + "fuzzy-plants-approve", + "fuzzy-seahorses-hunt", + "fuzzy-tips-sit", + "gentle-badgers-train", + "gentle-files-laugh", + "gentle-waves-cough", + "giant-apes-thank", + "giant-bags-share", + "gold-oranges-double", + "gold-planets-cover", + "gold-sloths-battle", + "gold-worms-compete", + "good-dolphins-peel", + "good-kings-tell", + "gorgeous-chefs-tap", + "great-peaches-design", + "great-roses-jog", + "great-scissors-jam", + "great-seas-buy", + "grumpy-vans-type", + "healthy-apes-sneeze", + "healthy-books-flash", + "healthy-ghosts-report", + "heavy-donkeys-arrive", + "heavy-files-smash", + "heavy-ways-call", + "hip-vans-act", + "hot-cycles-notice", + "hot-seahorses-film", + "hungry-bikes-cough", + "itchy-chefs-run", + "itchy-drinks-refuse", + "itchy-roses-accept", + "khaki-bears-destroy", + "khaki-coats-prove", + "khaki-keys-deliver", + "khaki-spies-work", + "kind-crews-warn", + "kind-fishes-develop", + "kind-taxis-thank", + "large-plants-know", + "late-bottles-add", + "late-trainers-peel", + "lazy-baboons-rescue", + "lemon-carrots-breathe", + "lemon-pans-sit", + "light-apes-rescue", + "light-dolphins-taste", + "light-sloths-end", + "little-parrots-bow", + "little-spoons-kick", + "loud-cows-raise", + "lucky-camels-compete", + "lucky-donkeys-behave", + "lucky-hats-push", + "lucky-sheep-explain", + "many-buses-allow", + "many-papayas-hide", + "many-seas-call", + "mean-beans-agree", + "mean-doors-clap", + "mean-lizards-think", + "metal-needles-search", + "mighty-buckets-hide", + "mighty-carrots-bathe", + "mighty-jobs-drum", + "mighty-penguins-wink", + "mighty-spies-mix", + "modern-feet-do", + "moody-lobsters-listen", + "nasty-mayflies-smoke", + "nervous-fireants-bow", + "nervous-goats-allow", + "new-apes-care", + "nice-donkeys-reflect", + "nice-dots-matter", + "nice-waves-work", + "nine-jokes-kiss", + "nine-lamps-accept", + "ninety-bags-bake", + "ninety-nails-compete", + "odd-chicken-hide", + "odd-lemons-relax", + "odd-spiders-dream", + "old-avocados-cover", + "old-mangos-grin", + "old-melons-double", + "olive-cougars-ring", + "orange-suits-laugh", + "perfect-ducks-reflect", + "perfect-vans-give", + "pink-ladybugs-cough", + "plenty-deers-clean", + "plenty-flies-relate", + "polite-bees-care", + "poor-eels-punch", + "poor-spiders-hunt", + "popular-games-sleep", + "pretty-rocks-behave", + "proud-walls-shave", + "purple-balloons-accept", + "purple-bears-flash", + "purple-eyes-divide", + "purple-lions-cough", + "quiet-balloons-wave", + "rare-apes-drive", + "rare-dingos-doubt", + "rare-houses-prove", + "real-gorillas-move", + "real-onions-drive", + "real-teachers-peel", + "real-turtles-boil", + "rich-eagles-cross", + "rich-kids-carry", + "rich-turtles-clap", + "rude-crabs-eat", + "rude-fans-study", + "rude-parrots-suffer", + "selfish-spoons-approve", + "serious-items-develop", + "serious-moons-juggle", + "seven-dragons-repair", + "seven-foxes-melt", + "seven-jeans-trade", + "seven-schools-carry", + "shaggy-pugs-add", + "shaggy-singers-tickle", + "sharp-glasses-sneeze", + "sharp-lemons-bathe", + "shiny-carrots-invent", + "short-jokes-jam", + "short-months-complain", + "short-tomatoes-attend", + "shy-experts-cough", + "silent-lobsters-try", + "silent-needles-build", + "silly-knives-exist", + "silly-maps-sit", + "silly-seas-confess", + "silly-starfishes-compare", + "six-jars-fix", + "sixty-bats-cry", + "sixty-bears-bathe", + "slimy-adults-attend", + "slimy-ants-bake", + "slimy-chicken-melt", + "slimy-maps-press", + "slimy-meals-work", + "slimy-pots-bow", + "slow-ravens-explain", + "small-buttons-rhyme", + "small-chicken-hear", + "small-cycles-rescue", + "small-kids-film", + "small-poems-rest", + "smart-rats-explode", + "smart-ways-lay", + "smooth-coins-collect", + "smooth-pens-reply", + "soft-mails-clean", + "sour-colts-tell", + "sour-donuts-sit", + "sour-guests-poke", + "sour-kids-deliver", + "sour-pillows-guess", + "sour-wombats-shout", + "spotty-days-compete", + "spotty-mugs-poke", + "stale-games-live", + "strange-seahorses-impress", + "strange-walls-march", + "strong-rivers-fry", + "stupid-eagles-fetch", + "stupid-paws-jam", + "stupid-pumpkins-travel", + "swift-rivers-share", + "tall-bikes-develop", + "tall-cups-suffer", + "tame-doors-shop", + "tame-points-work", + "tame-rice-explain", + "ten-sloths-punch", + "tender-swans-flash", + "thick-books-grin", + "thin-peas-hear", + "thirty-lemons-rhyme", + "thirty-pens-jump", + "tidy-pandas-punch", + "tidy-squids-poke", + "tough-hairs-develop", + "tough-olives-fry", + "tough-rockets-allow", + "tough-taxis-smoke", + "tough-tips-drop", + "tricky-glasses-reply", + "tricky-tables-shave", + "twelve-mangos-dance", + "twenty-numbers-perform", + "twenty-snakes-sort", + "two-zebras-punch", + "unlucky-kiwis-sell", + "unlucky-sheep-change", + "warm-ties-sit", + "weak-goats-melt", + "weak-melons-join", + "weak-owls-buy", + "wicked-forks-double", + "wicked-kiwis-buy", + "wicked-queens-lick", + "wild-carpets-exercise", + "wild-tigers-own", + "witty-paws-marry", + "yellow-cats-judge", + "young-moons-admire", + "young-phones-fold", + "young-snails-grin", + "young-turtles-explode" + ] +} diff --git a/.changeset/pretty-rocks-behave.md b/.changeset/pretty-rocks-behave.md new file mode 100644 index 00000000000..b6389e06e98 --- /dev/null +++ b/.changeset/pretty-rocks-behave.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - cache +--- + +Deprecate second argument to `readFragment` and `readQuery` - `optimistic` should be passed as part of the object in the first argument instead. diff --git a/.changeset/proud-walls-shave.md b/.changeset/proud-walls-shave.md new file mode 100644 index 00000000000..1190ae629cb --- /dev/null +++ b/.changeset/proud-walls-shave.md @@ -0,0 +1,46 @@ +--- +"@apollo/client": minor +_tags: + - types + - dataState +--- + +Overridable types for `dataState: "complete"`, `dataState: "streaming"` and +`dataState: "partial"` responses. + +This adds the `DataValue` namespace exported from Apollo Client with the three +types `DataValue.Complete`, `DataValue.Streaming` and `DataValue.Partial`. + +These types will be used to mark `TData` in the respective states. + +* `Complete` defaults to `TData` +* `Streaming` defaults to `TData` +* `Partial` defaults to `DeepPartial` + +All three can be overwritten, e.g. to be `DeepReadonly` using higher kinded types +by following this pattern: + +```ts +import { HKT, DeepPartial } from "@apollo/client/utilities"; +import { DeepReadonly } from "some-type-helper-library"; + +interface CompleteOverride extends HKT { + return: DeepReadonly; +} + +interface StreamingOverride extends HKT { + return: DeepReadonly; +} + +interface PartialOverride extends HKT { + return: DeepReadonly>; +} + +declare module "@apollo/client" { + export interface TypeOverrides { + Complete: CompleteOverride; + Streaming: StreamingOverride; + Partial: PartialOverride; + } +} +``` diff --git a/.changeset/purple-balloons-accept.md b/.changeset/purple-balloons-accept.md new file mode 100644 index 00000000000..ffe19a7cd53 --- /dev/null +++ b/.changeset/purple-balloons-accept.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +If the `execute` function of `useLazyQuery` is executed, previously started queries +from the same `useLazyQuery` usage will be rejected with an `AbortError` unless +`.retain()` is called on the promise returned by previous `execute` calls. + +Please keep in mind that `useLazyQuery` is primarily meant as a means to synchronize +your component to the status of a query and that it's purpose it not to make a +series of network calls. +If you plan on making a series of network calls without the need to synchronize +the result with your component, consider using `ApolloClient.query` instead. diff --git a/.changeset/purple-bears-flash.md b/.changeset/purple-bears-flash.md new file mode 100644 index 00000000000..69ed77c3d61 --- /dev/null +++ b/.changeset/purple-bears-flash.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Removed the `@apollo/client/react/parser` entry point. There is no replacement. diff --git a/.changeset/purple-eyes-divide.md b/.changeset/purple-eyes-divide.md new file mode 100644 index 00000000000..05ce71adb16 --- /dev/null +++ b/.changeset/purple-eyes-divide.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +The `fetchOptions` option provided to `HttpLink` and `BatchHttpLink` is now `RequestInit` instead of `any`. The `credentials` option is now a `RequestCredentials` type instead of a `string`. diff --git a/.changeset/purple-lions-cough.md b/.changeset/purple-lions-cough.md new file mode 100644 index 00000000000..e7e59cf338e --- /dev/null +++ b/.changeset/purple-lions-cough.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +`ObservableQuery.setVariables` will now resolve with the last emitted result instead of `undefined` when either the variables match the current variables or there are no subscribers to the query. diff --git a/.changeset/quiet-balloons-wave.md b/.changeset/quiet-balloons-wave.md new file mode 100644 index 00000000000..56274dbff07 --- /dev/null +++ b/.changeset/quiet-balloons-wave.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix a situation where a passed-in `AbortSignal` would override internal unsubscription cancellation behaviour. diff --git a/.changeset/rare-apes-drive.md b/.changeset/rare-apes-drive.md new file mode 100644 index 00000000000..c986512a5e5 --- /dev/null +++ b/.changeset/rare-apes-drive.md @@ -0,0 +1,12 @@ +--- +"@apollo/client": minor +_tags: + - subscriptions + - features +--- + +Deduplicating subscription operations is now supported. Previously it was possible to deduplicate a subscription only if the new subscription was created before a previously subscribed subscription emitted any values. As soon as a value was emitted from a subscription, new subscriptions would create new connections. Deduplication is now active for as long as a subscription connection is open (i.e. the source observable hasn't emitted a `complete` or `error` notification yet.) + +To disable deduplication and force a new connection, use the `queryDeduplication` option in `context` like you would a query operation. + +As a result of this change, calling the `restart` function returned from `useSubscription` will now restart the connection on deduplicated subscriptions. diff --git a/.changeset/rare-dingos-doubt.md b/.changeset/rare-dingos-doubt.md new file mode 100644 index 00000000000..8ee761cee8b --- /dev/null +++ b/.changeset/rare-dingos-doubt.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - cache +--- + +Remove the check and warning for `cache.fragmentMatches` when applying data masking. `cache.fragmentMatches` is a required API and data masking may crash when `cache.fragmentMatches` does not exist. diff --git a/.changeset/rare-houses-prove.md b/.changeset/rare-houses-prove.md new file mode 100644 index 00000000000..b3e98a1df14 --- /dev/null +++ b/.changeset/rare-houses-prove.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": minor +_tags: + - bundling + - react +--- + +Add `react-server` entry point with stubs for normal exports. diff --git a/.changeset/real-gorillas-move.md b/.changeset/real-gorillas-move.md new file mode 100644 index 00000000000..368081774ab --- /dev/null +++ b/.changeset/real-gorillas-move.md @@ -0,0 +1,24 @@ +--- +"@apollo/client": major +_tags: + - bundling + - debugging +--- + +Apollo Client now defaults to production mode, not development mode, if the +environment cannot be determined. + +In modern bundlers, this should automatically be handled by the bundler loading +the bundler with the `development` export condition. + +If neither the `production` nor the `development` export condition are +used by the bundler/runtime, Apollo Client will fall back to `globalThis.__DEV__` +to determine if it should run in production or development mode. + +Unlike Apollo Client 3 though, if `globalThis.__DEV__` is not set to `true`, +Apollo Client will now default to `production`, not to `development`, behaviour. + +This switch to *explicilty* requiring `true` also resolves a situation where +an HTML element with `id="__DEV__"` would create a global `__DEV__` variable +with a referent to the DOM element, which in the past was picked up as "truthy" and +would have triggered development mode. diff --git a/.changeset/real-onions-drive.md b/.changeset/real-onions-drive.md new file mode 100644 index 00000000000..137e1d31c32 --- /dev/null +++ b/.changeset/real-onions-drive.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - graphql_over_http +--- + +Change the default `Accept` header to `application/graphql-response+json,application/json;q=0.9`. diff --git a/.changeset/real-teachers-peel.md b/.changeset/real-teachers-peel.md new file mode 100644 index 00000000000..1bed1818d19 --- /dev/null +++ b/.changeset/real-teachers-peel.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - errors +--- + +Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback. diff --git a/.changeset/real-turtles-boil.md b/.changeset/real-turtles-boil.md new file mode 100644 index 00000000000..d7202db06a8 --- /dev/null +++ b/.changeset/real-turtles-boil.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ignore +_superseded: "other solution taken" +--- + +Enable React compiler for hooks in ESM builds. diff --git a/.changeset/rich-eagles-cross.md b/.changeset/rich-eagles-cross.md new file mode 100644 index 00000000000..4a58ed46208 --- /dev/null +++ b/.changeset/rich-eagles-cross.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery + - removals +--- + +The `reobserve` option is no longer available in the result returned from `useLazyQuery`. This was considered an internal API and should not be used directly. diff --git a/.changeset/rich-kids-carry.md b/.changeset/rich-kids-carry.md new file mode 100644 index 00000000000..64c9d266bc9 --- /dev/null +++ b/.changeset/rich-kids-carry.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - types + - client.watchQuery + - ObservableQuery +_ superseded: "data state" +--- + +Fix type of `data` property on `ApolloQueryResult`. Previously this field was non-optional, non-null `TData`, however at runtime this value could be set to `undefined`. This field is now reported as `TData | undefined`. + +This will affect you in a handful of places: +- The `data` property emitted from the result passed to the `next` callback from `client.watchQuery` +- Fetch-based APIs that return an `ApolloQueryResult` type such as `observableQuery.refetch`, `observableQuery.fetchMore`, etc. diff --git a/.changeset/rich-turtles-clap.md b/.changeset/rich-turtles-clap.md new file mode 100644 index 00000000000..9a9e26a570a --- /dev/null +++ b/.changeset/rich-turtles-clap.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - links + - graphql_over_http +--- + +`HttpLink` and `BatchHttpLink` no longer emit a `next` notification with the JSON-parsed response body when a well-formed GraphQL response is returned and a `ServerError` is thrown. diff --git a/.changeset/rude-crabs-eat.md b/.changeset/rude-crabs-eat.md new file mode 100644 index 00000000000..82ae67169f6 --- /dev/null +++ b/.changeset/rude-crabs-eat.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - links + - types +--- + +The `operation` argument to the callback passed to `SetContextLink` is now of type `SetContextLink.SetContextOperation` which is an `Operation` without the `getContext` or `setContext` functions. Previously the type of `operation` was `GraphQLRequest` which had access to a `context` property. The `context` property was always `undefined` and could result in bugs when using it instead of the `prevContext` argument. + +This change means the `operation` argument now contains an accessible `client` property. diff --git a/.changeset/rude-fans-study.md b/.changeset/rude-fans-study.md new file mode 100644 index 00000000000..36235a2059a --- /dev/null +++ b/.changeset/rude-fans-study.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - types +--- + +Deprecate the `partial` flag on `ApolloQueryResult` and make it a non-optional property. Previously `partial` was only set conditionally if the result emitted was partial. This value is now available with all results that return an `ApolloQueryResult`. diff --git a/.changeset/rude-parrots-suffer.md b/.changeset/rude-parrots-suffer.md new file mode 100644 index 00000000000..9d0454a1e14 --- /dev/null +++ b/.changeset/rude-parrots-suffer.md @@ -0,0 +1,34 @@ +--- +"@apollo/client": minor +_tags: + - links + - features +--- + +Add the new `ClientAwarenessLink`. + +This link is already included in `HttpLink` and `BatchHttpLink` to enable the +"client awareness" and "enhanced client awareness" features, but you can also use +`ClientAwarenessLink` directly in your link chain to combine it with other +terminating links. + +If you want to save the bundle size that `ClientAwarenessLink` adds to `HttpLink` +and `BatchHttpLink`, you can use `BaseHttpLink` or `BaseBatchHttpLink` instead. +These links come without the `ClientAwarenessLink` included. + +For example: +```diff +import { + ApolloClient, +- HttpLink, +} from "@apollo/client"; ++import { BaseHttpLink } from "@apollo/client/link/http"; + +const client = new ApolloClient({ +- link: new HttpLink({ ++ link: new BaseHttpLink({ + uri, + }), + cache: new InMemoryCache(), +}); +``` diff --git a/.changeset/selfish-spoons-approve.md b/.changeset/selfish-spoons-approve.md new file mode 100644 index 00000000000..bf9cc638dec --- /dev/null +++ b/.changeset/selfish-spoons-approve.md @@ -0,0 +1,47 @@ +--- +"@apollo/client": major +_tags: + - removals + - types +--- + +Move internal testing utilities in `@apollo/client/testing` to `@apollo/client/testing/internal` and remove deprecated testing utilities. Some of the testing utilities exported from the `@apollo/client/testing` endpoint were not considered stable. As a result of this change, testing utilities or types exported from `@apollo/client/testing` are now considered stable and will not undergo breaking changes. + +The following APIs were removed. To migrate, update usages of the following APIs as such: + +**`createMockClient`** + +```diff +- const client = createMockClient(data, query, variables); ++ const client = new ApolloClient({ ++ cache: new InMemoryCache(), ++ link: new MockLink([ ++ { ++ request: { query, variables }, ++ result: { data }, ++ } ++ ]), ++ }); +``` + +**`mockObservableLink`** + +```diff +- const link = mockObservableLink(); ++ const link = new MockSubscriptionLink(); +``` + +**`mockSingleLink`** + +```diff +- const link = mockSingleLink({ +- request: { query, variables }, +- result: { data }, +- }); ++ const link = new MockLink([ ++ { ++ request: { query, variables }, ++ result: { data }, ++ } ++ ]); +``` diff --git a/.changeset/serious-items-develop.md b/.changeset/serious-items-develop.md new file mode 100644 index 00000000000..36ff0cee665 --- /dev/null +++ b/.changeset/serious-items-develop.md @@ -0,0 +1,19 @@ +--- +"@apollo/client": major +_tags: + - cache +--- + +Third-party caches must now implement the `fragmentMatches` API. Additionally `fragmentMatches` must be able to handle both `InlineFragmentNode` and `FragmentDefinitionNode` nodes. + +```ts +class MyCache extends ApolloCache { + // This is now required + public fragmentMatches( + fragment: InlineFragmentNode | FragmentDefinitionNode, + typename: string + ): boolean { + return // ... logic to determine if typename matches fragment + } +} +``` diff --git a/.changeset/serious-moons-juggle.md b/.changeset/serious-moons-juggle.md new file mode 100644 index 00000000000..d0733431a4c --- /dev/null +++ b/.changeset/serious-moons-juggle.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - removals +--- + +`client.query` no longer supports `notifyOnNetworkStatusChange` in options. An error will be thrown if this option is set. The effects of this option were not observable by `client.query` since `client.query` emits a single result. diff --git a/.changeset/seven-dragons-repair.md b/.changeset/seven-dragons-repair.md new file mode 100644 index 00000000000..f3c9a409b25 --- /dev/null +++ b/.changeset/seven-dragons-repair.md @@ -0,0 +1,16 @@ +--- +"@apollo/client": patch +_tags: + - errors +--- + +Update format of the error message for `CombinedGraphQLErrors` and `CombinedProtocolErrors` to be more like v3.x. + +```diff +console.log(error.message); +- `The GraphQL server returned with errors: +- - Email not found +- - Username already in use` ++ `Email not found ++ Username already in use` +``` diff --git a/.changeset/seven-foxes-melt.md b/.changeset/seven-foxes-melt.md new file mode 100644 index 00000000000..45a6cf48aef --- /dev/null +++ b/.changeset/seven-foxes-melt.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery + - errors +--- + +The promise returned when calling the execute function from `useLazyQuery` will now reject when using an `errorPolicy` of `none` when GraphQL errors are returned from the result. diff --git a/.changeset/seven-jeans-trade.md b/.changeset/seven-jeans-trade.md new file mode 100644 index 00000000000..ccbd62ffd14 --- /dev/null +++ b/.changeset/seven-jeans-trade.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": minor +_tags: + - ObservableQuery +--- + +Added a new `.stop` function on `ObservableQuery`. +Calling this method will unsubscribe all current subscribers by sending a `complete` event from the observable and tear down the `ObservableQuery`. diff --git a/.changeset/seven-schools-carry.md b/.changeset/seven-schools-carry.md new file mode 100644 index 00000000000..9ce63e268eb --- /dev/null +++ b/.changeset/seven-schools-carry.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - links +--- + +Add a `client` property to the `operation` passed to the link chain. This `client` is set as the `client` making the request to the link chain. diff --git a/.changeset/shaggy-pugs-add.md b/.changeset/shaggy-pugs-add.md new file mode 100644 index 00000000000..112549ca3ee --- /dev/null +++ b/.changeset/shaggy-pugs-add.md @@ -0,0 +1,55 @@ +--- +"@apollo/client": minor +_tags: + - links + - testing +--- + +Add ability to specify a default `delay` for all mocked responses passed to `MockLink`. This `delay` can be configured globally (all instances of `MockLink` will use the global defaults), or per-instance (all mocks in a single instance will use the defaults). A `delay` defined on a single mock will supercede all default delays. Per-instance defaults supercede global defaults. + +**Global defaults** + +```ts +MockLink.defaultOptions = { + // Use a default delay of 20ms for all mocks in all instances without a specified delay + delay: 20, + + // altenatively use a callback which will be executed for each mock + delay: () => getRandomNumber(), + + // or use the built-in `realisticDelay`. This is the default + delay: realisticDelay(), +} +``` + +**Per-instance defaults** + +```ts +new MockLink( + [ + // Use the default delay + { + request: { query }, + result: { data: { greeting: 'Hello' }}, + }, + { + request: { query }, + result: { data: { greeting: 'Hello' }}, + // Override the default for this mock + delay: 10 + }, + ], + { + defaultOptions: { + // Use a default delay of 20ms for all mocks without a specified delay + delay: 20, + + // altenatively use a callback which will be executed for each mock + delay: () => getRandomNumber(), + + // or use the built-in `realisticDelay`. This is the default + delay: realisticDelay(), + } + } +); +``` diff --git a/.changeset/shaggy-singers-tickle.md b/.changeset/shaggy-singers-tickle.md new file mode 100644 index 00000000000..9dc2263ffa2 --- /dev/null +++ b/.changeset/shaggy-singers-tickle.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +Remove `context` from `useLazyQuery` hook options. If used, `context` must now be provided to the `execute` function. `context` will reset to `{}` if not provided as an option to `execute`. diff --git a/.changeset/sharp-glasses-sneeze.md b/.changeset/sharp-glasses-sneeze.md new file mode 100644 index 00000000000..27929ac737e --- /dev/null +++ b/.changeset/sharp-glasses-sneeze.md @@ -0,0 +1,44 @@ +--- +"@apollo/client": major +_tags: + - links + - errors +--- + +The `ErrorResponse` object passed to the `disable` and `retry` callback options provided to `createPersistedQueryLink` no longer provides separate `graphQLErrors` and `networkError` properties and instead have been combined to a single `error` property of type `ErrorLike`. + + +```diff +// The following also applies to the `retry` function since it has the same signature +createPersistedQueryLink({ +- disable: ({ graphQLErrors, networkError }) => { ++ disable: ({ error }) => { +- if (graphQLErrors) { ++ if (CombinedGraphQLErrors.is(error)) { + // ... handle GraphQL errors + } + +- if (networkError) { ++ if (error) { + // ... handle link errors + } + + // optionally check for a specific kind of error +- if (networkError) { ++ if (ServerError.is(error)) { + // ... handle a server error + } +}); +``` + +The `response` property has also been renamed to `result`. + +```diff +createPersistedQueryLink({ +- disable: ({ response }) => { ++ disable: ({ result }) => { + // ... handle GraphQL errors + } + } +}); +``` diff --git a/.changeset/sharp-lemons-bathe.md b/.changeset/sharp-lemons-bathe.md new file mode 100644 index 00000000000..46a44a9e42d --- /dev/null +++ b/.changeset/sharp-lemons-bathe.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Move all 1st party link types into a namespace. diff --git a/.changeset/shiny-carrots-invent.md b/.changeset/shiny-carrots-invent.md new file mode 100644 index 00000000000..5ac101ee933 --- /dev/null +++ b/.changeset/shiny-carrots-invent.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove `subscribeAndCount` testing utility from `@apollo/client/testing`. diff --git a/.changeset/short-jokes-jam.md b/.changeset/short-jokes-jam.md new file mode 100644 index 00000000000..d406cc67f95 --- /dev/null +++ b/.changeset/short-jokes-jam.md @@ -0,0 +1,43 @@ +--- +"@apollo/client": major +_tags: + - bundling + - removals + - createQueryPreloader + - useApolloClient + - useBackgroundQuery + - useFragment + - useLazyQuery + - useLoadableQuery + - useMutation + - useQuery + - useQueryRefHandlers + - useReactiveVar + - useReadQuery + - useSubscription + - useSuspenseQuery +--- + +Moves all React-related exports to the `@apollo/client/react` entrypoint and out of the main `@apollo/client` entrypoint. This prevents the need to install React in order to use the core client. + +The following is a list of exports available in `@apollo/client` that should now import from `@apollo/client/react`. +- `ApolloConsumer` +- `ApolloProvider` +- `createQueryPreloader` +- `getApolloContext` +- `skipToken` +- `useApolloClient` +- `useBackgroundQuery` +- `useFragment` +- `useLazyQuery` +- `useLoadableQuery` +- `useMutation` +- `useQuery` +- `useQueryRefHandlers` +- `useReactiveVar` +- `useReadQuery` +- `useSubscription` +- `useSuspenseQuery` + +The following is a list of exports available in `@apollo/client/testing` that should now import from `@apollo/client/testing/react`: +- `MockedProvider` diff --git a/.changeset/short-months-complain.md b/.changeset/short-months-complain.md new file mode 100644 index 00000000000..e1668f81202 --- /dev/null +++ b/.changeset/short-months-complain.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - links + - testing +--- + +Throw an error when a client-only query is used in a mocked response passed to `MockLink`. diff --git a/.changeset/short-tomatoes-attend.md b/.changeset/short-tomatoes-attend.md new file mode 100644 index 00000000000..bb669f8a392 --- /dev/null +++ b/.changeset/short-tomatoes-attend.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - types +--- + +Remove `TContext` generic argument from all types that use it. `TContext` is replaced with `DefaultContext` which can be modified using declaration merging. diff --git a/.changeset/shy-experts-cough.md b/.changeset/shy-experts-cough.md new file mode 100644 index 00000000000..54d8c7fc11d --- /dev/null +++ b/.changeset/shy-experts-cough.md @@ -0,0 +1,22 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - client.refetchQueries + - client.getObservableQueries +--- + +`ObservableQuery`s will now only be registered with the `ApolloClient` while they +have subscribers. + +That means that `ApolloClient.getObservableQueries` and `ApolloClient.refetchQueries` +will only be able to return/refetch queries that have at least one subscriber. + +This changes the previous meaning of `active` and `inactive` queries: +* `inactive` queries are queries with a subscriber that are skipped from a + React hook or have a `fetchPolicy` of `standby` +* `active` queries are queries with at least one subscriber that are not skipped or in `standby`. + +`ObservableQuery`s without subscribers but with an active ongoing network request +(e.g. caused by calling `reobserve`) will be handled as if they had a subscriber +for the duration of the query. diff --git a/.changeset/silent-lobsters-try.md b/.changeset/silent-lobsters-try.md new file mode 100644 index 00000000000..f6f9e876203 --- /dev/null +++ b/.changeset/silent-lobsters-try.md @@ -0,0 +1,7 @@ +--- +"@apollo/client-graphql-codegen": major +_tags: + - ignore +--- + +Version bump only for codegen to release as `rc`. diff --git a/.changeset/silent-needles-build.md b/.changeset/silent-needles-build.md new file mode 100644 index 00000000000..302fba96ad7 --- /dev/null +++ b/.changeset/silent-needles-build.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +`transformOperation` and `validateOperation` have been removed and are no longer exported from `@apollo/client/link/utils`. These utilities have been merged into the implementation of `createOperation`. As a result, `createOperation` now returns a well-formed `Operation` object. Previously `createOperation` relied on an external call to `transformOperation` to provide a well-formed `Operation` type. If you use `createOperation` directly, remove the calls to `transformOperation` and `validateOperation` and pass the request directly. diff --git a/.changeset/silly-knives-exist.md b/.changeset/silly-knives-exist.md new file mode 100644 index 00000000000..bf95d62ebdb --- /dev/null +++ b/.changeset/silly-knives-exist.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Removes the `urql` multipart subscriptions utilities. Use the native multipart subscriptions support in `urql` instead. diff --git a/.changeset/silly-maps-sit.md b/.changeset/silly-maps-sit.md new file mode 100644 index 00000000000..57ab750cc4d --- /dev/null +++ b/.changeset/silly-maps-sit.md @@ -0,0 +1,31 @@ +--- +"@apollo/client": patch +--- + +The individual `empty`, `concat`, `from` and `split` functions exported from `@apollo/client/link` are now deprecated in favor of using the static functions instead. + +```diff +import { + ApolloLink, +- concat, +- empty, +- from, +- split, +} from "@apollo/client/link"; + +- concat(first, second); ++ ApolloLink.concat(first, second); + +- empty(); ++ ApolloLink.empty(); + +- from([first, second]); ++ ApolloLink.from([first, second]); + +- split( ++ ApolloLink.split( + (operation) => /* */, + first, + second +); +``` diff --git a/.changeset/silly-seas-confess.md b/.changeset/silly-seas-confess.md new file mode 100644 index 00000000000..2a9a8eb6567 --- /dev/null +++ b/.changeset/silly-seas-confess.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - dependencies +--- + +Drop `graphql` v15 as a valid peer dependency. diff --git a/.changeset/silly-starfishes-compare.md b/.changeset/silly-starfishes-compare.md new file mode 100644 index 00000000000..faca1749050 --- /dev/null +++ b/.changeset/silly-starfishes-compare.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": minor +--- + +Many of the types exported from `@apollo/client/link` now live on the `ApolloLink` namespace. The old types are now deprecated in favor of the namespaced types. + +- `FetchResult` -> `ApolloLink.Result` +- `GraphQLRequest` -> `ApolloLink.Request` +- `NextLink` -> `ApolloLink.ForwardFunction` +- `Operation` -> `ApolloLink.Operation` +- `RequestHandler` -> `ApolloLink.RequestHandler` diff --git a/.changeset/six-jars-fix.md b/.changeset/six-jars-fix.md new file mode 100644 index 00000000000..ebaf948cf8d --- /dev/null +++ b/.changeset/six-jars-fix.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": major +_tags: + - removals + - createQueryPreloader +--- + +`queryRef`s created by `preloadQuery` no longer have a `.toPromise()` function. Instead `preloadQuery` now has a `toPromise` function that accepts a queryRef and will resolve when the underlying promise has been resolved. + +```diff +const queryRef = preloadQuery(query, options); + +- await queryRef.toPromise(); ++ await preloadQuery.toPromise(queryRef); +``` diff --git a/.changeset/sixty-bats-cry.md b/.changeset/sixty-bats-cry.md new file mode 100644 index 00000000000..724fbc2f90d --- /dev/null +++ b/.changeset/sixty-bats-cry.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +Reworked the logic for then a loading state is triggered. If the link chain responds synchronously, a loading state will be omitted, otherwise it will be triggered. +If local resolvers are used, the time window for "sync vs async" starts as soon as `@exports` variables are resolved. diff --git a/.changeset/sixty-bears-bathe.md b/.changeset/sixty-bears-bathe.md new file mode 100644 index 00000000000..70ff83803fc --- /dev/null +++ b/.changeset/sixty-bears-bathe.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": minor +_tags: + - types + - removals +--- + +The `FetchMoreQueryOptions` type has been inlined into `FetchMoreOptions`, and +`FetchMoreQueryOptions` has been removed. diff --git a/.changeset/slimy-adults-attend.md b/.changeset/slimy-adults-attend.md new file mode 100644 index 00000000000..01c3bebb0c1 --- /dev/null +++ b/.changeset/slimy-adults-attend.md @@ -0,0 +1,33 @@ +--- +"@apollo/client": patch + +_tags: + - defer +--- + +The incremental delivery (`@defer` support) implementation is now pluggable. + +`ApolloClient` now per default ships without an incremental format implementation +and allows you to swap in the format that you want to use. + +Usage looks like this: + +```ts +import { + // this is the default + NotImplementedHandler, + // this implements the `@defer` transport format that ships with Apollo Router + Defer20220824Handler, + // this implements the `@defer` transport format that ships with GraphQL 17.0.0-alpha.2 + GraphQL17Alpha2Handler, +} from "@apollo/client/incremental"; + +const client = new ApolloClient({ + cache: new InMemoryCache({ /*...*/ }), + link: new HttpLink({ /*...*/ }), + incrementalHandler: new Defer20220824Handler(), +}); +``` + +We will add handlers for other response formats that can be swapped this way +during the lifetime of Apollo Client 4.0. diff --git a/.changeset/slimy-ants-bake.md b/.changeset/slimy-ants-bake.md new file mode 100644 index 00000000000..51177669e76 --- /dev/null +++ b/.changeset/slimy-ants-bake.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - useQuery +--- + +`useQuery`: only advance `previousData` if `data` actually changed diff --git a/.changeset/slimy-chicken-melt.md b/.changeset/slimy-chicken-melt.md new file mode 100644 index 00000000000..b4fb03e27f3 --- /dev/null +++ b/.changeset/slimy-chicken-melt.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - useSubscription +--- + +Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead. diff --git a/.changeset/slimy-maps-press.md b/.changeset/slimy-maps-press.md new file mode 100644 index 00000000000..e88c5fc30c3 --- /dev/null +++ b/.changeset/slimy-maps-press.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - ignore +--- + +Fix up the 4.0 CommonJS build diff --git a/.changeset/slimy-meals-work.md b/.changeset/slimy-meals-work.md new file mode 100644 index 00000000000..ebe1d5c7eef --- /dev/null +++ b/.changeset/slimy-meals-work.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +Add `dataState` and overridable `DataValue` types to `useFragment` diff --git a/.changeset/slimy-pots-bow.md b/.changeset/slimy-pots-bow.md new file mode 100644 index 00000000000..1889a66de11 --- /dev/null +++ b/.changeset/slimy-pots-bow.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +Add overridable `DataValue` types to `useSuspenseFragment` diff --git a/.changeset/slow-ravens-explain.md b/.changeset/slow-ravens-explain.md new file mode 100644 index 00000000000..179b6889aeb --- /dev/null +++ b/.changeset/slow-ravens-explain.md @@ -0,0 +1,22 @@ +--- +"@apollo/client": major +_tags: + - dependencies + - rxjs +--- + +Switch to [RxJS](https://rxjs.dev/) as the observable implementation. `rxjs` is now a peer dependency of Apollo Client which means you will now need to install `rxjs` in addition to `@apollo/client`. + +This change is mostly transparent, however transforming values on observables, common in link implementations, differs in RxJS vs `zen-observable`. For example, you could modify values in the link chain emitted from a downstream link by using the `.map` function. In RxJS, this is done with the `.pipe` function and passing a `map` operator instead. + +```ts +import { map } from "rxjs"; + +const link new ApolloLink((operation, forward) => { + return forward(operation).pipe( + map((result) => performTransform(result)) + ); +}); +``` + +For a full list of operators and comprehensive documentation on the capabilities of RxJS, check out the [documentation](https://rxjs.dev/). diff --git a/.changeset/small-buttons-rhyme.md b/.changeset/small-buttons-rhyme.md new file mode 100644 index 00000000000..1d897d5f342 --- /dev/null +++ b/.changeset/small-buttons-rhyme.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove the deprecated `canonizeResults` option. It was prone to memory leaks. As such, some results that were referentially equal when `canonizeResults` option was set to `true` no longer retain the same object identity. diff --git a/.changeset/small-chicken-hear.md b/.changeset/small-chicken-hear.md new file mode 100644 index 00000000000..38c02a33007 --- /dev/null +++ b/.changeset/small-chicken-hear.md @@ -0,0 +1,29 @@ +--- +"@apollo/client": major +--- + +The request handler provided to `ApolloLink` must now return an `Observable`. `null` is no longer supported as a valid return value. If you rely on `null` so that `ApolloLink` provides an empty observable, use the `EMPTY` observable from RxJS instead: + +```diff +import { ApolloLink } from "@apollo/client"; ++ import { EMPTY } from "rxjs"; + +const link = new ApolloLink((operation, forward) => { +- return null; ++ return EMPTY; +}); +``` + +If you have a custom link that overrides the `request` method, remove `null` from the return signature: + +```diff +class MyCustomLink extends ApolloLink { + request( + operation: ApolloLink.Operation, + forward: ApolloLink.ForwardFunction, +- ): Observable | null { ++ ): Observable { + // implementation + } +} +``` diff --git a/.changeset/small-cycles-rescue.md b/.changeset/small-cycles-rescue.md new file mode 100644 index 00000000000..0090f770112 --- /dev/null +++ b/.changeset/small-cycles-rescue.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - ObservableQuery +--- + +Don't emit a partial cache result from `cache-only` queries when `returnPartialData` is `false`. diff --git a/.changeset/small-kids-film.md b/.changeset/small-kids-film.md new file mode 100644 index 00000000000..dc3a1a2915f --- /dev/null +++ b/.changeset/small-kids-film.md @@ -0,0 +1,16 @@ +--- +"@apollo/client": major +_tags: + - bundling +--- + +Rework package publish format (#12329, #12382) + +We have reworked the way Apollo Client is packaged. + +* shipping ESM and CJS +* fixing up source maps +* the build targets a modern runtime environment (browserslist query: `"since 2023, node >= 20, not dead"`) +* removed the "proxy directory" `package.json` files, e.g. `cache/core/package.json` and `react/package.json`. While these helped with older build tools, modern build tooling uses the `exports` field in the root `package.json` instead and the presence of these files can confuse modern build tooling. If your build tooling still relies on those, please update your imports to import from e.g. `@apollo/client/cache/core/index.js` instead of `@apollo/client/cache/core` - but generally, this should not be necessary. +* added an `exports` field to `package.json` to expose entry points +* instead of `globalThis.__DEV__`, Apollo Client now primarily relies on the `development` and `production` exports conditions. It falls back to `globalThis.__DEV__` if the bundler doesn't know these, though. diff --git a/.changeset/small-poems-rest.md b/.changeset/small-poems-rest.md new file mode 100644 index 00000000000..4a8e6e20958 --- /dev/null +++ b/.changeset/small-poems-rest.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +Don't `broadcastQueries` when a query is torn down. diff --git a/.changeset/smart-rats-explode.md b/.changeset/smart-rats-explode.md new file mode 100644 index 00000000000..d23e4ee336c --- /dev/null +++ b/.changeset/smart-rats-explode.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - ObservableQuery +--- + +Remove `ObservableQuery.resetQueryStoreErrors` method. This method reset some internal state that was not consumed elsewhere in the client and resulted in a no-op. diff --git a/.changeset/smart-ways-lay.md b/.changeset/smart-ways-lay.md new file mode 100644 index 00000000000..7712b4aa73e --- /dev/null +++ b/.changeset/smart-ways-lay.md @@ -0,0 +1,12 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": major +--- + +Add a new `clientSetup` codemod step which applies the following steps from the migration guide to your Apollo Client setup code: + - Moves `uri`, `headers` and `credentials` to the `link` option and creates a new `HttpLink` instance + - Moves `name` and `version` into a `clientAwareness` option + - Adds a `localState` option with a new `LocalState` instance, moves `resolvers`, and removes `typeDefs` and `fragmentMatcher` options + - Changes the `connectToDevTools` option to `devtools.enabled` + - Renames `disableNetworkFetches` to `prioritizeCacheValues` + - If `dataMasking` is enabled, adds a template for global type augmentation to re-enable data masking types + - Adds the `incrementalHandler` option and adds a template for global type augmentation to accordingly type network responses in custom links diff --git a/.changeset/smooth-coins-collect.md b/.changeset/smooth-coins-collect.md new file mode 100644 index 00000000000..564172f6065 --- /dev/null +++ b/.changeset/smooth-coins-collect.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - rxjs +--- + +Remove `fromPromise` utility function. Use [`from`](https://rxjs.dev/api/index/function/from) instead. diff --git a/.changeset/smooth-pens-reply.md b/.changeset/smooth-pens-reply.md new file mode 100644 index 00000000000..eca6f4ad148 --- /dev/null +++ b/.changeset/smooth-pens-reply.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - polyfills +--- + +Require environments that support `WeakMap`, `WeakSet` and symbols. Apollo Client would fallback to `Map` and `Set` if the weak versions were not available. This has been removed and expects that these features are available in the source environment. + +If you are running in an environment without `WeakMap`, `WeakSet` or symbols, you will need to find appropriate polyfills. diff --git a/.changeset/soft-mails-clean.md b/.changeset/soft-mails-clean.md new file mode 100644 index 00000000000..510196311c0 --- /dev/null +++ b/.changeset/soft-mails-clean.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +`useLazyQuery` no longer supports calling the execute function in render and will now throw. If you need to execute the query immediately, use `useQuery` instead or move the call to a `useEffect`. diff --git a/.changeset/sour-colts-tell.md b/.changeset/sour-colts-tell.md new file mode 100644 index 00000000000..2b5cc2cf757 --- /dev/null +++ b/.changeset/sour-colts-tell.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - fetch_policy +--- + +`ObservableQuery` will now return a `loading: false` state for `fetchPolicy` `standby`, even before subscription diff --git a/.changeset/sour-donuts-sit.md b/.changeset/sour-donuts-sit.md new file mode 100644 index 00000000000..6d48452588b --- /dev/null +++ b/.changeset/sour-donuts-sit.md @@ -0,0 +1,21 @@ +--- +"@apollo/client": minor +_tags: + - types + - links +--- + +Prioritize usage of `FormattedExecutionResult` over `FetchResult` where applicable. + +Many APIs used `FetchResult` in place of `FormattedExecutionResult`, which could +cause inconsistencies. + +* `FetchResult` is now used to refer to an unhandled "raw" result as returned from + a link. + This can also include incremental results that use a different format. +* `FormattedExecutionResult` from the `graphql` package is now used to represent + the execution of a standard GraphQL request without incremental results. + +If your custom links access the `data` property, you might need to first check if +the result is a standard GraphQL result by using the `isFormattedExecutionResult` +helper from `@apollo/client/utilities`. diff --git a/.changeset/sour-guests-poke.md b/.changeset/sour-guests-poke.md new file mode 100644 index 00000000000..a9066739081 --- /dev/null +++ b/.changeset/sour-guests-poke.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - testing + - bundling +--- + +Remove the `@apollo/client/testing/core` entrypoint in favor of `@apollo/client/testing`. diff --git a/.changeset/sour-kids-deliver.md b/.changeset/sour-kids-deliver.md new file mode 100644 index 00000000000..98e4e486272 --- /dev/null +++ b/.changeset/sour-kids-deliver.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - links + - bundling +--- + +Rename the `@apollo/client/link/core` entrypoint to `@apollo/client/link`. diff --git a/.changeset/sour-pillows-guess.md b/.changeset/sour-pillows-guess.md new file mode 100644 index 00000000000..4678bc00eba --- /dev/null +++ b/.changeset/sour-pillows-guess.md @@ -0,0 +1,10 @@ +--- +"@apollo/client": major +_tags: + - removals + - useLazyQuery +--- + +The `defaultOptions` and `initialFetchPolicy` options are no longer supported with `useLazyQuery`. + +If you use `defaultOptions`, pass those options directly to the hook instead. If you use `initialFetchPolicy`, use `fetchPolicy` instead. diff --git a/.changeset/sour-wasps-bathe.md b/.changeset/sour-wasps-bathe.md new file mode 100644 index 00000000000..47de44357bf --- /dev/null +++ b/.changeset/sour-wasps-bathe.md @@ -0,0 +1,5 @@ +--- +"@apollo/client-codemod-migrate-3-to-4": patch +--- + +adjust the `clientSetup` codemod so that it removes the `TCacheShape` type argument from all `ApolloClient` usages (types and constructor calls). diff --git a/.changeset/sour-wombats-shout.md b/.changeset/sour-wombats-shout.md new file mode 100644 index 00000000000..e455d114e50 --- /dev/null +++ b/.changeset/sour-wombats-shout.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +The `OperationBatcher` class is no longer exported from `@apollo/client/link/batch`. It is an implementation detail of `BatchLink` and should not be relied on directly. diff --git a/.changeset/spotty-days-compete.md b/.changeset/spotty-days-compete.md new file mode 100644 index 00000000000..b25d49d1ae4 --- /dev/null +++ b/.changeset/spotty-days-compete.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +--- + +`createOperation` no longer accepts `context` as the first argument. Instead make sure `context` is set as the `context` property on the request passed to `createOperation`. + +```diff +createOperation( +- startingContext, +- { query }, ++ { query, context: startingContext }, + { client } +); +``` diff --git a/.changeset/spotty-mugs-poke.md b/.changeset/spotty-mugs-poke.md new file mode 100644 index 00000000000..6d6375b2b96 --- /dev/null +++ b/.changeset/spotty-mugs-poke.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +Dropped the `saveAsLastResult` argument from `ObservableQuery.getCurrentResult` diff --git a/.changeset/stale-games-live.md b/.changeset/stale-games-live.md new file mode 100644 index 00000000000..59bb5e73a66 --- /dev/null +++ b/.changeset/stale-games-live.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": minor +--- + +The static `ApolloLink.concat` method is now deprecated in favor of `ApolloLink.from`. `ApolloLink.concat` is now an alias for `ApolloLink.from` so prefer `ApolloLink.from` instead. diff --git a/.changeset/strange-seahorses-impress.md b/.changeset/strange-seahorses-impress.md new file mode 100644 index 00000000000..6fdc29b8a53 --- /dev/null +++ b/.changeset/strange-seahorses-impress.md @@ -0,0 +1,19 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +`useLazyQuery` no longer supports `variables` in the hook options and therefore no longer performs variable merging. The execute function must now be called with `variables` instead. + +```ts +function MyComponent() { + const [execute] = useLazyQuery(query); + + function runExecute() { + execute({ variables: { ... }}); + } +} +``` + +This change means the execute function returned from `useLazyQuery` is more type-safe. The execute function will require you to pass a `variables` option if the query type includes required variables. diff --git a/.changeset/strange-walls-march.md b/.changeset/strange-walls-march.md new file mode 100644 index 00000000000..3e6fc7a48e4 --- /dev/null +++ b/.changeset/strange-walls-march.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - useQuery +--- + +The `error` property is no longer present when `skip` is `true` in `useQuery`. diff --git a/.changeset/strong-rivers-fry.md b/.changeset/strong-rivers-fry.md new file mode 100644 index 00000000000..71d256badef --- /dev/null +++ b/.changeset/strong-rivers-fry.md @@ -0,0 +1,36 @@ +--- +"@apollo/client": major +_tags: + - LocalState +--- + +The resolver function's `context` argument (the 3rd argument) has changed to provide additional information without the possibility of name clashes. Previously the `context` argument would spread request context and override the `client` and `cache` properties to give access to both inside of a resolver. The `context` argument takes now takes the following shape: + +```ts +{ + // the request context. By default `TContextValue` is of type `DefaultContext`, + // but can be changed if a `context` function is provided. + requestContext: TContextValue, + // The client instance making the request + client: ApolloClient, + // Whether the resolver is run as a result of gathering exported variables + // or resolving the value as part of the result + phase: "exports" | "resolve" +} +``` + +To migrate, pull any request context from `requestContext` and the `cache` from the `client` property: + +```diff +new LocalState({ + resolvers: { + Query: { +- myResolver: (parent, args, { someValue, cache }) => { ++ myResolver: (parent, args, { requestContext, client }) => { ++ const someValue = requestContext.someValue; ++ const cache = client.cache; + } + } + } +}); +``` diff --git a/.changeset/stupid-eagles-fetch.md b/.changeset/stupid-eagles-fetch.md new file mode 100644 index 00000000000..edc7b5085bd --- /dev/null +++ b/.changeset/stupid-eagles-fetch.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +`cache-only` queries no longer poll when a `pollInterval` is set. Instead a warning is now emitted that polling has no effect. If the `fetchPolicy` is changed to `cache-only` after polling is already active, polling is stopped. diff --git a/.changeset/stupid-paws-jam.md b/.changeset/stupid-paws-jam.md new file mode 100644 index 00000000000..daa9d6ee40c --- /dev/null +++ b/.changeset/stupid-paws-jam.md @@ -0,0 +1,14 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +The `response` property in `onError` link has been renamed to `result`. + +```diff +- onError(({ response }) => { ++ onError(({ result }) => { + // ... +}); +``` diff --git a/.changeset/stupid-pumpkins-travel.md b/.changeset/stupid-pumpkins-travel.md new file mode 100644 index 00000000000..92120aaa66a --- /dev/null +++ b/.changeset/stupid-pumpkins-travel.md @@ -0,0 +1,17 @@ +--- +"@apollo/client": major +_tags: + - removals + - LocalState + - ApolloClient +--- + +Apollo Client no longer ships with support for `@client` fields out-of-the-box and now must be opt-in. To opt in to use `@client` fields, pass an instantiated `LocalState` instance to the `localState` option. If a query contains `@client` and local state hasn't been configured, an error will be thrown. + +```ts +import { LocalState } from "@apollo/client/local-state"; + +new ApolloClient({ + localState: new LocalState(), +}); +``` diff --git a/.changeset/swift-rivers-share.md b/.changeset/swift-rivers-share.md new file mode 100644 index 00000000000..e8251db95ad --- /dev/null +++ b/.changeset/swift-rivers-share.md @@ -0,0 +1,16 @@ +--- +"@apollo/client": major +_tags: + - links + - testing +--- + +Default the `delay` for all mocked responses passed to `MockLink` using `realisticDelay`. This ensures your test handles loading states by default and is not reliant on a specific timing. + +If you would like to restore the old behavior, use a global default delay of `0`. + +```ts +MockLink.defaultOptions = { + delay: 0 +} +``` diff --git a/.changeset/tall-bikes-develop.md b/.changeset/tall-bikes-develop.md new file mode 100644 index 00000000000..05a4eef8bdf --- /dev/null +++ b/.changeset/tall-bikes-develop.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove `resetResultIdentities` option from `InMemoryCache.gc()`. This affected object canonization which has been removed. diff --git a/.changeset/tall-cups-suffer.md b/.changeset/tall-cups-suffer.md new file mode 100644 index 00000000000..b71347080c9 --- /dev/null +++ b/.changeset/tall-cups-suffer.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": major +_tags: + - InMemoryCache +--- + +### Changes for users of `InMemoryCache` + +`cache.diff` now returns `null` instead of an empty object (`{}`) when `returnPartialData` is `true` and the result is empty. + +If you use `cache.diff` directly with `returnPartialData: true`, you will need to check for `null` before accessing any other fields on the `result` property. A non-null value indicates that at least one field was present in the cache for the given query document. + +### Changes for third-party cache implementations + +The client now expects `cache.diff` to return `null` instead of an empty object when there is no data that can be fulfilled from the cache and `returnPartialData` is `true`. If your cache implementation returns an empty object, please update this to return `null`. diff --git a/.changeset/tame-doors-shop.md b/.changeset/tame-doors-shop.md new file mode 100644 index 00000000000..c62ae6f1879 --- /dev/null +++ b/.changeset/tame-doors-shop.md @@ -0,0 +1,16 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +Remove workarounds for streaming with non-WhatWG response bodies to reduce bundle size. + +This removes support for `fetch` implementations that return Node Streams, Async Iterators or Blob instances as `Response.body`. + +In the WhatWG Fetch specification, [`Response.body`](https://fetch.spec.whatwg.org/#body) is specified as a WhatWG [ReadableStream](https://streams.spec.whatwg.org/#readablestream). + +At this point in time, this is natively supported in browsers, `node` and React Native (via [react-native-fetch-api](https://www.npmjs.com/package/react-native-fetch-api), see our [setup instructions for React Native](https://www.apollographql.com/docs/react/integrations/react-native#consuming-multipart-http-via-text-streaming)). + +If you are using an older `fetch` polyfill that deviates from the spec, this might not be compatible - for example, [node-fetch](https://github.com/node-fetch/node-fetch?tab=readme-ov-file#interface-body) returns a node `Readable` instead of a `ReadableStream`. +In those cases, please switch to a compatible alternative such as the `node`-native `fetch`, or `undici`. diff --git a/.changeset/tame-points-work.md b/.changeset/tame-points-work.md new file mode 100644 index 00000000000..7502476746c --- /dev/null +++ b/.changeset/tame-points-work.md @@ -0,0 +1,13 @@ +--- +"@apollo/client": minor +_tags: + - ssr +--- + +Add a new method for static SSR of React components, `prerenderStatic`. +The old methods, `getDataFromTree`, `getMarkupFromTree` and `renderToStringWithData` +have been deprecated in favor of `prerenderStatic`. + +If used with React 19 and the `prerender` or `prerenderToNodeStream` apis from +`react-dom/static`, this method can now be used to SSR-prerender suspense-enabled +hook APIs. diff --git a/.changeset/tame-rice-explain.md b/.changeset/tame-rice-explain.md new file mode 100644 index 00000000000..35c9b12f02e --- /dev/null +++ b/.changeset/tame-rice-explain.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - links +--- + +Adds an `accept` option to `HttpOptions` that allows to add additional `Accept` headers to be merged in without overriding user-specified or default accept headers. diff --git a/.changeset/ten-sloths-punch.md b/.changeset/ten-sloths-punch.md new file mode 100644 index 00000000000..301db09ca02 --- /dev/null +++ b/.changeset/ten-sloths-punch.md @@ -0,0 +1,12 @@ +--- +"@apollo/client": minor +_tags: + - mutations + - dataState +--- + +The `mutationResult` option passed to the `updateQueries` callback now has an +additional property, `dataState` with possible values of `"complete"` and `"streaming"`. +This indicates whether the `data` value is of type +* `Unmasked` (if `"complete"`) +* `Streaming>` (if `"streaming"`) diff --git a/.changeset/tender-swans-flash.md b/.changeset/tender-swans-flash.md new file mode 100644 index 00000000000..476b9825e1c --- /dev/null +++ b/.changeset/tender-swans-flash.md @@ -0,0 +1,27 @@ +--- +"@apollo/client": major +_tags: + - removals + - client.query + - client.refetchQueries + - client.refetchObservableQueries + - client.resetStore + - observableQuery.fetchMore + - observableQuery.refetch + - observableQuery.reobserve + - observableQuery.setVariables + - useLazyQuery +--- + +Remove `loading`, `networkStatus`, and `partial` properties on all promise-based query APIs. These properties were mostly static and were unnecessary since promise resolution guaranteed that the query was not longer loading. + +This affects the following APIs: +- `client.query` +- `client.refetchQueries` +- `client.reFetchObservableQueries` +- `client.resetStore` +- `observableQuery.fetchMore` +- `observableQuery.refetch` +- `observableQuery.reobserve` +- `observableQuery.setVariables` +- The `useLazyQuery` `execute` function diff --git a/.changeset/thick-books-grin.md b/.changeset/thick-books-grin.md new file mode 100644 index 00000000000..ca26e8eb1d0 --- /dev/null +++ b/.changeset/thick-books-grin.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": minor +_tags: + - ssr +--- + +Split out SSR-specific code from useQuery hook, remove RenderPromises diff --git a/.changeset/thin-peas-hear.md b/.changeset/thin-peas-hear.md new file mode 100644 index 00000000000..86852d40a49 --- /dev/null +++ b/.changeset/thin-peas-hear.md @@ -0,0 +1,21 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - useQuery + - useLazyQuery + - client.watchQuery +--- + +`notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`. + +```ts +new ApolloClient({ + defaultOptions: { + watchQuery: { + // Use the v3 default + notifyOnNetworkStatusChange: false + } + } +}) +``` diff --git a/.changeset/thirty-lemons-rhyme.md b/.changeset/thirty-lemons-rhyme.md new file mode 100644 index 00000000000..50adbf40ff5 --- /dev/null +++ b/.changeset/thirty-lemons-rhyme.md @@ -0,0 +1,28 @@ +--- +"@apollo/client": minor +_tags: + - links +--- + +Add `operationType` to `operation` in `ApolloLink`. This means that determining whether a `query` is a specific operation type can now be compared with this property instead of using `getMainDefinition`. + +```diff +- import { getMainDefinition } from "@apollo/client/utilities"; ++ import { OperationTypeNode } from "graphql"; + +ApolloLink.split( +- ({ query }) => { +- const definition = getMainDefinition(query); +- return ( +- definition.kind === 'OperationDefinition' && +- definition.operation === 'subscription' +- ); +- return +- }, ++ ({ operationType }) => { ++ return operationType === OperationTypeNode.SUBSCRIPTION; ++ }, + conditionTrueLink, + conditionFalseLink, +); +``` diff --git a/.changeset/thirty-pens-jump.md b/.changeset/thirty-pens-jump.md new file mode 100644 index 00000000000..188f2e7a411 --- /dev/null +++ b/.changeset/thirty-pens-jump.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - ApolloClient + - removals + - LocalState +--- + +Remove the `fragmentMatcher` option from `ApolloClient`. Custom fragment matchers used with local state are no longer supported. Fragment matching is now performed by the configured `cache` via the `cache.fragmentMatches` API. diff --git a/.changeset/tidy-pandas-punch.md b/.changeset/tidy-pandas-punch.md new file mode 100644 index 00000000000..ea6625ada6a --- /dev/null +++ b/.changeset/tidy-pandas-punch.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - types + - ObservableQuery +--- + +`ObservableQuery.variables` has been updated to return `TVariables` rather than `TVariables | undefined`. This is more consistent with the runtime value where an empty object (`{}`) will be returned when the `variables` option is not provided. diff --git a/.changeset/tidy-squids-poke.md b/.changeset/tidy-squids-poke.md new file mode 100644 index 00000000000..e64b9f658c9 --- /dev/null +++ b/.changeset/tidy-squids-poke.md @@ -0,0 +1,15 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery + - removals +--- + +Removes `ObservableQuery.result()` method. If you use this method and need similar functionality, use the `firstValueFrom` helper in RxJS. + +```ts +import { firstValueFrom, from } from "rxjs"; + +// The `from` is necessary to turn `observableQuery` into an RxJS observable +const result = await firstValueFrom(from(observableQuery)) +``` diff --git a/.changeset/tough-hairs-develop.md b/.changeset/tough-hairs-develop.md new file mode 100644 index 00000000000..68d21ea6d0b --- /dev/null +++ b/.changeset/tough-hairs-develop.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Fix the type of the argument for the `sha256` function for `PersistedQueryLink` from `...any[]` to `string`. diff --git a/.changeset/tough-olives-fry.md b/.changeset/tough-olives-fry.md new file mode 100644 index 00000000000..704c496ba86 --- /dev/null +++ b/.changeset/tough-olives-fry.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - useQuery + - bugfix +--- + +Ensure `useQuery` rerenders when `notifyOnNetworkStatusChange` is `false` and a `refetch` that changes variables returns a result deeply equal to previous variables. diff --git a/.changeset/tough-rockets-allow.md b/.changeset/tough-rockets-allow.md new file mode 100644 index 00000000000..4132fe9b9be --- /dev/null +++ b/.changeset/tough-rockets-allow.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - client.mutate + - bugfix +--- + +Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type. diff --git a/.changeset/tough-taxis-smoke.md b/.changeset/tough-taxis-smoke.md new file mode 100644 index 00000000000..9187b1a017e --- /dev/null +++ b/.changeset/tough-taxis-smoke.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - removals + - useQuery + - useLazyQuery +--- + +Remove the `onCompleted` and `onError` callbacks from `useQuery` and `useLazyQuery`. + +See [#12352](https://github.com/apollographql/apollo-client/issues/12352) for more context on this change. diff --git a/.changeset/tough-tips-drop.md b/.changeset/tough-tips-drop.md new file mode 100644 index 00000000000..80ee731d64f --- /dev/null +++ b/.changeset/tough-tips-drop.md @@ -0,0 +1,17 @@ +--- +"@apollo/client": major +_tags: + - client.subscribe +--- + +Subscriptions are no longer eagerly started after calling `client.subscribe`. To kick off the subscription, you will now need to subscribe to the returned observable. + +```ts +// Subscriptions are no longer started when calling subscribe on its own. +const subscriptionObservable = client.subscribe(...); + +// Instead, subscribe to the returned observable to kick off the subscription. +subscriptionObservable.subscribe({ + next: (value) => console.log(value) +}); +``` diff --git a/.changeset/tricky-glasses-reply.md b/.changeset/tricky-glasses-reply.md new file mode 100644 index 00000000000..299e4cfe7eb --- /dev/null +++ b/.changeset/tricky-glasses-reply.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": patch +--- + +Add a deprecation warning to `WebSocketLink`. diff --git a/.changeset/tricky-tables-shave.md b/.changeset/tricky-tables-shave.md new file mode 100644 index 00000000000..b70f79af5b7 --- /dev/null +++ b/.changeset/tricky-tables-shave.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - errors +--- + +GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error. diff --git a/.changeset/twelve-mangos-dance.md b/.changeset/twelve-mangos-dance.md new file mode 100644 index 00000000000..086df6b108a --- /dev/null +++ b/.changeset/twelve-mangos-dance.md @@ -0,0 +1,12 @@ +--- +"@apollo/client": minor +_tags: + - ObservableQuery + - useLazyQuery +--- + +`ObservableQuery.refetch` and `ObservableQuery.reobserve` and the `execute` function of `useLazyQuery` now return a +`ResultPromise` with an additional `.retain` method. +If this method is called, the underlying network operation will be kept running even if the `ObservableQuery` itself does +not require the result anymore, and the Promise will resolve with the final result instead of resolving with an intermediate +result in the case of early cancellation. diff --git a/.changeset/twenty-numbers-perform.md b/.changeset/twenty-numbers-perform.md new file mode 100644 index 00000000000..7b22a63735c --- /dev/null +++ b/.changeset/twenty-numbers-perform.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": patch +_tags: + - types +--- + +Move `ApolloClient`, `ObservableQuery`, and `ApolloCache.watchFragment` method options and result types into namespaces. The old types are now exported as deprecated. diff --git a/.changeset/twenty-snakes-sort.md b/.changeset/twenty-snakes-sort.md new file mode 100644 index 00000000000..61cc9619938 --- /dev/null +++ b/.changeset/twenty-snakes-sort.md @@ -0,0 +1,9 @@ +--- +"@apollo/client": major +_tags: + - useLazyQuery +--- + +`useLazyQuery` will now only execute the query when the execute function is called. Previously `useLazyQuery` would behave like `useQuery` after the first call to the execute function which means changes to options might perform network requests. + +You can now safely rerender `useLazyQuery` with new options which will take effect the next time you manually trigger the query. diff --git a/.changeset/two-zebras-punch.md b/.changeset/two-zebras-punch.md new file mode 100644 index 00000000000..de7d0d666c6 --- /dev/null +++ b/.changeset/two-zebras-punch.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Remove the `TVariables` generic argument on the `GraphQLRequest` type. diff --git a/.changeset/unlucky-kiwis-sell.md b/.changeset/unlucky-kiwis-sell.md new file mode 100644 index 00000000000..c0a3dd10c00 --- /dev/null +++ b/.changeset/unlucky-kiwis-sell.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - useQuery + - removals +--- + +Remove the `called` property from `useQuery`. diff --git a/.changeset/unlucky-sheep-change.md b/.changeset/unlucky-sheep-change.md new file mode 100644 index 00000000000..d7092f24520 --- /dev/null +++ b/.changeset/unlucky-sheep-change.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - removals + - rxjs +--- + +Remove `toPromise` utility function. Use [`firstValueFrom`](https://rxjs.dev/api/index/function/firstValueFrom) instead. diff --git a/.changeset/warm-ties-sit.md b/.changeset/warm-ties-sit.md new file mode 100644 index 00000000000..ef0d0646d0e --- /dev/null +++ b/.changeset/warm-ties-sit.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - errors + - client.subscribe + - useSubscription +--- + +Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open. + +When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead. diff --git a/.changeset/weak-goats-melt.md b/.changeset/weak-goats-melt.md new file mode 100644 index 00000000000..7282569486b --- /dev/null +++ b/.changeset/weak-goats-melt.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +Remove the `DataMasking` interface exported from `@apollo/client` and `@apollo/client/masking`. diff --git a/.changeset/weak-melons-join.md b/.changeset/weak-melons-join.md new file mode 100644 index 00000000000..089b5c2b6ba --- /dev/null +++ b/.changeset/weak-melons-join.md @@ -0,0 +1,5 @@ +--- +"@apollo/client": major +--- + +The context object returned from `operation.getContext()` is now frozen to prevent mutable changes to the object which could result in subtle bugs. This applies to the `previousContext` object passed to the `operation.setContext()` callback as well. diff --git a/.changeset/weak-owls-buy.md b/.changeset/weak-owls-buy.md new file mode 100644 index 00000000000..be117901780 --- /dev/null +++ b/.changeset/weak-owls-buy.md @@ -0,0 +1,50 @@ +--- +"@apollo/client": major +_tags: + - links +--- + +All links are now available as classes. The old creator functions have been deprecated. + +Please migrate these function calls to class creations: + +```diff +import { +- setContext ++ SetContextLink +} from "@apollo/client/link/context" + +-const link = setContext(...) ++const link = new SetContextLink(...) +``` + +```diff +import { +- createHttpLink ++ HttpLink +} from "@apollo/client/link/http" + +-const link = createHttpLink(...) ++const link = new HttpLink(...) +``` + +```diff +import { +- createPersistedQueryLink ++ PersistedQueryLink +} from "@apollo/client/link/persisted-queries" + +-const link = createPersistedQueryLink(...) ++const link = new PersistedQueryLink(...) +``` + +```diff +import { +- removeTypenameFromVariables ++ RemoveTypenameFromVariablesLink +} from "@apollo/client/link/remove-typename" + +-const link = removeTypenameFromVariables(...) ++const link = new RemoveTypenameFromVariablesLink(...) +``` + diff --git a/.changeset/wicked-forks-double.md b/.changeset/wicked-forks-double.md new file mode 100644 index 00000000000..62fadd56c88 --- /dev/null +++ b/.changeset/wicked-forks-double.md @@ -0,0 +1,37 @@ +--- +"@apollo/client": major +_tags: + - links + - testing + - removals +--- + +Remove `newData` option for mocked responses passed to `MockLink` or the `mocks` option on `MockedProvider`. This option was undocumented and was nearly identical to using the `result` option as a callback. + +To replicate the old behavior of `newData`, use `result` as a callback and add the `maxUsageCount` option with a value set to `Number.POSITIVE_INFINITY`. + +**with `MockLink`** +```diff +new MockLink([ + { + request: { query, variables }, +- newData: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), ++ result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), ++ maxUsageCount: Number.POSITIVE_INFINITY, + } +]) +``` + +**with `MockedProvider`** +```diff + ({ data: { greeting: "Hello " + variables.greeting } }), ++ result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), ++ maxUsageCount: Number.POSITIVE_INFINITY, + } + ]} +/> +``` diff --git a/.changeset/wicked-kiwis-buy.md b/.changeset/wicked-kiwis-buy.md new file mode 100644 index 00000000000..f860ed42e43 --- /dev/null +++ b/.changeset/wicked-kiwis-buy.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - ObservableQuery +--- + +A call to `ObservableQuery.setVariables` with different variables or a `ObservableQuery.refetch` call will always now guarantee that a value will be emitted from the observable, even if it is deep equal to the previous value. diff --git a/.changeset/wicked-queens-lick.md b/.changeset/wicked-queens-lick.md new file mode 100644 index 00000000000..f2d7c539091 --- /dev/null +++ b/.changeset/wicked-queens-lick.md @@ -0,0 +1,11 @@ +--- +"@apollo/client": major +_tags: + - ApolloClient +--- + +`ApolloClient.stop()` now cleans up more agressively to prevent memory leaks: + +* It will now unsubscribe all active `ObservableQuery` instances by emitting a `completed` event. +* It will now reject all currently running queries with `"QueryManager stopped while query was in flight"`. +* It will remove all queryRefs from the suspense cache. diff --git a/.changeset/wild-carpets-exercise.md b/.changeset/wild-carpets-exercise.md new file mode 100644 index 00000000000..c6b145a7d09 --- /dev/null +++ b/.changeset/wild-carpets-exercise.md @@ -0,0 +1,37 @@ +--- +"@apollo/client": minor +_tags: + - dataState +--- + + +Add a new `dataState` property that determines the completeness of the `data` property. `dataState` helps narrow the type of `data`. `dataState` is now emitted from `ObservableQuery` and returned from all React hooks that return a `data` property. + +The `dataState` values are: + +- `empty`: No data could be fulfilled from the cache or the result is incomplete. `data` is `undefined`. +- `partial`: Some data could be fulfilled from the cache but `data` is incomplete. This is only possible when `returnPartialData` is `true`. +- `streaming`: `data` is incomplete as a result of a deferred query and the result is still streaming in. +- `complete`: `data` is a fully satisfied query result fulfilled either from the cache or network. + +Example: + +```ts +const { data, dataState } = useQuery(query); + +if (dataState === 'empty') { + expectTypeOf(data).toEqualTypeOf(); +} + +if (dataState === 'partial') { + expectTypeOf(data).toEqualTypeOf>(); +} + +if (dataState === 'streaming') { + expectTypeOf(data).toEqualTypeOf(); +} + +if (dataState === 'complete') { + expectTypeOf(data).toEqualTypeOf(); +} +``` diff --git a/.changeset/wild-tigers-own.md b/.changeset/wild-tigers-own.md new file mode 100644 index 00000000000..68138690369 --- /dev/null +++ b/.changeset/wild-tigers-own.md @@ -0,0 +1,19 @@ +--- +"@apollo/client": major +--- + +The `forward` function passed to the request handler is now always provided to `request` and no longer optional. If you create custom links by subclassing `ApolloLink`, the `forward` function no longer needs to be optional: + +```ts +class CustomLink extends ApolloLink { + request( + operation: ApolloLink.Operation, + // This no longer needs to be typed as optional + forward: ApolloLink.ForwardFunction + ) { + // ... + } +} +``` + +As a result of this change, `ApolloLink` no longer detects terminating links by checking function arity on the request handler. This means using methods such as `concat` on a terminating link no longer emit a warning. On the flip side, if the terminating link calls the `forward` function, a warning is emitted and an observable that immediately completes is returned which will result in an error from Apollo Client. diff --git a/.changeset/witty-paws-marry.md b/.changeset/witty-paws-marry.md new file mode 100644 index 00000000000..cec81b6569e --- /dev/null +++ b/.changeset/witty-paws-marry.md @@ -0,0 +1,29 @@ +--- +"@apollo/client": major +_tags: + - ApolloClient + - removals +--- + +Require the `link` option when instantiating `ApolloClient`. This removes the `uri`, `credentials` and `headers` options from `ApolloClient` in favor of passing an instantiated `HttpLink` directly. To migrate: + +**If using `uri`, `credentials`, or `headers` options** +```diff +new ApolloClient({ + // ... +- uri, +- credentials, +- headers, ++ link: new HttpLink({ uri, credentials, headers }), +// or if you prefer the function call approach: ++ link: createHttpLink({ uri, credentials, headers }), +}); +``` + +**If creating a client without the `link` option** +```diff +new ApolloClient({ + // ... ++ link: ApolloLink.empty() +}); +``` diff --git a/.changeset/yellow-cats-judge.md b/.changeset/yellow-cats-judge.md new file mode 100644 index 00000000000..dda5a78b0ca --- /dev/null +++ b/.changeset/yellow-cats-judge.md @@ -0,0 +1,16 @@ +--- +"@apollo/client": major +_tags: + - cache + - InMemoryCache +--- + +### Changes for users of `InMemoryCache` + +`cache.diff` no longer throws when `returnPartialData` is set to `false` without a complete result. Instead, `cache.diff` will return `null` when it is unable to read a full cache result. + +If you use `cache.diff` directly with `returnPartialData: false`, remove the `try`/`catch` block and replace with a check for `null`. + +### Changes for third-party cache implementations + +The client now expects `cache.diff` to return `null` instead of throwing when the cache returns an incomplete result and `returnPartialData` is `false`. The internal `try`/`catch` blocks have been removed around `cache.diff`. If your cache implementation throws for incomplete results, please update this to return `null`. diff --git a/.changeset/young-moons-admire.md b/.changeset/young-moons-admire.md new file mode 100644 index 00000000000..f4369a41105 --- /dev/null +++ b/.changeset/young-moons-admire.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": patch +_tags: + - links + - bugfix +--- + +Fixed a bug in `PersistedQueryLink` where the `persistedQuery` extension would still be sent after a `PersistedQueryNotSupported` if `includeExtensions` was enabled on `HttpLink`. diff --git a/.changeset/young-phones-fold.md b/.changeset/young-phones-fold.md new file mode 100644 index 00000000000..d26f541a4a9 --- /dev/null +++ b/.changeset/young-phones-fold.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - types +--- + +Default the `TData` generic type to `unknown` in all APIs that use a `TData` generic argument such as `useQuery`, `client.query`, etc. diff --git a/.changeset/young-snails-grin.md b/.changeset/young-snails-grin.md new file mode 100644 index 00000000000..6437bd64f5a --- /dev/null +++ b/.changeset/young-snails-grin.md @@ -0,0 +1,8 @@ +--- +"@apollo/client": major +_tags: + - fetch_policy + - client.query +--- + +`client.query` no longer supports a `fetchPolicy` of `standby`. `standby` does not fetch and did not return `data`. `standby` is meant for watched queries where fetching should be on hold. diff --git a/.changeset/young-turtles-explode.md b/.changeset/young-turtles-explode.md new file mode 100644 index 00000000000..19d583aa4dc --- /dev/null +++ b/.changeset/young-turtles-explode.md @@ -0,0 +1,7 @@ +--- +"@apollo/client": major +_tags: + - removals +--- + +Remove the deprecated `Query`, `Mutation`, and `Subscription` components. Use the provided React hooks instead. diff --git a/.circleci/config.yml b/.circleci/config.yml index 02a012a0be2..30eef62015c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,25 @@ jobs: # - run: npm ci # - run: npm run bundlesize + Circularity: + docker: + - image: cimg/node:23.7.0 + steps: + - checkout + - run: npm version + - run: npm ci + - run: npm run madge + + Publint: + docker: + - image: cimg/node:23.7.0 + steps: + - checkout + - run: npm version + - run: npm ci + - run: npm run build + - run: npm run publint + Lint: docker: - image: cimg/node:23.9.0 @@ -17,6 +36,8 @@ jobs: - checkout - run: npm version - run: npm ci + - run: npm run docmodel + - run: npm run build - run: npm run lint Formatting: @@ -38,6 +59,8 @@ jobs: - run: npm run ci:precheck - run: npm version - run: npm ci + - run: npm run build + - run: npm run typecheck - run: if test "<< parameters.project >>" = "Core Tests"; then npm run test:memory; fi - run: name: Jest suite with coverage @@ -82,32 +105,35 @@ jobs: - checkout - attach_workspace: at: /tmp/workspace - - run: npm version + - run: pnpm version - run: - command: npm pkg set "overrides[@apollo/client]=/tmp/workspace/apollo-client.tgz" + command: pnpm pkg set "pnpm.overrides[@apollo/client]=/tmp/workspace/apollo-client.tgz" working_directory: integration-tests - run: command: | - export VERSION=$(npm show react --json | jq '."dist-tags"."<< parameters.react >>"' -r) - npm pkg set "overrides[react]=${VERSION}" "overrides[react-dom]=${VERSION}" + export VERSION=$(pnpm view react@<< parameters.react >> version) + pnpm pkg set "pnpm.overrides[react]=${VERSION}" "pnpm.overrides[react-dom]=${VERSION}" working_directory: integration-tests - run: - command: npm run ci-preparations --workspace=<< parameters.framework >> --if-present + command: pnpm run --if-present --filter << parameters.framework >> ci-preparations working_directory: integration-tests - run: - command: npm install + command: pnpm install --no-frozen-lockfile working_directory: integration-tests - run: - command: npx playwright install-deps + command: cat pnpm-lock.yaml working_directory: integration-tests - run: - command: npx playwright install + command: pnpm exec playwright install-deps working_directory: integration-tests - run: - command: npm run build --workspace=<< parameters.framework >> --if-present + command: pnpm exec playwright install working_directory: integration-tests - run: - command: npm run test --workspace=<< parameters.framework >> + command: pnpm run --if-present --filter << parameters.framework >> build + working_directory: integration-tests + - run: + command: pnpm run --if-present --filter << parameters.framework >> "/test(:.*|$)/" working_directory: integration-tests TestPeerDepTypes: @@ -136,7 +162,15 @@ workflows: matrix: parameters: project: - ["Core Tests", "ReactDOM 17", "ReactDOM 18", "ReactDOM 19"] + [ + "Core Tests", + "Core Tests - RxJS min version", + "ReactDOM 17", + "ReactDOM 18", + "ReactDOM 19", + ] + - Circularity + - Publint - Attest - Formatting - Lint @@ -148,23 +182,33 @@ workflows: matrix: parameters: framework: - - cra4 - cra5 - - next - - dual-module-test-esm - - dual-module-test-standard + #- next + - node - vite - vite-swc + - wrapping-library # -browser-esm would need a package publish to npm/CDNs react: + - "18.3.0" - latest - next exclude: - - framework: cra4 + # CRA only works with React 18 + - framework: cra5 + react: next + - framework: cra5 + react: latest + # next ships it's own React version anyways + - framework: next react: next - # next ships it's own React version anyways, no need to run this test twice - framework: next + react: "18.3.0" + # node doesn't use React in the tests + - framework: node react: next + - framework: node + react: "18.3.0" - TestPeerDepTypes: name: Test external types for << matrix.externalPackage >> requires: @@ -175,7 +219,6 @@ workflows: - "graphql@15" - "graphql@16" - "graphql@^17.0.0-alpha" - - "@types/react@16.8 @types/react-dom@16.8" - "@types/react@17 @types/react-dom@17" - "@types/react@18 @types/react-dom@18" - "@types/react@19 @types/react-dom@19" diff --git a/.claude/commands/chores.md b/.claude/commands/chores.md new file mode 100644 index 00000000000..6e7a875a119 --- /dev/null +++ b/.claude/commands/chores.md @@ -0,0 +1,21 @@ +--- +allowed-tools: Bash(git commit:*) +description: Chores +--- + +## Context + +- Current git status: !`git status` +- Current git diff (staged and unstaged changes): !`git diff HEAD` +- Current branch: !`git branch --show-current` +- Recent commits: !`git log --oneline -10` + +## Your task + +Fetch the latest changes from the remote repository. If the current branch is not up to date, don't do anything, but inform the user about it. + +Take a note if the current git status is clean. + +Run the npm scripts `format`, `build`, `extract-api:only`, `update-size-limits` after each other in that order. + +If before running the scripts, the git status was clean, create a new commit with the message "chores". diff --git a/.claude/documentation.md b/.claude/documentation.md new file mode 100644 index 00000000000..54b3dcb4f7c --- /dev/null +++ b/.claude/documentation.md @@ -0,0 +1,71 @@ +# Documentation specific instructions + +Documentation can be found in the `docs/` directory and in the `src/` directory as DocBlocks. + +## Data sources + +See @docs/source/\_sidebar.yaml for the documentation structure. +DocBlocks can contain comments in the form `{@inheritDoc @apollo/client!QueryOptionsDocumentation#query:member}` to (in this example) include the DocBlock of the `query` member on the `QueryOptionsDocumentation` interface. `@apollo/client!QueryOptionsDocumentation#query:member` is called a "canonical reference" and is used to uniquely identify a DocBlock. +An accumulation of all DocBlocks and their canonical references can be found in @docs/public/client.api.json. This file is generated from the source code by running `npm run docmodel`. +All .json files in the `docs/public/` directory are autogenerated. They can be read, but not modified. Instead, the respective source files in the `src/` directory should be modified, and the JSON file should be regenerated by running `npm run docmodel`. + +## DocBlock inheritance + +If possible, DocBlocks should not repeat other DocBlocks in other places, but use `@inheritDoc` annotations. For every DocBlock, before adding text, the existing DocBlocks in @src/react/types/types.documentation.ts and @src/utilities/internal/types/DocumentationTypes.ts should always be checked and if possible referenced. + +## Available components + +For components that can be used in `.mdx` files, reference @docs/shared/MdxProvidedComponents.ts + +## Documentation Guidelines + +### Tone + +Documentation should be written in an approachable, positive, and encouraging tone. It should be helpful and opinionated. The goal is to make the documentation easy to understand and follow, while also providing clear guidance on best practices. +The target audience is JavaScript and TypeScript developers of all skill levels with different native language backgrounds, so the documentation should be accessible to non-native English speakers as well. Nested sentences and complex non-domain-specific vocabulary should be avoided where possible. +At no point should the documentation be sarcastic, condescending or dismissive of the reader's knowledge or experience. +Spelling and grammar should follow American English conventions. +Content should be framed towards the reader in an active voice (e.g. "You can use the `useQuery` hook to fetch data" instead of "The `useQuery` hook can be used to fetch data"). Passive voice can be used to describe the behavior of the library (e.g. "The `useQuery` hook returns an object containing the query result") as a result of userland code usage. +The use of "we" should be avoided, unless it is used to refer to the Apollo Client team as a whole (e.g. "We recommend using fragment colocation and data masking."). + +### Change documentation - CRITICAL RULE + +**NEVER reference changes, previous versions, or historical behavior in documentation.** Documentation must ONLY describe the current state of the library. + +FORBIDDEN phrases and patterns: + +- "previously" or "previous behavior" +- "has been restructured" or "has been changed" +- "now takes" or "now provides" +- "in earlier versions" +- "used to be" or "was changed" +- Any reference to what something was like before + +CORRECT approach: + +- Describe how things work today +- State what the current behavior is +- Explain the current API without comparing to past versions + +If new features are added to the documentation, they can include a `` tag wrapping the headline of the new feature, to indicate that this feature is only available in Apollo Client 3.10.0 and later. +For features that are introduced in a major version, the `` tag should not be used, as for each major version, a separate copy of the documentation is maintained. +Currently, this documentation copy is the copy for Apollo Client with the major version 4, so all references to previous versions can be removed. +Never use phrases like "since version 4.0, this or that change applied". Only document the current state of the library, not its history. + +### Prefer describing certain APIs over others. + +- When having a choice, describe the state of the `dataState` property instead of mentioning `partial`. +- In many cases, be more specific about the `networkStatus` that can be observed instead of using the `loading` property. In some cases it can make sense to mention both. + +### Updating DocBlocks + +If outdated or incorrect documentation is found in `docs/public/client.api.json`, find the closest parent `fileUrlPath` in the JSON structure and update the original DocBlock in that file. Then run `npm run docmodel` to regenerate the JSON file and read the `docs/public/client.api.json` again. + +### DocBlock Guidelines + +- Use `@template` to document TypeScript generics, not `@param` +- Example: `@template TData - The type of data returned by the query` +- Use `@param` only for actual function parameters +- Use `@returns` to document return values +- Use `@defaultValue` to document default values for properties in interfaces describing options +- Use `@example` for code examples diff --git a/.claude/hooks.md b/.claude/hooks.md new file mode 100644 index 00000000000..2ec71f418de --- /dev/null +++ b/.claude/hooks.md @@ -0,0 +1,259 @@ +# React Hooks + +React Hooks can be found in the `src/react/hooks` directory. +This folder contains React Hooks and their associated types, as well as documentation for each hook in DocBlocks, always colocated in one file per hook. + +## Hooks Type Structure + +Types for the React Hooks are held in the same file as the hook itself. They follow this structure: +In this example, single-line comments (with `//`) are used to annotate and explain the example +while DocBlocks (with `/** ... */`) are part of the actual structure that is present in the files. + +```ts +// A namespace with the hook's name that contains all types related to the hook +export declare namespace useMyHook { + // an `Options` interface + export interface Options { + // ... + } + + // a `Result` interface + export interface Result { + // ... + } + + // A namespace for documentation types, which are simplified versions of the hook's types. + // This is necessary because we can only reference interfaces and function signatures in the Documentation, not complex types. + export namespace DocumentationTypes { + // The `DocumentationTypes` namespace always contains a simplified version of the hook for documentation purposes. + + // The function signature for documentation, which inherits documentation from the first signature of the actual hook + /** {@inheritDoc @apollo/client!useMyHook:function(1)} */ + export function useMyHook(options: useMyHook.Options): useMyHook.Result; + } +} + +// All overload signatures for the hook + +// The first hook signature contains the documentation +/** + * Documentation for the hook. + */ +function useMyHook( + options: useMyHook.Options & SomeSpecifyingType +): useMyHook.Result & SomeRestrictingType; + +// The second and all subsequent signatures don't contain the full documentation, but only a DocBlock with a `@inheritDoc` tag. +/** {@inheritDoc @apollo/client!useMyHook:function(1)} */ +function useMyHook( + options: useMyHook.Options & SomeOtherSpecifyingType +): useMyHook.Result & SomeOtherRestrictingType; + +// The hook implementation at the bottom. This one doesn't have a DocBlock. +export function useMyHook(options: useMyHook.Options): useMyHook.Result { + // Implementation here +} +``` + +If the `Options`, `Result` or any other documented type is not an interface, but a more complex type, +common properties are extracted into a `useMyHook.Base` namespace. +Then, another interface with a simplified version of the non-common properties is created in the `DocumentationTypes` +namespace, in a sub-namespace that shares the hook name. +Both the "real" type in the `useMyHook` namespace and the simplified interface version in the `DocumentationTypes.useMyHook` +namespace inherit from the common properties interface in the `useMyHook.Base` namespace. + +If the `Options` type would be more complicated, e.g. + +```ts +export namespace useMyHook { + export type Options = { + commonProperty: string; + } & (T extends SomeType ? { someProperty: string } + : { someProperty?: never }); +} +``` + +the result would look like this: + +```ts +export namespace useMyHook { + export namespace Base { + export interface Options { + commonProperty: string; + } + } + + export type Options = useMyHook.Base.Options & SomeComplexType; + + export namespace DocumentationTypes { + namespace useMyHook { + export interface Options extends Base.Options { + someProperty?: string; + } + } + } + + // the rest of the structure continues as before + export interface Result { + // ... + } +} +``` + +When types are simple interfaces, the nested namespace structure may not be necessary, and the types can be referenced directly in the function signature by `useMyHook.InterfaceName`. However, when dealing with complex types, the nested namespace pattern as shown above is commonly used. + +Note that if this is necessary for multiple types, the nested namespace definition +should not be merged in one place, but just repeated for each type. +So it could look like this in the end: + +```ts +export namespace useMyHook { + export namespace Base { + export interface Options { + // ... + } + } + + export type Options = useMyHook.Base.Options & SomeComplexType; + + export namespace DocumentationTypes { + namespace useMyHook { + export interface Options extends Base.Options { + // ... + } + } + } + + export namespace Base { + export interface Result { + // ... + } + } + + export type Result = useMyHook.Base.Result & SomeOtherComplexType; + + export namespace DocumentationTypes { + namespace useMyHook { + export interface Result extends Base.Result { + // ... + } + } + } + + // other types + + export namespace DocumentationTypes { + export function useMyHook(options: useMyHook.Options): useMyHook.Result; + } +} +``` + +## Additional Implementation Details + +Some hooks may have more complex implementations with multiple function overloads that use specific type constraints. For example, a hook might have several overloads with different combinations of options that affect the resulting types. These overloads allow TypeScript to narrow the return type based on the specific options passed. The number and complexity of these overloads varies by hook based on its specific requirements. + +## Internal Function Implementation Pattern + +Some hooks use a pattern where the exported function is a wrapper around an internal implementation function. For example: + +```ts +export function useMyHook(...args) { + return wrapHook( + "useMyHook", + useMyHook_ // Internal implementation function + // ... other setup + )(...args); +} + +function useMyHook_(...args) { + // Actual implementation +} +``` + +This pattern allows for hook implementations to be overwritten by the `ApolloClient` instance of the `ApolloProvider`, which allows for custom behaviour e.g. during SSR. +Every hook using this pattern needs to be added to the `WrappableHooks` interface in `src/react/hooks/internal/wrapHook.ts`. + +## Simple Hooks + +Not all hooks follow the complex namespace pattern. Simple hooks that take minimal parameters and return straightforward values (like `useApolloClient` or `useReactiveVar`) are implemented as plain functions without namespaces or complex type structures. This is appropriate when: + +- The hook has no or minimal configuration options +- The return type is simple and can be described as a single interface or primitive type +- There's no need for documentation type simplification + +## Additional Type Patterns + +### Self-import Pattern + +In some cases, a self-import pattern is allowed to access the outer `useMyHook` namespace within the `DocumentationTypes.useMyHook` namespace. This might be necessary to avoid shadowing of the `useMyHook` identifier. + +```ts +export declare namespace useMyHook { + import _self = useMyHook; + + // Now can use _self.Options instead of useMyHook.Options +} +``` + +### Conditional Parameters + +Hooks may use conditional types in their parameters to make options required or optional based on generic types: + +```ts +export function useMyHook( + query: DocumentNode, + ...[options]: {} extends TVariables ? + [options?: useMyHook.Options] + : [options: useMyHook.Options] +): useMyHook.Result; +``` + +### Result Tuples + +Some hooks (like `useLazyQuery` and `useMutation`) return tuples instead of single objects: + +```ts +export declare namespace useMyHook { + export type Result = [ + executeFunction: (options?: Options) => Promise, + result: QueryResult, + ]; +} +``` + +### "use no memo" Directive + +Some hook implementations include a `"use no memo";` directive at the beginning of the function body to indicate React Compiler optimization hints. + +### Utility Documentation Types + +When hooks need to extend or compose with common utility types in their documentation interfaces, they import and use `UtilityDocumentationTypes` from the utilities package: + +```ts +import type { + DocumentationTypes as UtilityDocumentationTypes, + // ... other imports +} from "@apollo/client/utilities/internal"; + +export namespace useMyHook { + // ... types ... + + export namespace DocumentationTypes { + namespace useMyHook { + export interface Options + extends Base.Options, + UtilityDocumentationTypes.VariableOptions {} + + export interface Result + extends Base.Result, + UtilityDocumentationTypes.DataState {} + } + } +} +``` + +Common utility documentation types include: + +- `VariableOptions` - For GraphQL variables options +- `DataState` - For data state properties in query results +- `ApolloQueryResult` - For complete query result types including loading, error, and data states diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 00000000000..6ccfc68f208 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,14 @@ +{ + "permissions": { + "allow": [ + "Bash(git add:*)", + "Bash(git fetch:*)", + "Bash(git status:*)", + "Bash(git diff:*)", + "Bash(npm run:*)", + "Edit(docs/**)", + "Edit(src/**)" + ], + "deny": [] + } +} diff --git a/.github/ISSUE_TEMPLATE/question-discussion.md b/.github/ISSUE_TEMPLATE/question-discussion.md index be195b9cd84..ac7a5c42c61 100644 --- a/.github/ISSUE_TEMPLATE/question-discussion.md +++ b/.github/ISSUE_TEMPLATE/question-discussion.md @@ -5,6 +5,6 @@ about: Questions / discussions are best posted in our community forums or StackO Need help or want to talk all things Apollo Client? Issues here are reserved for bugs, but one of the following resources should help: -* Apollo GraphQL community forums: https://community.apollographql.com -* StackOverflow (`apollo-client` tag): https://stackoverflow.com/questions/tagged/apollo-client -* Apollo Feature Request repo: https://github.com/apollographql/apollo-feature-requests +- Apollo GraphQL community forums: https://community.apollographql.com +- StackOverflow (`apollo-client` tag): https://stackoverflow.com/questions/tagged/apollo-client +- Apollo Feature Request repo: https://github.com/apollographql/apollo-feature-requests diff --git a/.github/workflows/api-extractor.yml b/.github/workflows/api-extractor.yml index b54d5e078aa..c46ca0eb66f 100644 --- a/.github/workflows/api-extractor.yml +++ b/.github/workflows/api-extractor.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/arethetypeswrong.yml b/.github/workflows/arethetypeswrong.yml index c83c623241f..a95d1bb3fc4 100644 --- a/.github/workflows/arethetypeswrong.yml +++ b/.github/workflows/arethetypeswrong.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/change-prerelease-tag.yml b/.github/workflows/change-prerelease-tag.yml index 208f10d0b57..7c6250d7424 100644 --- a/.github/workflows/change-prerelease-tag.yml +++ b/.github/workflows/change-prerelease-tag.yml @@ -41,10 +41,10 @@ jobs: # with the correct commits fetch-depth: 0 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Write latest version to package.json and package-lock.json run: | diff --git a/.github/workflows/cleanup-checks.yml b/.github/workflows/cleanup-checks.yml index 51d95ff15f5..2924289a016 100644 --- a/.github/workflows/cleanup-checks.yml +++ b/.github/workflows/cleanup-checks.yml @@ -33,17 +33,14 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - - name: Run build - run: npm run build - - name: Run Api-Extractor run: npm run extract-api env: @@ -52,6 +49,9 @@ jobs: - name: Run prettier run: npm run format + - name: Run build + run: npm run build + - name: Update size-limit run: npm run update-size-limits diff --git a/.github/workflows/compare-build-output.yml b/.github/workflows/compare-build-output.yml index b367e4672e6..afe3a58d79b 100644 --- a/.github/workflows/compare-build-output.yml +++ b/.github/workflows/compare-build-output.yml @@ -14,15 +14,15 @@ jobs: with: # Fetch entire git history so we have the parent commit to compare against fetch-depth: 0 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run comparison script id: attw - run: ./config/compare-build-output-to.sh $(git merge-base HEAD origin/${{ github.base_ref }}) > $GITHUB_STEP_SUMMARY + run: ./config/compare-build-output-to.sh $(git merge-base HEAD origin/${{ github.base_ref }}) | tee $GITHUB_STEP_SUMMARY env: RUNNER_TEMP: ${{ runner.temp }} diff --git a/.github/workflows/exit-prerelease.yml b/.github/workflows/exit-prerelease.yml index 6ac4e76b1a8..7f313ee7bd6 100644 --- a/.github/workflows/exit-prerelease.yml +++ b/.github/workflows/exit-prerelease.yml @@ -36,10 +36,10 @@ jobs: # with the correct commits fetch-depth: 0 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Write latest version to package.json and package-lock.json run: | diff --git a/.github/workflows/knip.yml b/.github/workflows/knip.yml new file mode 100644 index 00000000000..63d7d737a68 --- /dev/null +++ b/.github/workflows/knip.yml @@ -0,0 +1,15 @@ +name: Look for dead code and unused dependencies + +on: push + +jobs: + lint: + runs-on: ubuntu-latest + name: Ubuntu/Node v20 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Install dependencies (with cache) + uses: bahmutov/npm-install@v1 + - name: Run knip + run: npm run knip diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 4cc99ef2b37..df8f9d3feee 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -21,6 +21,8 @@ jobs: contents: write pull-requests: write id-token: write + outputs: + packages: ${{ steps.changesets.outputs.publishedPackages }} steps: - uses: actions/create-github-app-token@v1 id: github-actions-bot-app-token @@ -47,10 +49,10 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies with cache uses: bahmutov/npm-install@v1 @@ -91,22 +93,55 @@ jobs: uses: changesets/action@v1 with: version: echo "This step should never version" - publish: npm run changeset-publish # by default, this will publish to npm and GitHub + publish: npm run changeset-publish env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Tag release with next on npm - if: steps.changesets.outcome == 'success' + postrelease: + name: Postrelease + runs-on: ubuntu-latest + needs: prerelease + if: needs.prerelease.result == 'success' && fromJSON(needs.prerelease.outputs.packages)[0] != null + strategy: + matrix: + package: ${{ fromJSON(needs.prerelease.outputs.packages) }} + steps: + - uses: actions/create-github-app-token@v1 + id: github-actions-bot-app-token + with: + app-id: 819772 + private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }} + + - name: Checkout repo + uses: actions/checkout@v4 + with: + token: ${{ steps.github-actions-bot-app-token.outputs.token }} + + - name: Append NPM token to .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + provenance=true + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF env: - PUBLISHED: ${{ fromJson(steps.changesets.outputs.publishedPackages)[0].version }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ">=23.6.0" + + - name: Install dependencies with cache + uses: bahmutov/npm-install@v1 + + - name: Tag release with next on npm run: | - if NEXT=$(npm show @apollo/client@next version) node -e 'process.exit(require("semver").gt(process.env.PUBLISHED,process.env.NEXT)?0:1)'; then - npm dist-tag add @apollo/client@${PUBLISHED} next; + if NEXT=$(npm show ${{ matrix.package.name }}@next version) node -e 'process.exit(require("semver").gt(process.env.PUBLISHED,"${{ matrix.package.version }}")?0:1)'; then + npm dist-tag add ${{ matrix.package.name }}@${{ matrix.package.version }} next; fi - name: Send a Slack notification on publish - if: steps.changesets.outcome == 'success' id: slack uses: slackapi/slack-github-action@v1.27.0 with: @@ -122,7 +157,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "A new version of `@apollo/client` was released: :rocket:" + "text": "A new version of `${{ matrix.package.name }}` was released: :rocket:" } } ] diff --git a/.github/workflows/publish-pr-releases.yml b/.github/workflows/publish-pr-releases.yml index 24bcc481079..8e1a2aac15c 100644 --- a/.github/workflows/publish-pr-releases.yml +++ b/.github/workflows/publish-pr-releases.yml @@ -16,13 +16,42 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" + + - name: Check if any files in codegen/ changed + id: changed-files-codegen + uses: karpikpl/list-changed-files-action@1.1.4 + with: + file-filter: "codegen/**" + + - name: Check if any files in scripts/codemods/ac3-to-ac4/ changed + id: changed-files-codemod + uses: karpikpl/list-changed-files-action@1.1.4 + with: + file-filter: "scripts/codemods/ac3-to-ac4/**" - name: Install dependencies with cache uses: bahmutov/npm-install@v1 + - name: Build AC + run: npm run build + + - name: Build Codegen + if: steps.changed-files-codegen.outputs.changed_files != '' + run: npm run build + working-directory: "./codegen" + + - name: Build Codemod + if: steps.changed-files-codemod.outputs.changed_files != '' + run: npm run build + working-directory: "./scripts/codemods/ac3-to-ac4" + - name: Build and publish to pkg.pr.new - run: npm run pkg-pr-new-publish + env: + PACKAGE_CODEGEN: ${{ steps.changed-files-codegen.outputs.changed_files != '' && './codegen' || '' }} + PACKAGE_CODEMOD: ${{ steps.changed-files-codemod.outputs.changed_files != '' && './scripts/codemods/ac3-to-ac4' || '' }} + # skipping --compact for a moment as there is an unreleased package + run: npx pkg-pr-new publish --no-template ./dist $PACKAGE_CODEGEN $PACKAGE_CODEMOD diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd16a06bfb1..44ef0d58131 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,10 +43,10 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/size-limit.yml b/.github/workflows/size-limit.yml index 2295fc46951..15c2862771b 100644 --- a/.github/workflows/size-limit.yml +++ b/.github/workflows/size-limit.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 - name: Run size-limit diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index 4b21f629c09..a3bbc63f6e1 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -90,10 +90,10 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Setup Node.js 20.x + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: ">=23.6.0" - name: Install dependencies (with cache) uses: bahmutov/npm-install@v1 diff --git a/.gitignore b/.gitignore index d9dbc1e1a44..1e0db32092c 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ esbuild-why-*.html yalc.lock .attest +.ignore diff --git a/.prettierignore b/.prettierignore index 4af59c9d031..a4b747a5c6d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,31 +9,14 @@ # ONLY ADD NEWLY CREATED FILES/PATHS TO THE LIST BELOW. DO NOT ADD EXISTING # PROJECT FILES. -# ignores all files in /docs directory -!/docs -/docs/** - # Ignore all mdx & md files: -*.mdx -*.md *.har *.snap -!/docs/source -/docs/source/** -!/docs/source/development-testing -/docs/source/development-testing/** -!/docs/source/development-testing/reducing-bundle-size.mdx -!/docs/source/development-testing/schema-driven-testing.mdx - -!docs/shared -/docs/shared/** -!/docs/shared/ApiDoc -!/docs/shared/ApiDoc/** -!/docs/shared/Overrides -!/docs/shared/Overrides/** - node_modules/ +.api-reports/ .yalc/ .next/ .changeset/ +pnpm-lock.yaml +scripts/codemods/ac3-to-ac4/src/__testfixtures__ diff --git a/.prettierrc b/.prettierrc index e2511027712..8a0e9b37b39 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,5 +5,23 @@ "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", - "experimentalTernaries": true + "experimentalTernaries": true, + "plugins": [ + "./config/prettier/format-jsdoc.js", + "./config/prettier/format-mdx3.js" + ], + "overrides": [ + { + "files": ["*.ts", "*.tsx"], + "options": { + "parser": "typescript-with-jsdoc" + } + }, + { + "files": ["*.mdx"], + "options": { + "parser": "mdx3" + } + } + ] } diff --git a/.size-limit.cjs b/.size-limit.cjs index 23a23080afe..20d892f78bc 100644 --- a/.size-limit.cjs +++ b/.size-limit.cjs @@ -1,44 +1,12 @@ const limits = require("./.size-limits.json"); -/* prettier-ignore */ -const nameMapping = { - 'import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs"': 'import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (CJS)', - 'import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production)': 'import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production) (CJS)', - 'import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js"': 'import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client"', - 'import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production)': 'import { ApolloClient, InMemoryCache, HttpLink } from "@apollo/client" (production)', - 'import { ApolloProvider } from "dist/react/index.js"': 'import { ApolloProvider } from "@apollo/client/react"', - 'import { ApolloProvider } from "dist/react/index.js" (production)': 'import { ApolloProvider } from "@apollo/client/react" (production)', - 'import { useQuery } from "dist/react/index.js"': 'import { useQuery } from "@apollo/client/react"', - 'import { useQuery } from "dist/react/index.js" (production)': 'import { useQuery } from "@apollo/client/react" (production)', - 'import { useLazyQuery } from "dist/react/index.js"': 'import { useLazyQuery } from "@apollo/client/react"', - 'import { useLazyQuery } from "dist/react/index.js" (production)': 'import { useLazyQuery } from "@apollo/client/react"', - 'import { useMutation } from "dist/react/index.js"': 'import { useMutation } from "@apollo/client/react"', - 'import { useMutation } from "dist/react/index.js" (production)': 'import { useMutation } from "@apollo/client/react" (production)', - 'import { useSubscription } from "dist/react/index.js"': 'import { useSubscription } from "@apollo/client/react"', - 'import { useSubscription } from "dist/react/index.js" (production)': 'import { useSubscription } from "@apollo/client/react" (production)', - 'import { useSuspenseQuery } from "dist/react/index.js"': 'import { useSuspenseQuery } from "@apollo/client/react"', - 'import { useSuspenseQuery } from "dist/react/index.js" (production)': 'import { useSuspenseQuery } from "@apollo/client/react" (production)', - 'import { useBackgroundQuery } from "dist/react/index.js"': 'import { useBackgroundQuery } from "@apollo/client/react"', - 'import { useBackgroundQuery } from "dist/react/index.js" (production)': 'import { useBackgroundQuery } from "@apollo/client/react" (production)', - 'import { useLoadableQuery } from "dist/react/index.js"': 'import { useLoadableQuery } from "@apollo/client/react"', - 'import { useLoadableQuery } from "dist/react/index.js" (production)': 'import { useLoadableQuery } from "@apollo/client/react" (production)', - 'import { useReadQuery } from "dist/react/index.js"': 'import { useReadQuery } from "@apollo/client/react"', - 'import { useReadQuery } from "dist/react/index.js" (production)': 'import { useReadQuery } from "@apollo/client/react" (production)', - 'import { useFragment } from "dist/react/index.js"': 'import { useFragment } from "@apollo/client/react"', - 'import { useFragment } from "dist/react/index.js" (production)': 'import { useFragment } from "@apollo/client/react" (production)', -}; - const checks = [ { - path: "dist/apollo-client.min.cjs", - }, - { - path: "dist/main.cjs", - import: "{ ApolloClient, InMemoryCache, HttpLink }", + import: { "@apollo/client": "{ ApolloClient, InMemoryCache, HttpLink }" }, + conditions: ["require"], }, { - path: "dist/index.js", - import: "{ ApolloClient, InMemoryCache, HttpLink }", + import: { "@apollo/client": "{ ApolloClient, InMemoryCache, HttpLink }" }, }, ...[ "ApolloProvider", @@ -51,20 +19,19 @@ const checks = [ "useLoadableQuery", "useReadQuery", "useFragment", - ].map((name) => ({ path: "dist/react/index.js", import: `{ ${name} }` })), + ].map((name) => ({ import: { "@apollo/client/react": `{ ${name} }` } })), ] .map((config) => ({ ...config, name: config.name || config.import ? - `import ${config.import} from "${config.path}"` + `import ${Object.values(config.import)[0]} from "${ + Object.keys(config.import)[0] + }"` : config.path, - // newer versions of size-limit changed to brotli as a default - // we'll stay on gzip for now, so results are easier to compare - gzip: true, + brotli: true, ignore: [ ...(config.ignore || []), - "rehackt", "react", "react-dom", "@graphql-typed-document-node/core", @@ -73,7 +40,6 @@ const checks = [ "@wry/equality", "@wry/trie", "graphql-tag", - "hoist-non-react-statics", "optimism", "prop-types", "response-iterator", @@ -83,27 +49,34 @@ const checks = [ "zen-observable-ts", ], })) - .flatMap((value) => - value.path == "dist/apollo-client.min.cjs" ? - value - : [ - value, - { - ...value, - name: `${value.name} (production)`, - modifyEsbuildConfig(config) { - config.define = { - "globalThis.__DEV__": `false`, - }; - return config; - }, - }, - ] - ) + .flatMap((value) => [ + { + ...value, + conditions: ["development"].concat( + value.conditions || ["module", "browser"] + ), + }, + { + ...value, + name: `${value.name} (production)`, + conditions: ["production"].concat( + value.conditions || ["module", "browser"] + ), + }, + ]) .map((value) => { - value.name = nameMapping[value.name] || value.name; + const conditions = value.conditions; + delete value.conditions; + if (conditions.includes("require")) { + value.name = `${value.name} (CJS)`; + } value.limit = limits[value.name]; + value.modifyEsbuildConfig = (config) => { + config.conditions = conditions; + return config; + }; return value; }); -module.exports = checks; +// useful snippet to locally run this with `size-limit --save-bundle /tmp/size --clean-dir` to debug bundle sizes +module.exports = checks; //.filter( (limit) => limit.name === Object.keys(limits).at(-1)); diff --git a/.size-limits.json b/.size-limits.json index 36b0df40e40..e6ae6ece4d8 100644 --- a/.size-limits.json +++ b/.size-limits.json @@ -1,4 +1,6 @@ { - "dist/apollo-client.min.cjs": 42779, - "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 34818 + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 43932, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 38712, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 33629, + "import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27675 } diff --git a/.vscode/launch.json b/.vscode/launch.json index d40a6ff9315..86908f9cc8d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,13 @@ { "version": "0.2.0", "configurations": [ + { + "name": "NodeJS Attach", + "port": 9229, + "request": "attach", + "skipFiles": ["/**"], + "type": "node" + }, { "type": "node", "request": "launch", @@ -11,7 +18,7 @@ "${workspaceRoot}/node_modules/.bin/jest", "${relativeFile}", "--config", - "./config/jest.config.js", + "./config/jest.config.ts", "--runInBand", "--watch" ], diff --git a/.vscode/settings.json b/.vscode/settings.json index 604746d4cfa..e42a7d74885 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,9 +5,10 @@ "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "typescript.tsdk": "node_modules/typescript/lib", + "mdx.server.enable": true, "editor.codeActionsOnSave": { "source.organizeImports": "never" }, "cSpell.enableFiletypes": ["mdx"], - "jest.jestCommandLine": "node --expose-gc node_modules/.bin/jest --config ./config/jest.config.js --ignoreProjects 'ReactDOM 17' --runInBand" + "jest.jestCommandLine": "node --expose-gc node_modules/.bin/jest --config ./config/jest.config.ts --ignoreProjects 'ReactDOM 17' --ignoreProjects 'ReactDOM 18' --ignoreProjects 'Core Tests - RxJS min version' --runInBand" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 47252be0139..be8d1c497f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2221 @@ # @apollo/client +## 4.0.0-rc.13 + +### Major Changes + +- [#12850](https://github.com/apollographql/apollo-client/pull/12850) [`268cd80`](https://github.com/apollographql/apollo-client/commit/268cd800a2d73305c0df8dd38b6bd1cee98f0fec) Thanks [@phryneas](https://github.com/phryneas)! - Introduce a versioning policy. + +## 4.0.0-rc.12 + +### Minor Changes + +- [#12838](https://github.com/apollographql/apollo-client/pull/12838) [`b005561`](https://github.com/apollographql/apollo-client/commit/b0055613c1f4837e994d2d0756348d553e2f302f) Thanks [@phryneas](https://github.com/phryneas)! - Add an entrypoint at `@apollo/client/v4-migration` that includes removed values and types. Each export includes doc blocks on how to migrate away from the removed type. + +## 4.0.0-rc.11 + +### Major Changes + +- [#12840](https://github.com/apollographql/apollo-client/pull/12840) [`83e132a`](https://github.com/apollographql/apollo-client/commit/83e132ab1bacb3293da61dd4519379e36a1fb090) Thanks [@phryneas](https://github.com/phryneas)! - If you use an incremental delivery handler, you now have to explicitly opt into adding the chunk types to the `ApolloLink.Result` type. + + ```ts title="apollo-client.d.ts + import { Defer20220824Handler } from "@apollo/client/incremental"; + + declare module "@apollo/client" { + export interface TypeOverrides extends Defer20220824Handler.TypeOverrides {} + } + ``` + +- [#12841](https://github.com/apollographql/apollo-client/pull/12841) [`65b503f`](https://github.com/apollographql/apollo-client/commit/65b503fe4bfcf942e8f66f36f622f5f6448d6731) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `DataMasking` interface exported from `@apollo/client` and `@apollo/client/masking`. + +## 4.0.0-rc.10 + +### Major Changes + +- [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - You must now opt in to use GraphQL Codegen data masking types when using Apollo Client's data masking feature. By default, Apollo Client now uses an identity type to apply to masked/unmasked types. + + If you're using GraphQL Codegen to generate masked types, opt into the GraphQL Codegen masked types using declaration merging on the `TypeOverides` interface. + + ```ts title="apollo-client.d.ts + import { GraphQLCodegenDataMasking } from "@apollo/client/masking"; + + declare module "@apollo/client" { + export interface TypeOverrides + extends GraphQLCodegenDataMasking.TypeOverrides {} + } + ``` + +- [#12837](https://github.com/apollographql/apollo-client/pull/12837) [`7c49fdc`](https://github.com/apollographql/apollo-client/commit/7c49fdce2f40571d92c83602bbb1b5bd891f626b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The types mode for data masking has been removed. Adding a types mode to the `DataMasking` interface has no effect. Remove the `mode` key in the module where you declare the `DataMasking` type for the `@apollo/client` module. + + As a result, the `Masked` and `MaskedDocumentNode` types have also been removed since these have no effect when types are preserved. + +## 4.0.0-rc.9 + +### Minor Changes + +- [#12828](https://github.com/apollographql/apollo-client/pull/12828) [`81b03d8`](https://github.com/apollographql/apollo-client/commit/81b03d86ad7e7384124708477829bcbf63d4fa2c) Thanks [@phryneas](https://github.com/phryneas)! - `invariant.error` will now also log in production builds, not only dev builds + +### Patch Changes + +- [#12822](https://github.com/apollographql/apollo-client/pull/12822) [`103664d`](https://github.com/apollographql/apollo-client/commit/103664dc93c0a7097eaec1a5144e769eb4fb7a31) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `HttpLink.ContextOptions` and `BatchHttpLink.ContextOptions` include `ClientAwarenessLink.ContextOptions`. + +- [#12650](https://github.com/apollographql/apollo-client/pull/12650) [`2a32ac6`](https://github.com/apollographql/apollo-client/commit/2a32ac6d38de2be0be6891a969ee4f5e3bbca629) Thanks [@phryneas](https://github.com/phryneas)! - Fix a situation where a passed-in `AbortSignal` would override internal unsubscription cancellation behaviour. + +## 4.0.0-rc.8 + +### Major Changes + +- [#12825](https://github.com/apollographql/apollo-client/pull/12825) [`292b949`](https://github.com/apollographql/apollo-client/commit/292b949e9e1d10a715e0fd403737361f91432fbf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `serializeFetchParameter` helper is no longer exported and `JSON.stringify` is used directly. As such, the `ClientParseError` type has also been removed in favor of throwing any JSON serialize errors directly. + +- [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure the `error` argument for the `delay` and `attempts` functions on `RetryLink` are an `ErrorLike`. + +- [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move all 1st party link types into a namespace. + +- [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `OperationBatcher` class is no longer exported from `@apollo/client/link/batch`. It is an implementation detail of `BatchLink` and should not be relied on directly. + +### Patch Changes + +- [#12824](https://github.com/apollographql/apollo-client/pull/12824) [`0506f12`](https://github.com/apollographql/apollo-client/commit/0506f12936d3fe7c840e5d56a5efa20bbce1525e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `RetryLink` now emits a `next` event instead of an `error` event when encountering a protocol errors for multipart subscriptions when the operation is not retried. This ensures the observable notification remains the same as when `RetryLink` is not used. + +- [#12819](https://github.com/apollographql/apollo-client/pull/12819) [`7ff548d`](https://github.com/apollographql/apollo-client/commit/7ff548dab0f38bfe315fce6cc51105c93d112271) Thanks [@jerelmiller](https://github.com/jerelmiller)! - update type of `HttpLink.Options.fetchOptions` to `RequestInit` + +- [#12820](https://github.com/apollographql/apollo-client/pull/12820) [`fba3d9e`](https://github.com/apollographql/apollo-client/commit/fba3d9ec96cce9f1a89908e4f33361e27d1f52b4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `fetchOptions` option provided to `HttpLink` and `BatchHttpLink` is now `RequestInit` instead of `any`. The `credentials` option is now a `RequestCredentials` type instead of a `string`. + +- [#12823](https://github.com/apollographql/apollo-client/pull/12823) [`19e315e`](https://github.com/apollographql/apollo-client/commit/19e315e316ae458913f4d11961b0a2a365df0a19) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix the type of the argument for the `sha256` function for `PersistedQueryLink` from `...any[]` to `string`. + +- [#12821](https://github.com/apollographql/apollo-client/pull/12821) [`223a409`](https://github.com/apollographql/apollo-client/commit/223a4094f401bbe7fd3e4c249fa405843b63ba2e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a deprecation warning to `WebSocketLink`. + +## 4.0.0-rc.7 + +### Major Changes + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.getContext` now returns a `Readonly` type. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ApolloLink.Request` (i.e. `GraphQLRequest`) passed to `ApolloLink.execute` no longer accepts `operationName` and `operationType` options. These properties are derived from the `query` and set on the returned `ApolloLink.Operation` type. + +- [#12808](https://github.com/apollographql/apollo-client/pull/12808) [`8e31a23`](https://github.com/apollographql/apollo-client/commit/8e31a2303b18f6fc4d8ec1cf4c01bf26b90f3f0b) Thanks [@phryneas](https://github.com/phryneas)! - HTTP Multipart handling will now throw an error if the connection closed before the final boundary has been received. + Data after the final boundary will be ignored. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationType` is now a non-null `OperationTypeNode`. It is now safe to compare this value without having to check for `undefined`. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `operation.operationName` is now set as `string | undefined` where `undefined` represents an anonymous query. Previously `operationName` would return an empty string as the `operationName` for anonymous queries. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `concat`, `from`, and `split` functions on `ApollLink` no longer support a plain request handler function. Please wrap the request handler with `new ApolloLink`. + + ```diff + const link = new ApolloLink(/* ... */); + + link.concat( + - (operation, forward) => forward(operation), + + new ApolloLink((operation, forward) => forward(operation)), + ); + ``` + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `transformOperation` and `validateOperation` have been removed and are no longer exported from `@apollo/client/link/utils`. These utilities have been merged into the implementation of `createOperation`. As a result, `createOperation` now returns a well-formed `Operation` object. Previously `createOperation` relied on an external call to `transformOperation` to provide a well-formed `Operation` type. If you use `createOperation` directly, remove the calls to `transformOperation` and `validateOperation` and pass the request directly. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The request handler provided to `ApolloLink` must now return an `Observable`. `null` is no longer supported as a valid return value. If you rely on `null` so that `ApolloLink` provides an empty observable, use the `EMPTY` observable from RxJS instead: + + ```diff + import { ApolloLink } from "@apollo/client"; + + import { EMPTY } from "rxjs"; + + const link = new ApolloLink((operation, forward) => { + - return null; + + return EMPTY; + }); + ``` + + If you have a custom link that overrides the `request` method, remove `null` from the return signature: + + ```diff + class MyCustomLink extends ApolloLink { + request( + operation: ApolloLink.Operation, + forward: ApolloLink.ForwardFunction, + - ): Observable | null { + + ): Observable { + // implementation + } + } + ``` + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `createOperation` no longer accepts `context` as the first argument. Instead make sure `context` is set as the `context` property on the request passed to `createOperation`. + + ```diff + createOperation( + - startingContext, + - { query }, + + { query, context: startingContext }, + { client } + ); + ``` + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TVariables` generic argument on the `GraphQLRequest` type. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The context object returned from `operation.getContext()` is now frozen to prevent mutable changes to the object which could result in subtle bugs. This applies to the `previousContext` object passed to the `operation.setContext()` callback as well. + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `forward` function passed to the request handler is now always provided to `request` and no longer optional. If you create custom links by subclassing `ApolloLink`, the `forward` function no longer needs to be optional: + + ```ts + class CustomLink extends ApolloLink { + request( + operation: ApolloLink.Operation, + // This no longer needs to be typed as optional + forward: ApolloLink.ForwardFunction + ) { + // ... + } + } + ``` + + As a result of this change, `ApolloLink` no longer detects terminating links by checking function arity on the request handler. This means using methods such as `concat` on a terminating link no longer emit a warning. On the flip side, if the terminating link calls the `forward` function, a warning is emitted and an observable that immediately completes is returned which will result in an error from Apollo Client. + +### Minor Changes + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink`'s `concat` method now accepts multiple links to concatenate together. + + ```ts + const first = new ApolloLink(); + + const link = first.concat(second, third, fouth); + ``` + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Many of the types exported from `@apollo/client/link` now live on the `ApolloLink` namespace. The old types are now deprecated in favor of the namespaced types. + + - `FetchResult` -> `ApolloLink.Result` + - `GraphQLRequest` -> `ApolloLink.Request` + - `NextLink` -> `ApolloLink.ForwardFunction` + - `Operation` -> `ApolloLink.Operation` + - `RequestHandler` -> `ApolloLink.RequestHandler` + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The static `ApolloLink.concat` method is now deprecated in favor of `ApolloLink.from`. `ApolloLink.concat` is now an alias for `ApolloLink.from` so prefer `ApolloLink.from` instead. + +### Patch Changes + +- [#12809](https://github.com/apollographql/apollo-client/pull/12809) [`e2a0be8`](https://github.com/apollographql/apollo-client/commit/e2a0be8c3f8b242706f90e0dcc022628992a8ae8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The individual `empty`, `concat`, `from` and `split` functions exported from `@apollo/client/link` are now deprecated in favor of using the static functions instead. + + ```diff + import { + ApolloLink, + - concat, + - empty, + - from, + - split, + } from "@apollo/client/link"; + + - concat(first, second); + + ApolloLink.concat(first, second); + + - empty(); + + ApolloLink.empty(); + + - from([first, second]); + + ApolloLink.from([first, second]); + + - split( + + ApolloLink.split( + (operation) => /* */, + first, + second + ); + ``` + +## 4.0.0-rc.6 + +### Major Changes + +- [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Remove `DataProxy` namespace and interface. + +- [#12788](https://github.com/apollographql/apollo-client/pull/12788) [`4179446`](https://github.com/apollographql/apollo-client/commit/417944677d2e79606b0f6cabd8d5d8b2063c876b) Thanks [@phryneas](https://github.com/phryneas)! - `TVariables` now always `extends OperationVariables` in all interfaces. + +- [#12802](https://github.com/apollographql/apollo-client/pull/12802) [`e2b51b3`](https://github.com/apollographql/apollo-client/commit/e2b51b30acbd360253100f9d2a91fe7e0c57be4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Disallow the `mutation` option for the `mutate` function returned from `useMutation`. + +- [#12787](https://github.com/apollographql/apollo-client/pull/12787) [`8ce31fa`](https://github.com/apollographql/apollo-client/commit/8ce31fae54b1ae76c557f361cc946858cb2ff66b) Thanks [@phryneas](https://github.com/phryneas)! - Generic arguments for `Cache.ReadOptions` were flipped from `TVariables, TData` to `TData, TVariables`. + +- [#12793](https://github.com/apollographql/apollo-client/pull/12793) [`24e98a1`](https://github.com/apollographql/apollo-client/commit/24e98a16648d4c21f37ba51a678a8849f88174ea) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloConsumer` has been removed - please use `useApolloClient` instead. + +### Patch Changes + +- [#12782](https://github.com/apollographql/apollo-client/pull/12782) [`742b3a0`](https://github.com/apollographql/apollo-client/commit/742b3a0ed65d28818974e56225c86ab7e350e677) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `ApolloClient`, `ObservableQuery`, and `ApolloCache.watchFragment` method options and result types into namespaces. The old types are now exported as deprecated. + +## 4.0.0-rc.5 + +### Major Changes + +- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Report masked fragments as complete even when a nested masked fragment contains partial data. + +- [#12774](https://github.com/apollographql/apollo-client/pull/12774) [`511b4f3`](https://github.com/apollographql/apollo-client/commit/511b4f3e792a75aa5aa27b335e8119dbc2a9c254) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apply document transforms before reading data from the cache for `client.readQuery`, `client.readFragment`, `client.watchFragment`, `useFragment`, and `useSuspenseFragment`. + + NOTE: This change does not affect the equivalent `cache.*` APIs. To read data from the cache without first running document transforms, run `cache.readQuery`, `cache.readFragment`, etc. + +### Minor Changes + +- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `dataState` to the value emitted from `client.watchFragment`. + +### Patch Changes + +- [#12776](https://github.com/apollographql/apollo-client/pull/12776) [`bce9b74`](https://github.com/apollographql/apollo-client/commit/bce9b7448a226b109cbe8f14911503fb09f37825) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache.watchFragment` now returns an `Unmasked` result since `cache.watchFragment` does not mask fragment spreads. + +- [#12370](https://github.com/apollographql/apollo-client/pull/12370) [`0517163`](https://github.com/apollographql/apollo-client/commit/05171634404a44231329bf63eee960db52d08b25) Thanks [@phryneas](https://github.com/phryneas)! - `InMemoryCache`: Fields with an empty argument object are now saved the same way as fields without arguments. + + Previously, it was possible that the reponses for these two queries would be stored differently in the cache: + + ```gql + query PlainAccess { + myField + } + ``` + + would be stored as `myField` + and + + ```gql + query AccessWithoutOptionalArgument($optional: String) { + myField(optional: $optional) + } + ``` + + would be stored as `myField({"optional":"Foo"})` if called with `{optional: "Foo"}` and as `myField({})` if called without the optional argument. + + The cases `myField` and `myField({})` are equivalent from the perspective of a GraphQL server, and so in the future both of these will be stored as `myField` in the cache. + +- [#12775](https://github.com/apollographql/apollo-client/pull/12775) [`454ec78`](https://github.com/apollographql/apollo-client/commit/454ec78b751853da07243174a6f9bdc4535e7e8f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't export `gql` from `@apollo/client/react` entrypoint. Import from `@apollo/client` instead. + +- [#12761](https://github.com/apollographql/apollo-client/pull/12761) [`db6f7c3`](https://github.com/apollographql/apollo-client/commit/db6f7c3823aaf58ee403ef45f0e817241b1c56a2) Thanks [@phryneas](https://github.com/phryneas)! - Deprecate second argument to `readFragment` and `readQuery` - `optimistic` should be passed as part of the object in the first argument instead. + +## 4.0.0-rc.4 + +### Minor Changes + +- [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add `dataState` and overridable `DataValue` types to `useFragment` + +- [#12757](https://github.com/apollographql/apollo-client/pull/12757) [`5fd2e7c`](https://github.com/apollographql/apollo-client/commit/5fd2e7c15eecc6469ecf5f4fb116633b056ad103) Thanks [@phryneas](https://github.com/phryneas)! - Add overridable `DataValue` types to `useSuspenseFragment` + +## 4.0.0-rc.3 + +### Major Changes + +- [#12731](https://github.com/apollographql/apollo-client/pull/12731) [`0198870`](https://github.com/apollographql/apollo-client/commit/0198870107eab7ad0bc69a549cb069fa41b3280f) Thanks [@phryneas](https://github.com/phryneas)! - Ship React Compiler compiled React hooks in `@apollo/client/react/compiled`. + + We now ship a React-Compiler compiled version of the React hooks in + `@apollo/client/react/compiled`. + + This entry point contains everything that `@apollo/client/react` does, + so you can use it as a drop-in replacement in your whole application + if you choose to use the compiled hooks. + +### Minor Changes + +- [#12753](https://github.com/apollographql/apollo-client/pull/12753) [`b85818d`](https://github.com/apollographql/apollo-client/commit/b85818dcc66d3ed8b1c3a7e5e37b2875d6bf9d03) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Renamed `client.reFetchObservableQueries` to `client.refetchObservableQueries`. + `client.reFetchObservableQueries` is still available as an alias, but is now + deprecated and will be removed in a future major version. + +## 4.0.0-rc.2 + +### Major Changes + +- [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The new `SetContextLink` flips the `prevContext` and `operation` arguments in the callback. The `setContext` function has remained unchanged. + + ```diff + - new SetContextLink((operation, prevContext) => { + + new SetContextLink((prevContext, operation) => { + // ... + }) + ``` + +- [#12742](https://github.com/apollographql/apollo-client/pull/12742) [`575bf3e`](https://github.com/apollographql/apollo-client/commit/575bf3ed5885efb09c1eec497af4d2690c6b87d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `operation` argument to the callback passed to `SetContextLink` is now of type `SetContextLink.SetContextOperation` which is an `Operation` without the `getContext` or `setContext` functions. Previously the type of `operation` was `GraphQLRequest` which had access to a `context` property. The `context` property was always `undefined` and could result in bugs when using it instead of the `prevContext` argument. + + This change means the `operation` argument now contains an accessible `client` property. + +### Minor Changes + +- [#12740](https://github.com/apollographql/apollo-client/pull/12740) [`1c6e03c`](https://github.com/apollographql/apollo-client/commit/1c6e03c9c74a9fad2a1c2e1c3ae61a9560038238) Thanks [@phryneas](https://github.com/phryneas)! - Overridable types for `dataState: "complete"`, `dataState: "streaming"` and + `dataState: "partial"` responses. + + This adds the `DataValue` namespace exported from Apollo Client with the three + types `DataValue.Complete`, `DataValue.Streaming` and `DataValue.Partial`. + + These types will be used to mark `TData` in the respective states. + + - `Complete` defaults to `TData` + - `Streaming` defaults to `TData` + - `Partial` defaults to `DeepPartial` + + All three can be overwritten, e.g. to be `DeepReadonly` using higher kinded types + by following this pattern: + + ```ts + import { HKT, DeepPartial } from "@apollo/client/utilities"; + import { DeepReadonly } from "some-type-helper-library"; + + interface CompleteOverride extends HKT { + return: DeepReadonly; + } + + interface StreamingOverride extends HKT { + return: DeepReadonly; + } + + interface PartialOverride extends HKT { + return: DeepReadonly>; + } + + declare module "@apollo/client" { + export interface TypeOverrides { + Complete: CompleteOverride; + Streaming: StreamingOverride; + Partial: PartialOverride; + } + } + ``` + +### Patch Changes + +- [#12748](https://github.com/apollographql/apollo-client/pull/12748) [`e1ca85e`](https://github.com/apollographql/apollo-client/commit/e1ca85eab181d8e16d945e849dfb13352902f197) Thanks [@phryneas](https://github.com/phryneas)! - Fix a bug where the new `operationType` property wasn't passed into `operation`. + +- [#12739](https://github.com/apollographql/apollo-client/pull/12739) [`b184754`](https://github.com/apollographql/apollo-client/commit/b184754d08810df9a7838615990e90a960966037) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `error` argument on the `onError` option for `subscribeToMore` to `ErrorLike`. + +## 4.0.0-rc.1 + +### Major Changes + +- [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `resultCacheMaxSize` option from `InMemoryCache` options. + +- [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `connectToDevtools` option from `ApolloClientOptions`. Use `devtools.enabled` instead. + +### Minor Changes + +- [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add `operationType` to `operation` in `ApolloLink`. This means that determining whether a `query` is a specific operation type can now be compared with this property instead of using `getMainDefinition`. + + ```diff + - import { getMainDefinition } from "@apollo/client/utilities"; + + import { OperationTypeNode } from "graphql"; + + ApolloLink.split( + - ({ query }) => { + - const definition = getMainDefinition(query); + - return ( + - definition.kind === 'OperationDefinition' && + - definition.operation === 'subscription' + - ); + - return + - }, + + ({ operationType }) => { + + return operationType === OperationTypeNode.SUBSCRIPTION; + + }, + conditionTrueLink, + conditionFalseLink, + ); + ``` + +### Patch Changes + +- [#12728](https://github.com/apollographql/apollo-client/pull/12728) [`07a0c8c`](https://github.com/apollographql/apollo-client/commit/07a0c8c52774793b254ecc91e5d4632bfdf48093) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export the `IgnoreModifier` type from `@apollo/client/cache`. + +- [#12735](https://github.com/apollographql/apollo-client/pull/12735) [`5159880`](https://github.com/apollographql/apollo-client/commit/51598808851e16af722baaefbd1f90534332e07a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the `unsafePreviousData` argument on `UpdateQueryMapFn` and `SubscribeToMoreQueryFn` to a `DeepPartial` since the result may contain partial data. + +- [#12734](https://github.com/apollographql/apollo-client/pull/12734) [`037979d`](https://github.com/apollographql/apollo-client/commit/037979dc47ffb7125429707471d901a08db49283) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't warn about a missing resolver if a `@client` does not have a configured resolver. It is possible the cache contains a `read` function for the field and the warning added confusion. + + Note that `read` functions without a defined resolver will receive the `existing` argument as `null` instead of `undefined` even when data hasn't been written to the cache. This is because `LocalState` sets a default value of `null` when a resolver is not defined to ensure that the field contains a value in case a `read` function is not defined rather than omitting the field entirely. + +- [#12725](https://github.com/apollographql/apollo-client/pull/12725) [`89ac725`](https://github.com/apollographql/apollo-client/commit/89ac7256a34b3b04fe2cf83937b5494b375ce36d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `getMainDefinition` from `@apollo/client/utilities`. + +- [#12729](https://github.com/apollographql/apollo-client/pull/12729) [`699c830`](https://github.com/apollographql/apollo-client/commit/699c8305639ff69bab36fd2214defbe1ac6f0b18) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useQuery` rerenders when `notifyOnNetworkStatusChange` is `false` and a `refetch` that changes variables returns a result deeply equal to previous variables. + +## 4.0.0-rc.0 + +### Major Changes + +- [#12718](https://github.com/apollographql/apollo-client/pull/12718) [`ecfc02a`](https://github.com/apollographql/apollo-client/commit/ecfc02a37908b58d1f799f0e817cdeab98482720) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only to release latest as `rc`. + +## 4.0.0-alpha.23 + +### Major Changes + +- [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An error is now thrown when trying to call `fetchMore` on a `cache-only` query. + +- [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are no longer refetched when calling `client.reFetchObservableQueries` when `includeStandby` is `true`. + +- [#12705](https://github.com/apollographql/apollo-client/pull/12705) [`a60f411`](https://github.com/apollographql/apollo-client/commit/a60f411e58cc67730d0dc4513e4045f004027ded) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries will now initialize with `loading: false` and `networkStatus: NetworkStatus.ready` when there is no data in the cache. + + This means `useQuery` will no longer render a short initial loading state before rendering `loading: false` and `ObservableQuery.getCurrentResult()` will now return `loading: false` immediately. + +- [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries are now excluded from `client.refetchQueries` in all situations. `cache-only` queries affected by `updateCache` are also excluded from `refetchQueries` when `onQueryUpdated` is not provided. + +- [#12681](https://github.com/apollographql/apollo-client/pull/12681) [`b181f98`](https://github.com/apollographql/apollo-client/commit/b181f98476e635ba3eccab170c09d91f5408060c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changing most options when rerendering `useQuery` will no longer trigger a `reobserve` which may cause network fetches. Instead, the changed options will be applied to the next cache update or fetch. + + Options that now trigger a `reobserve` when changed between renders are: + + - `query` + - `variables` + - `skip` + - Changing `fetchPolicy` to or from `standby` + +- [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Rework option handling for `fetchMore`. + + - Previously, if the `query` option was specified, no options would be inherited + from the underlying `ObservableQuery`. + Now, even if `query` is specified, all unspecified options except for `variables` will be inherited from the underlying `ObservableQuery`. + - If `query` is not specified, `variables` will still be shallowly merged with the `variables` of the underlying `ObservableQuery`. If a `query` option is specified, the `variables` passed to `fetchMore` are used instead. + - `errorPolicy` of `fetchMore` will now always default to `"none"` instead of inherited from the `ObservableQuery` options. This can prevent accidental cache writes of partial data for a paginated query. To opt into receive partial data that may be written to the cache, pass an `errorPolicy` to `fetchMore` to override the default. + +- [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `Streaming` type that will mark `data` in results while `dataStatus` + is `"streaming"`. + + `Streaming` defaults to `TData`, but can be overwritten in userland to + integrate with different codegen dialects. + + You can override this type globally - this example shows how to override it + with `DeepPartial`: + + ```ts + import { HKT, DeepPartial } from "@apollo/client/utilities"; + + type StreamingOverride = DeepPartial; + + interface StreamingOverrideHKT extends HKT { + return: StreamingOverride; + } + + declare module "@apollo/client" { + export interface TypeOverrides { + Streaming: StreamingOverrideHKT; + } + } + ``` + +- [#12499](https://github.com/apollographql/apollo-client/pull/12499) [`ce35ea2`](https://github.com/apollographql/apollo-client/commit/ce35ea2b3a87d6dd6757e9be50ecc42837bebe56) Thanks [@phryneas](https://github.com/phryneas)! - Enable React compiler for hooks in ESM builds. + +- [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `ErrorResponse` object passed to the `disable` and `retry` callback options provided to `createPersistedQueryLink` no longer provides separate `graphQLErrors` and `networkError` properties and instead have been combined to a single `error` property of type `ErrorLike`. + + ```diff + // The following also applies to the `retry` function since it has the same signature + createPersistedQueryLink({ + - disable: ({ graphQLErrors, networkError }) => { + + disable: ({ error }) => { + - if (graphQLErrors) { + + if (CombinedGraphQLErrors.is(error)) { + // ... handle GraphQL errors + } + + - if (networkError) { + + if (error) { + // ... handle link errors + } + + // optionally check for a specific kind of error + - if (networkError) { + + if (ServerError.is(error)) { + // ... handle a server error + } + }); + ``` + + The `response` property has also been renamed to `result`. + + ```diff + createPersistedQueryLink({ + - disable: ({ response }) => { + + disable: ({ result }) => { + // ... handle GraphQL errors + } + } + }); + ``` + +- [#12712](https://github.com/apollographql/apollo-client/pull/12712) [`bbb2b61`](https://github.com/apollographql/apollo-client/commit/bbb2b61d259da54560a79813b130a977dae10523) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `cache-only` queries no longer poll when a `pollInterval` is set. Instead a warning is now emitted that polling has no effect. If the `fetchPolicy` is changed to `cache-only` after polling is already active, polling is stopped. + +- [#12704](https://github.com/apollographql/apollo-client/pull/12704) [`45dba43`](https://github.com/apollographql/apollo-client/commit/45dba43b6ba0c306aad8cfbcfd4029265f5e9106) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `response` property in `onError` link has been renamed to `result`. + + ```diff + - onError(({ response }) => { + + onError(({ result }) => { + // ... + }); + ``` + +- [#12715](https://github.com/apollographql/apollo-client/pull/12715) [`0be0b3f`](https://github.com/apollographql/apollo-client/commit/0be0b3f54a1b533c95c69d3698c5c3bdbd6279fe) Thanks [@phryneas](https://github.com/phryneas)! - All links are now available as classes. The old creator functions have been deprecated. + + Please migrate these function calls to class creations: + + ```diff + import { + - setContext + + SetContextLink + } from "@apollo/client/link/context" + + -const link = setContext(...) + +const link = new SetContextLink(...) + ``` + + ```diff + import { + - createHttpLink + + HttpLink + } from "@apollo/client/link/http" + + -const link = createHttpLink(...) + +const link = new HttpLink(...) + ``` + + ```diff + import { + - createPersistedQueryLink + + PersistedQueryLink + } from "@apollo/client/link/persisted-queries" + + -const link = createPersistedQueryLink(...) + +const link = new PersistedQueryLink(...) + ``` + + ```diff + import { + - removeTypenameFromVariables + + RemoveTypenameFromVariablesLink + } from "@apollo/client/link/remove-typename" + + -const link = removeTypenameFromVariables(...) + +const link = new RemoveTypenameFromVariablesLink(...) + ``` + +### Minor Changes + +- [#12711](https://github.com/apollographql/apollo-client/pull/12711) [`f730f83`](https://github.com/apollographql/apollo-client/commit/f730f83346d4e3c20116da6f55fdd1381114416c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add an `extensions` property to `CombinedGraphQLErrors` to capture any extensions from the original response. + +- [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The callback function that can be passed to the `ApolloClient.mutate` + `refetchQueries` option will now receive a `FormattedExecutionResult` with an + additional `dataState` option that describes if the result is `"streaming"` + or `"complete"`. + This indicates whether the `data` value is of type + + - `Unmasked` (if `"complete"`) + - `Streaming>` (if `"streaming"`) + +- [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - Allow passing `errorPolicy` option to `fetchMore` and change default value to "none". + +- [#12714](https://github.com/apollographql/apollo-client/pull/12714) [`0e39469`](https://github.com/apollographql/apollo-client/commit/0e394692eaf0f8d8e506d8304935deafa952accf) Thanks [@phryneas](https://github.com/phryneas)! - The `FetchMoreQueryOptions` type has been inlined into `FetchMoreOptions`, and + `FetchMoreQueryOptions` has been removed. + +- [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - Prioritize usage of `FormattedExecutionResult` over `FetchResult` where applicable. + + Many APIs used `FetchResult` in place of `FormattedExecutionResult`, which could + cause inconsistencies. + + - `FetchResult` is now used to refer to an unhandled "raw" result as returned from + a link. + This can also include incremental results that use a different format. + - `FormattedExecutionResult` from the `graphql` package is now used to represent + the execution of a standard GraphQL request without incremental results. + + If your custom links access the `data` property, you might need to first check if + the result is a standard GraphQL result by using the `isFormattedExecutionResult` + helper from `@apollo/client/utilities`. + +- [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The `mutationResult` option passed to the `updateQueries` callback now has an + additional property, `dataState` with possible values of `"complete"` and `"streaming"`. + This indicates whether the `data` value is of type + - `Unmasked` (if `"complete"`) + - `Streaming>` (if `"streaming"`) + +### Patch Changes + +- [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Remove these incremental-format-specific types: + + - `ExecutionPatchIncrementalResult` + - `ExecutionPatchInitialResult` + - `ExecutionPatchResult` + - `IncrementalPayload` + - `Path` + +- [#12677](https://github.com/apollographql/apollo-client/pull/12677) [`94e58ed`](https://github.com/apollographql/apollo-client/commit/94e58ed75fc547ff037d9efeeba929fd61b20c4c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Downgrade minimum supported `rxjs` peer dependency version to 7.3.0. + +- [#12709](https://github.com/apollographql/apollo-client/pull/12709) [`9d42e2a`](https://github.com/apollographql/apollo-client/commit/9d42e2a08d3ddfdfdfc7ac65bd66985da5642e7d) Thanks [@phryneas](https://github.com/phryneas)! - Slightly rework multipart response parsing. + + This removes last incremental-protocol-specific details from `HttpLink` and `BatchHttpLink`. + +- [#12700](https://github.com/apollographql/apollo-client/pull/12700) [`8e96e08`](https://github.com/apollographql/apollo-client/commit/8e96e0862c306df17c09c232704041196a72a466) Thanks [@phryneas](https://github.com/phryneas)! - The incremental delivery (`@defer` support) implementation is now pluggable. + + `ApolloClient` now per default ships without an incremental format implementation + and allows you to swap in the format that you want to use. + + Usage looks like this: + + ```ts + import { + // this is the default + NotImplementedHandler, + // this implements the `@defer` transport format that ships with Apollo Router + Defer20220824Handler, + // this implements the `@defer` transport format that ships with GraphQL 17.0.0-alpha.2 + GraphQL17Alpha2Handler, + } from "@apollo/client/incremental"; + + const client = new ApolloClient({ + cache: new InMemoryCache({ + /*...*/ + }), + link: new HttpLink({ + /*...*/ + }), + incrementalHandler: new Defer20220824Handler(), + }); + ``` + + We will add handlers for other response formats that can be swapped this way + during the lifetime of Apollo Client 4.0. + +## 4.0.0-alpha.22 + +### Major Changes + +- [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `includeExtensions` option of `HttpLink` and `BatchHttpLink` now defaults + to `true`. + + If `includeExtensions` is `true`, but `extensions` is not set or empty, extensions + will not be included in outgoing requests. + +- [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - The `ApolloClient` constructor options `name` and `version` that are used to + configure the client awareness feature have moved onto a `clientAwareness` key. + + ```diff + const client = new ApolloClient({ + // .. + - name: "my-app", + - version: "1.0.0", + + clientAwareness: { + + name: "my-app", + + version: "1.0.0", + + }, + }); + ``` + +- [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing any other field to `__typename` is now forbidden. + +- [#12690](https://github.com/apollographql/apollo-client/pull/12690) [`5812759`](https://github.com/apollographql/apollo-client/commit/5812759b6659df49277635e89492c0d72c3b57d6) Thanks [@phryneas](https://github.com/phryneas)! - Aliasing a field to an alias beginning with `__ac_` is now forbidden - this namespace is now reserved for internal use. + +- [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Adds enhanced client awareness to the client. + + `HttpLink` and `BatchHttpLink` will now per default send information about the + client library you are using in `extensions`. + + This could look like this: + + ```json + { + "query": "query GetUser($id: ID!) { user(id: $id) { __typename id name } }", + "variables": { + "id": 5 + }, + "extensions": { + "clientLibrary": { + "name": "@apollo/client", + "version": "4.0.0" + } + } + } + ``` + + This feature can be disabled by passing `enhancedClientAwareness: { transport: false }` to your + `ApolloClient`, `HttpLink` or `BatchHttpLink` constructor options. + +### Minor Changes + +- [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adjusted the accept header for multipart requests according to the new GraphQL over HTTP spec with these changes: + + ```diff + -multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json + +multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/graphql-response+json,application/json;q=0.9 + ``` + + ```diff + -multipart/mixed;deferSpec=20220824,application/json + +multipart/mixed;deferSpec=20220824,application/graphql-response+json,application/json;q=0.9 + ``` + +- [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Add the new `ClientAwarenessLink`. + + This link is already included in `HttpLink` and `BatchHttpLink` to enable the + "client awareness" and "enhanced client awareness" features, but you can also use + `ClientAwarenessLink` directly in your link chain to combine it with other + terminating links. + + If you want to save the bundle size that `ClientAwarenessLink` adds to `HttpLink` + and `BatchHttpLink`, you can use `BaseHttpLink` or `BaseBatchHttpLink` instead. + These links come without the `ClientAwarenessLink` included. + + For example: + + ```diff + import { + ApolloClient, + - HttpLink, + } from "@apollo/client"; + +import { BaseHttpLink } from "@apollo/client/link/http"; + + const client = new ApolloClient({ + - link: new HttpLink({ + + link: new BaseHttpLink({ + uri, + }), + cache: new InMemoryCache(), + }); + ``` + +- [#12698](https://github.com/apollographql/apollo-client/pull/12698) [`be77d1a`](https://github.com/apollographql/apollo-client/commit/be77d1a6ddf719cab4780a0679fcd98556ac7f22) Thanks [@phryneas](https://github.com/phryneas)! - Adds an `accept` option to `HttpOptions` that allows to add additional `Accept` headers to be merged in without overriding user-specified or default accept headers. + +### Patch Changes + +- [#12673](https://github.com/apollographql/apollo-client/pull/12673) [`cee90ab`](https://github.com/apollographql/apollo-client/commit/cee90abcd2a9c91c5fdf872cf2d1c12deaa6593e) Thanks [@phryneas](https://github.com/phryneas)! - Fixed a bug in `PersistedQueryLink` where the `persistedQuery` extension would still be sent after a `PersistedQueryNotSupported` if `includeExtensions` was enabled on `HttpLink`. + +## 4.0.0-alpha.21 + +### Major Changes + +- [#12686](https://github.com/apollographql/apollo-client/pull/12686) [`dc4b1d0`](https://github.com/apollographql/apollo-client/commit/dc4b1d0d2479a37067113b7bd161a550fb8e4df6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - A `@defer` query that has not yet finished streaming is now considered loading and thus the `loading` flag will be `true` until the response has completed. A new `NetworkStatus.streaming` value has been introduced and will be set as the `networkStatus` while the response is streaming. + +- [#12685](https://github.com/apollographql/apollo-client/pull/12685) [`3b74800`](https://github.com/apollographql/apollo-client/commit/3b748003df89ec69a6ad045fb47bbe9c3e62104c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the check and warning for `cache.fragmentMatches` when applying data masking. `cache.fragmentMatches` is a required API and data masking may crash when `cache.fragmentMatches` does not exist. + +- [#12684](https://github.com/apollographql/apollo-client/pull/12684) [`e697431`](https://github.com/apollographql/apollo-client/commit/e697431a9995fd1900e625c30a9065edd71111d9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `context` from `useLazyQuery` hook options. If used, `context` must now be provided to the `execute` function. `context` will reset to `{}` if not provided as an option to `execute`. + +## 4.0.0-alpha.20 + +### Major Changes + +- [#12675](https://github.com/apollographql/apollo-client/pull/12675) [`8f1d974`](https://github.com/apollographql/apollo-client/commit/8f1d974881ff54339b6b6593a219ba6d5fd013c0) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` no longer has a `queryId` property. + `ApolloClient.getObservableQueries` no longer returns a `Map`, but a `Set`. + +- [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery`s will now only be registered with the `ApolloClient` while they + have subscribers. + + That means that `ApolloClient.getObservableQueries` and `ApolloClient.refetchQueries` + will only be able to return/refetch queries that have at least one subscriber. + + This changes the previous meaning of `active` and `inactive` queries: + + - `inactive` queries are queries with a subscriber that are skipped from a + React hook or have a `fetchPolicy` of `standby` + - `active` queries are queries with at least one subscriber that are not skipped or in `standby`. + + `ObservableQuery`s without subscribers but with an active ongoing network request + (e.g. caused by calling `reobserve`) will be handled as if they had a subscriber + for the duration of the query. + +- [#12678](https://github.com/apollographql/apollo-client/pull/12678) [`91a876b`](https://github.com/apollographql/apollo-client/commit/91a876b059042828e431931e7a3c2e0365c387b8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `queryRef`s created by `preloadQuery` no longer have a `.toPromise()` function. Instead `preloadQuery` now has a `toPromise` function that accepts a queryRef and will resolve when the underlying promise has been resolved. + + ```diff + const queryRef = preloadQuery(query, options); + + - await queryRef.toPromise(); + + await preloadQuery.toPromise(queryRef); + ``` + +- [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - `ApolloClient.stop()` now cleans up more agressively to prevent memory leaks: + + - It will now unsubscribe all active `ObservableQuery` instances by emitting a `completed` event. + - It will now reject all currently running queries with `"QueryManager stopped while query was in flight"`. + - It will remove all queryRefs from the suspense cache. + +### Minor Changes + +- [#12647](https://github.com/apollographql/apollo-client/pull/12647) [`a70fac6`](https://github.com/apollographql/apollo-client/commit/a70fac6dd8f26b46c813723a7206e55bfb677690) Thanks [@phryneas](https://github.com/phryneas)! - Added a new `.stop` function on `ObservableQuery`. + Calling this method will unsubscribe all current subscribers by sending a `complete` event from the observable and tear down the `ObservableQuery`. + +## 4.0.0-alpha.19 + +### Major Changes + +- [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unsubscribing from an `ObservableQuery` before a value has been emitted will remove the query from the tracked list of queries and will no longer be eligible for query deduplication. + +### Minor Changes + +- [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions created by `client.subscribe()` can now be restarted. Restarting a subscription will terminate the connection with the link chain and recreate the request. Restarts also work across deduplicated subscriptions so calling `restart` on an `observable` who's request is deduplicated will restart the connection for each observable. + + ```ts + const observable = client.subscribe({ query: subscription }); + + // Restart the connection to the link + observable.restart(); + ``` + +- [#12663](https://github.com/apollographql/apollo-client/pull/12663) [`01512f2`](https://github.com/apollographql/apollo-client/commit/01512f2429dd394fb72b8ba9284047a09ade666f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deduplicating subscription operations is now supported. Previously it was possible to deduplicate a subscription only if the new subscription was created before a previously subscribed subscription emitted any values. As soon as a value was emitted from a subscription, new subscriptions would create new connections. Deduplication is now active for as long as a subscription connection is open (i.e. the source observable hasn't emitted a `complete` or `error` notification yet.) + + To disable deduplication and force a new connection, use the `queryDeduplication` option in `context` like you would a query operation. + + As a result of this change, calling the `restart` function returned from `useSubscription` will now restart the connection on deduplicated subscriptions. + +## 4.0.0-alpha.18 + +### Minor Changes + +- [#12670](https://github.com/apollographql/apollo-client/pull/12670) [`0a880ea`](https://github.com/apollographql/apollo-client/commit/0a880ea4c2360a985fdd2edadb94fcc4b82bad73) Thanks [@phryneas](https://github.com/phryneas)! - Provide a mechanism to override the DataMasking types. + + Up until now, our types `Masked`, `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` would assume that you are stictly using the type output format of GraphQL Codegen. + + With this change, you can now modify the behaviour of those types if you use a different form of codegen that produces different types for your queries. + + A simple implementation that would override the `Masked` type to remove all fields starting with `_` from a type would look like this: + + ```ts + // your actual implementation of `Masked` + type CustomMaskedImplementation = { + [K in keyof TData as K extends `_${string}` ? never : K]: TData[K]; + }; + + import { HKT } from "@apollo/client/utilities"; + // transform this type into a higher kinded type that can be evaulated at a later time + interface CustomMaskedType extends HKT { + arg1: unknown; // TData + return: CustomMaskedImplementation; + } + + // create an "implementation interface" for the types you want to override + export interface CustomDataMaskingImplementation { + Masked: CustomMaskedType; + // other possible keys: `MaskedDocumentNode`, `FragmentType`, `MaybeMasked` and `Unmasked` + } + ``` + + then you would use that `CustomDataMaskingImplementation` interface in your project to extend the `TypeOverrides` interface exported by `@apollo/client` with it's functionality: + + ```ts + declare module "@apollo/client" { + export interface TypeOverrides extends CustomDataMaskingImplementation {} + } + ``` + + After that, all internal usage of `Masked` in Apollo Client as well as all usage in your code base will use the new `CustomMaskedType` implementation. + + If you don't specify overrides, Apollo Client will still default to the GraphQL Codegen data masking implementation. + The types for that are also explicitly exported as the `GraphQLCodegenDataMasking` namespace in `@apollo/client/masking`. + +## 4.0.0-alpha.17 + +### Major Changes + +- [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `TData` generic provided to types that return a `dataState` property is now modified by the given `DataState` generic instead of passing a modified `TData` type. For example, a `QueryRef` that could return partial data was defined as `QueryRef, TVariables>`. Now `TData` should be provided unmodified and a set of allowed states should be given instead: `QueryRef`. + + To migrate, use the following guide to replace your type with the right set of states (all types listed below are changed the same way): + + ```diff + - QueryRef + // `QueryRef`'s default is 'complete' | 'streaming' so this can also be left alone if you prefer + // All other types affected by this change default to all states + + QueryRef + + QueryRef + + - QueryRef + + QueryRef + + - QueryRef, TVariables> + + QueryRef + + - QueryRef | undefined, TVariables> + + QueryRef + ``` + + The following types are affected. Provide the allowed `dataState` values to the `TDataState` generic: + + - `ApolloQueryResult` + - `QueryRef` + - `PreloadedQueryRef` + - `useLazyQuery.Result` + - `useQuery.Result` + - `useReadQuery.Result` + - `useSuspenseQuery.Result` + + All `*QueryRef` types default to `complete | streaming` states while the rest of the types default to `'complete' | 'streaming' | 'partial' | 'empty'` states. You shouldn't need to provide the states unless you need to either allow for partial data/empty values (`*QueryRef`) or a restricted set of states. + +- [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `QueryReference` type. Please use `QueryRef` instead. + +- [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - If the `execute` function of `useLazyQuery` is executed, previously started queries + from the same `useLazyQuery` usage will be rejected with an `AbortError` unless + `.retain()` is called on the promise returned by previous `execute` calls. + + Please keep in mind that `useLazyQuery` is primarily meant as a means to synchronize + your component to the status of a query and that it's purpose it not to make a + series of network calls. + If you plan on making a series of network calls without the need to synchronize + the result with your component, consider using `ApolloClient.query` instead. + +### Minor Changes + +- [#12633](https://github.com/apollographql/apollo-client/pull/12633) [`9bfb51f`](https://github.com/apollographql/apollo-client/commit/9bfb51fdbca69560da71f9012c74ee172b6c2b69) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery.refetch` and `ObservableQuery.reobserve` and the `execute` function of `useLazyQuery` now return a + `ResultPromise` with an additional `.retain` method. + If this method is called, the underlying network operation will be kept running even if the `ObservableQuery` itself does + not require the result anymore, and the Promise will resolve with the final result instead of resolving with an intermediate + result in the case of early cancellation. + +- [#12649](https://github.com/apollographql/apollo-client/pull/12649) [`0be92ad`](https://github.com/apollographql/apollo-client/commit/0be92ad51cf8de444fa1cc507bab2c21d230a44e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a new `dataState` property that determines the completeness of the `data` property. `dataState` helps narrow the type of `data`. `dataState` is now emitted from `ObservableQuery` and returned from all React hooks that return a `data` property. + + The `dataState` values are: + + - `empty`: No data could be fulfilled from the cache or the result is incomplete. `data` is `undefined`. + - `partial`: Some data could be fulfilled from the cache but `data` is incomplete. This is only possible when `returnPartialData` is `true`. + - `streaming`: `data` is incomplete as a result of a deferred query and the result is still streaming in. + - `complete`: `data` is a fully satisfied query result fulfilled either from the cache or network. + + Example: + + ```ts + const { data, dataState } = useQuery(query); + + if (dataState === "empty") { + expectTypeOf(data).toEqualTypeOf(); + } + + if (dataState === "partial") { + expectTypeOf(data).toEqualTypeOf>(); + } + + if (dataState === "streaming") { + expectTypeOf(data).toEqualTypeOf(); + } + + if (dataState === "complete") { + expectTypeOf(data).toEqualTypeOf(); + } + ``` + +## 4.0.0-alpha.16 + +### Major Changes + +- [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Replace the `result` property on `ServerError` with `bodyText`. `bodyText` is set to the raw string body. `HttpLink` and `BatchHttpLink` no longer try and parse the response body as JSON when a `ServerError` is thrown. + +- [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - More strictly adhere to the [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http/draft/). This change adds support for the `application/graphql-response+json` media type and modifies the behavior of the `application/json` media type. + + - The client will parse the response as a well-formed GraphQL response when the server encodes `content-type` using `application/graphql-response+json` with a non-200 status code. + - The client will now throw a `ServerError` when the server encodes `content-type` using `application/json` and returns a non-200 status code. + - The client will now throw a `ServerError` when the server encodes using any other `content-type` and returns a non-200 status code. + + NOTE: If you use a testing utility to mock requests in your test, you may experience different behavior than production if your testing utility responds as `application/json` but your production server responds as `application/graphql-response+json`. If a `content-type` header is not set, the client interprets the response as `application/json`. + +- [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Change the default `Accept` header to `application/graphql-response+json,application/json;q=0.9`. + +- [#12644](https://github.com/apollographql/apollo-client/pull/12644) [`fe2f005`](https://github.com/apollographql/apollo-client/commit/fe2f005c34913ae082b96a807dc240e2785d50bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `HttpLink` and `BatchHttpLink` no longer emit a `next` notification with the JSON-parsed response body when a well-formed GraphQL response is returned and a `ServerError` is thrown. + +## 4.0.0-alpha.15 + +### Major Changes + +- [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move internal testing utilities in `@apollo/client/testing` to `@apollo/client/testing/internal` and remove deprecated testing utilities. Some of the testing utilities exported from the `@apollo/client/testing` endpoint were not considered stable. As a result of this change, testing utilities or types exported from `@apollo/client/testing` are now considered stable and will not undergo breaking changes. + + The following APIs were removed. To migrate, update usages of the following APIs as such: + + **`createMockClient`** + + ```diff + - const client = createMockClient(data, query, variables); + + const client = new ApolloClient({ + + cache: new InMemoryCache(), + + link: new MockLink([ + + { + + request: { query, variables }, + + result: { data }, + + } + + ]), + + }); + ``` + + **`mockObservableLink`** + + ```diff + - const link = mockObservableLink(); + + const link = new MockSubscriptionLink(); + ``` + + **`mockSingleLink`** + + ```diff + - const link = mockSingleLink({ + - request: { query, variables }, + - result: { data }, + - }); + + const link = new MockLink([ + + { + + request: { query, variables }, + + result: { data }, + + } + + ]); + ``` + +- [#12637](https://github.com/apollographql/apollo-client/pull/12637) [`d2a60d4`](https://github.com/apollographql/apollo-client/commit/d2a60d45e734a2518dad2443f85d82553cd6456a) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery`: only advance `previousData` if `data` actually changed + +- [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now return a `loading: false` state for `fetchPolicy` `standby`, even before subscription + +- [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/core` entrypoint in favor of `@apollo/client/testing`. + +### Minor Changes + +- [#12639](https://github.com/apollographql/apollo-client/pull/12639) [`1bdf489`](https://github.com/apollographql/apollo-client/commit/1bdf4893abb173c97877c71012afa15f9d3da8e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move `MockLink` types to `MockLink` namespace. This affects the `MockedResponse`, `MockLinkOptions`, and `ResultFunction` types. These types are still exported but are deprecated in favor of the namespace. To migrate, use the types on the `MockLink` namespace instead. + + ```diff + import { + - MockedResponse, + - MockLinkOptions, + - ResultFunction, + + MockLink + } from "@apollo/client/testing"; + + - const mocks: MockedResponse = []; + + const mocks: MockLink.MockedResponse = []; + + - const result: ResultFunction = () => {/* ... */ } + + const result: MockLink.ResultFunction = () => {/* ... */ } + + - const options: MockLinkOptions = {} + + const options: MockLink.Options = {} + ``` + +### Patch Changes + +- [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - When updating `skip` from `false` to `true` in `useQuery`, retain `data` if it is available rather than setting it to `undefined`. + +- [#12631](https://github.com/apollographql/apollo-client/pull/12631) [`b147cac`](https://github.com/apollographql/apollo-client/commit/b147cac5c96c44bfc3deb72c12c7521981584c12) Thanks [@phryneas](https://github.com/phryneas)! - The `error` property is no longer present when `skip` is `true` in `useQuery`. + +## 4.0.0-alpha.14 + +### Major Changes + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `getCacheKey` function is no longer available from `operation.getContext()` in the link chain. Use `operation.client.cache.identify(obj)` in the link chain instead. + +- [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - `ObservableQuery` will now keep previous `data` around when emitting a `loading` state, unless `query` or `variables` changed. + Note that `@exports` variables are not taken into account for this, so `data` will stay around even if they change. + +- [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Removed `getLastResult`, `getLastError` and `resetLastResults` from `ObservableQuery` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `resolvers` option from `ApolloClient`. Local resolvers have instead been moved to the new `LocalState` instance which is assigned to the `localState` option in `ApolloClient`. To migrate, move the `resolvers` values into a `LocalState` instance and assign that instance to `localState`. + + ```diff + new ApolloClient({ + - resolvers: { /* ... */ } + + localState: new LocalState({ + + resolvers: { /* ... */ } + + }), + }); + ``` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove local resolvers APIs from `ApolloClient` in favor of `localState`. Methods removed are: + + - `addResolvers` + - `getResolvers` + - `setResolvers` + - `setLocalStateFragmentMatcher` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Third-party caches must now implement the `fragmentMatches` API. Additionally `fragmentMatches` must be able to handle both `InlineFragmentNode` and `FragmentDefinitionNode` nodes. + + ```ts + class MyCache extends ApolloCache { + // This is now required + public fragmentMatches( + fragment: InlineFragmentNode | FragmentDefinitionNode, + typename: string + ): boolean { + return; // ... logic to determine if typename matches fragment + } + } + ``` + +- [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Reworked the logic for then a loading state is triggered. If the link chain responds synchronously, a loading state will be omitted, otherwise it will be triggered. + If local resolvers are used, the time window for "sync vs async" starts as soon as `@exports` variables are resolved. + +- [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - Dropped the `saveAsLastResult` argument from `ObservableQuery.getCurrentResult` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The resolver function's `context` argument (the 3rd argument) has changed to provide additional information without the possibility of name clashes. Previously the `context` argument would spread request context and override the `client` and `cache` properties to give access to both inside of a resolver. The `context` argument takes now takes the following shape: + + ```ts + { + // the request context. By default `TContextValue` is of type `DefaultContext`, + // but can be changed if a `context` function is provided. + requestContext: TContextValue, + // The client instance making the request + client: ApolloClient, + // Whether the resolver is run as a result of gathering exported variables + // or resolving the value as part of the result + phase: "exports" | "resolve" + } + ``` + + To migrate, pull any request context from `requestContext` and the `cache` from the `client` property: + + ```diff + new LocalState({ + resolvers: { + Query: { + - myResolver: (parent, args, { someValue, cache }) => { + + myResolver: (parent, args, { requestContext, client }) => { + + const someValue = requestContext.someValue; + + const cache = client.cache; + } + } + } + }); + ``` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer ships with support for `@client` fields out-of-the-box and now must be opt-in. To opt in to use `@client` fields, pass an instantiated `LocalState` instance to the `localState` option. If a query contains `@client` and local state hasn't been configured, an error will be thrown. + + ```ts + import { LocalState } from "@apollo/client/local-state"; + + new ApolloClient({ + localState: new LocalState(), + }); + ``` + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `fragmentMatcher` option from `ApolloClient`. Custom fragment matchers used with local state are no longer supported. Fragment matching is now performed by the configured `cache` via the `cache.fragmentMatches` API. + +- [#12556](https://github.com/apollographql/apollo-client/pull/12556) [`c3fceda`](https://github.com/apollographql/apollo-client/commit/c3fceda86c5e0f499d0b5fa54ea7dc4c4391ae2c) Thanks [@phryneas](https://github.com/phryneas)! - A call to `ObservableQuery.setVariables` with different variables or a `ObservableQuery.refetch` call will always now guarantee that a value will be emitted from the observable, even if it is deep equal to the previous value. + +### Minor Changes + +- [#12614](https://github.com/apollographql/apollo-client/pull/12614) [`d2851e2`](https://github.com/apollographql/apollo-client/commit/d2851e2c74541995760a86904b1e3ab4bd736e62) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Revamp local resolvers and fix several issues from the existing `resolvers` option. + + - Throwing errors in a resolver will set the field value as `null` and add an error to the response's `errors` array. + - Remote results are dealiased before they are passed as the parent object to a resolver so that you can access fields by their field name. + - You can now specify a `context` function that you can use to customize the `requestContext` given to resolvers. + - The `LocalState` class accepts a `Resolvers` generic that provides autocompletion and type checking against your resolver types to ensure your resolvers are type-safe. + - `data: null` is now handled correctly and does not call your local resolvers when the server does not provide a result. + - Additional warnings have been added to provide hints when resolvers behave unexpectedly. + + ```ts + import { LocalState } from "@apollo/client/local-state"; + + import { Resolvers } from "./path/to/local-resolvers-types.ts"; + + // LocalState now accepts a `Resolvers` generic. + const localState = new LocalState({ + // The return value of this funciton + context: (options) => ({ + // ... + }), + resolvers: { + // ... + }, + }); + + // You may also pass a `ContextValue` generic used to ensure the `context` + // function returns the correct type. This type is inferred from your resolvers + // if not provided. + new LocalState({ + // ... + }); + ``` + +## 4.0.0-alpha.13 + +### Major Changes + +- [#12600](https://github.com/apollographql/apollo-client/pull/12600) [`34ff6aa`](https://github.com/apollographql/apollo-client/commit/34ff6aa25b47c3e84d0b18e2c69bc995814bf2f2) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Move most of the utilities in `@apollo/client/utilities` to `@apollo/client/utilities/internal`. Many of the utilities exported from the `@apollo/client/utilities` endpoint were not considered stable. + + As a result of this change, utilities or types exported from `@apollo/client/utilities` are now documented and considered stable and will not undergo breaking changes. + +- [#12595](https://github.com/apollographql/apollo-client/pull/12595) [`60bb49c`](https://github.com/apollographql/apollo-client/commit/60bb49ccea9aecf3e6a212b5a1f71907e60af886) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `@apollo/client/testing/experimental` test utilities. Use [GraphQL Testing Library](https://github.com/apollographql/graphql-testing-library) instead. + +### Patch Changes + +- [#12618](https://github.com/apollographql/apollo-client/pull/12618) [`e4a3ecf`](https://github.com/apollographql/apollo-client/commit/e4a3ecfe50bc5b462067574a0ffb1951549fb60f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove code that strips `@client` fields in `HttpLink` and `BatchHttpLink`. This was unused code since core handles removing `@client` fields and should have no observable change. + +## 4.0.0-alpha.12 + +### Major Changes + +- [#12586](https://github.com/apollographql/apollo-client/pull/12586) [`605db8e`](https://github.com/apollographql/apollo-client/commit/605db8e94fe2ce74c0a395f38f6873d40f431365) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `typeDefs` option from `ApolloClient`. + +- [#12588](https://github.com/apollographql/apollo-client/pull/12588) [`eed825a`](https://github.com/apollographql/apollo-client/commit/eed825a2549f1d21fff2ec179815206b3baf0fcb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TContext` generic argument from all types that use it. `TContext` is replaced with `DefaultContext` which can be modified using declaration merging. + +- [#12590](https://github.com/apollographql/apollo-client/pull/12590) [`a005e82`](https://github.com/apollographql/apollo-client/commit/a005e822de7b24783f85be45df142ffbb9bc561b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop `graphql` v15 as a valid peer dependency. + +- [#12591](https://github.com/apollographql/apollo-client/pull/12591) [`a7e7383`](https://github.com/apollographql/apollo-client/commit/a7e738328951f5dac25a5fe48d28b3640a3e0eb9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename the `@apollo/client/link/core` entrypoint to `@apollo/client/link`. + +- [#12589](https://github.com/apollographql/apollo-client/pull/12589) [`15f5a1c`](https://github.com/apollographql/apollo-client/commit/15f5a1c29ac05015387a7bbc2dbe9a91d09fedfa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require the `link` option when instantiating `ApolloClient`. This removes the `uri`, `credentials` and `headers` options from `ApolloClient` in favor of passing an instantiated `HttpLink` directly. To migrate: + + **If using `uri`, `credentials`, or `headers` options** + + ```diff + new ApolloClient({ + // ... + - uri, + - credentials, + - headers, + + link: new HttpLink({ uri, credentials, headers }), + // or if you prefer the function call approach: + + link: createHttpLink({ uri, credentials, headers }), + }); + ``` + + **If creating a client without the `link` option** + + ```diff + new ApolloClient({ + // ... + + link: ApolloLink.empty() + }); + ``` + +## 4.0.0-alpha.11 + +### Major Changes + +- [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `cache` and `forceFetch` properties are no longer available on context when calling `operation.getContext()`. `cache` can be accessed through the `operation` with `operation.client.cache` instead. `forceFetch` has been replaced with `queryDeduplication` which specifies whether `queryDeduplication` was enabled for the request or not. + +- [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ApolloLink.execute` now requires a third argument which provides the `client` that initiated the request to the link chain. If you use `execute` directly, add a third argument with a `client` property: + + ```ts + ApolloLink.execute(link, operation, { client }); + + // or if you import the `execute` function directly: + execute(link, operation, { client }); + ``` + +- [#12566](https://github.com/apollographql/apollo-client/pull/12566) [`ce4b488`](https://github.com/apollographql/apollo-client/commit/ce4b488bef13f2f5ce1b348d8c3196e198165dd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't `broadcastQueries` when a query is torn down. + +### Minor Changes + +- [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide an extension to define types for `context` passed to the link chain. To define your own types, use [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) to add properties to the `DefaultContext` type. + + ```ts + // @apollo-client.d.ts + // This import is necessary to ensure all Apollo Client imports + // are still available to the rest of the application. + import "@apollo/client"; + + declare module "@apollo/client" { + interface DefaultContext extends Record { + myProperty: string; + } + } + ``` + + Links that provide context options can be used with this type to add those context types to `DefaultContext`. For example, to add context options from `HttpLink`, add the following code: + + ```ts + import { HttpLink } from "@apollo/client"; + + declare module "@apollo/client" { + interface DefaultContext extends HttpLink.ContextOptions { + myProperty: string; + } + } + ``` + + At this time, the following built-in links support context options: + + - `HttpLink.ContextOptions` + - `BatchHttpLink.ContextOptions` + +- [#12576](https://github.com/apollographql/apollo-client/pull/12576) [`a92ff78`](https://github.com/apollographql/apollo-client/commit/a92ff780abee60896bb9632867e90c82d0829255) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `client` property to the `operation` passed to the link chain. This `client` is set as the `client` making the request to the link chain. + +### Patch Changes + +- [#12574](https://github.com/apollographql/apollo-client/pull/12574) [`0098ec9`](https://github.com/apollographql/apollo-client/commit/0098ec9f860e4e08a2070823f723dce401ae588a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Export `gql` from the `@apollo/client/react` entrypoint. + +- [#12572](https://github.com/apollographql/apollo-client/pull/12572) [`3dc50e6`](https://github.com/apollographql/apollo-client/commit/3dc50e6476dcedf82ed3856bf9f4571a32a760a6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Adjust `useMutation` types to better handle required variables. When required variables are missing, TypeScript will now complain if they are not provided either to the hook or the returned `mutate` function. Providing required variables to `useMutation` will make them optional in the returned `mutate` function. + +## 4.0.0-alpha.10 + +### Major Changes + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` can now be reset back to empty when calling `reobserve` with `variables: undefined`. Previously the `variables` key would be ignored so `variables` would remain unchanged. + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `never` is no longer supported as a valid `TVariables` generic argument for APIs that require `variables` as part of its type. Use `Record` instead. + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - When passing a `variables` key with the value `undefined`, the value will be replaced by the default value in the query, if it is provided, rather than leave it as `undefined`. + + ```ts + // given this query + const query = gql` + query PaginatedQuery($limit: Int! = 10, $offset: Int) { + list(limit: $limit, offset: $offset) { + id + } + } + `; + + const observable = client.query({ + query, + variables: { limit: 5, offset: 0 }, + }); + console.log(observable.variables); // => { limit: 5, offset: 0 } + + observable.reobserve({ variables: { limit: undefined, offset: 10 } }); + // limit is now `10`. This would previously be `undefined` + console.log(observable.variables); // => { limit: 10, offset: 10 } + ``` + +- [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports a `fetchPolicy` of `standby`. `standby` does not fetch and did not return `data`. `standby` is meant for watched queries where fetching should be on hold. + +### Minor Changes + +- [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify message formatter for `CombinedGraphQLErrors` and `CombinedProtocolErrors`. To provide your own message formatter, override the static `formatMessage` property on these classes. + + ```ts + CombinedGraphQLErrors.formatMessage = ( + errors, + { result, defaultFormatMessage } + ) => { + return "Some formatted message"; + }; + + CombinedProtocolErrors.formatMessage = (errors, { defaultFormatMessage }) => { + return "Some formatted message"; + }; + ``` + +- [#12546](https://github.com/apollographql/apollo-client/pull/12546) [`5dffbbe`](https://github.com/apollographql/apollo-client/commit/5dffbbe407eb1d9adbcb0fff89f2d3a75dc1ad2b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a static `is` method to error types defined by Apollo Client. `is` makes it simpler to determine whether an error is a specific type, which can be helpful in cases where you'd like to narrow the error type in order to use specific properties from that error. + + This change applies to the following error types: + + - `CombinedGraphQLErrors` + - `CombinedProtocolErrors` + - `ServerError` + - `ServerParseError` + - `UnconventionalError` + + **Example** + + ```ts + import { CombinedGraphQLErrors } from "@apollo/client"; + + if (CombinedGraphQLErrors.is(error)) { + console.log(error.message); + error.errors.forEach((graphQLError) => console.log(graphQLError.message)); + } + ``` + +- [#12561](https://github.com/apollographql/apollo-client/pull/12561) [`99d72bf`](https://github.com/apollographql/apollo-client/commit/99d72bfdb38e3d9679f60b9acb065a84e3b42fd6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add the ability to detect if an error was an error was emitted from the link chain. This is useful if your application throws custom errors in other areas of the application and you'd like to differentiate them from errors emitted by the link chain itself. + + To detect if an error was emitted from the link chain, use `LinkError.is`. + + ```ts + import { LinkError } from "@apollo/client"; + + client.query({ query }).catch((error) => { + if (LinkError.is(error)) { + // This error originated from the link chain + } + }); + ``` + +### Patch Changes + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `variables` option used with various APIs are now enforced more consistently across the client when `TVariables` contains required variables. If required `variables` are not provided, TypeScript will now complain that it requires a `variables` option. + + This change affects the following APIs: + + - `client.query` + - `client.mutate` + - `client.subscribe` + - `client.watchQuery` + - `useBackgroundQuery` + - `useQuery` + - `useSubscription` + - `useSuspenseQuery` + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `variables` returned from `useLazyQuery`. When `called` is `false`, `variables` is now `Partial` instead of `TVariables`. + +- [#12562](https://github.com/apollographql/apollo-client/pull/12562) [`90bf0e6`](https://github.com/apollographql/apollo-client/commit/90bf0e61516a382182f212ac8ab891099e2eb009) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.query` no longer supports `notifyOnNetworkStatusChange` in options. An error will be thrown if this option is set. The effects of this option were not observable by `client.query` since `client.query` emits a single result. + +- [#12557](https://github.com/apollographql/apollo-client/pull/12557) [`51d26ae`](https://github.com/apollographql/apollo-client/commit/51d26ae631c6631a189c98ea9357b18e77a9a876) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Update format of the error message for `CombinedGraphQLErrors` and `CombinedProtocolErrors` to be more like v3.x. + + ```diff + console.log(error.message); + - `The GraphQL server returned with errors: + - - Email not found + - - Username already in use` + + `Email not found + + Username already in use` + ``` + +- [#12559](https://github.com/apollographql/apollo-client/pull/12559) [`49ace0e`](https://github.com/apollographql/apollo-client/commit/49ace0e2119b7fd5997dcf051002ebd4ba2e0bc4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.variables` has been updated to return `TVariables` rather than `TVariables | undefined`. This is more consistent with the runtime value where an empty object (`{}`) will be returned when the `variables` option is not provided. + +## 4.0.0-alpha.9 + +### Major Changes + +- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - An initial loading state is now emitted from `ObservableQuery` when subscribing if `notifyOnNetworkStatusChange` is set to `true`. + +- [#12512](https://github.com/apollographql/apollo-client/pull/12512) [`e809b71`](https://github.com/apollographql/apollo-client/commit/e809b71aa9a02917a286afdbb03d5be8e5947c53) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `notifyOnNetworkStatusChange` now defaults to `true`. This means that loading states will be emitted (core API) or rendered (React) by default when calling `refetch`, `fetchMore`, etc. To maintain the old behavior, set `notifyOnNetworkStatusChange` to `false` in `defaultOptions`. + + ```ts + new ApolloClient({ + defaultOptions: { + watchQuery: { + // Use the v3 default + notifyOnNetworkStatusChange: false, + }, + }, + }); + ``` + +### Patch Changes + +- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The returned `networkStatus` in `useLazyQuery` is now set to `setVariables` when calling the `useLazyQuery` `execute` function for the first time with variables. + +- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `ObservableQuery` stops polling if switching to a `standby` `fetchPolicy`. When switching back to a non-`standby` `fetchPolicy`, polling will resume. + +- [#12536](https://github.com/apollographql/apollo-client/pull/12536) [`e14205a`](https://github.com/apollographql/apollo-client/commit/e14205ad5909f95aa04684acd0ca2f25956ee50c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure a loading state is emitted when calling the `execute` function after changing clients in `useLazyQuery`. + +- [#12542](https://github.com/apollographql/apollo-client/pull/12542) [`afb4fce`](https://github.com/apollographql/apollo-client/commit/afb4fce08859b2c6eebf288230a7c35b7acf2da6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `useLazyQuery` does not return a `partial` property which is not specified by the result type. + +## 4.0.0-alpha.8 + +### Major Changes + +- [#12539](https://github.com/apollographql/apollo-client/pull/12539) [`dd0d6d6`](https://github.com/apollographql/apollo-client/commit/dd0d6d6d96d8b810e30dc2fdee2ac8a2477d0017) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `onError` link now uses a single `error` property to report the error that caused the link callback to be called. This will be an instance of `CombinedGraphQLErrors` in the event GraphQL errors were emitted from the terminating link, `CombinedProtocolErrors` if the terminating link emitted protocol errors, or the unwrapped error type if any other non-GraphQL error was thrown or emitted. + + ```diff + - const errorLink = onError(({ graphQLErrors, networkError, protocolErrors }) => { + - graphQLErrors.forEach(error => console.log(error.message)); + + const errorLink = onError(({ error }) => { + + if (error.name === 'CombinedGraphQLErrors') { + + error.errors.forEach(rawError => console.log(rawError.message)); + + } + }); + ``` + +- [#12533](https://github.com/apollographql/apollo-client/pull/12533) [`73221d8`](https://github.com/apollographql/apollo-client/commit/73221d87bd5640986f86fe3ee50c63ed49834cbb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onError` and `setOnError` methods from `ApolloLink`. `onError` was only used by `MockLink` to rewrite errors if `setOnError` was used. + +- [#12531](https://github.com/apollographql/apollo-client/pull/12531) [`7784b46`](https://github.com/apollographql/apollo-client/commit/7784b46117a4f91a270a020ed1a24f042cb9ee17) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mocked responses passed to `MockLink` now accept a callback for the `request.variables` option. This is used to determine if the mock should be matched for a set of request variables. With this change, the `variableMatcher` option has been removed in favor of passing a callback to `variables`. Update by moving the callback function from `variableMatcher` to `request.variables`. + + ```diff + new MockLink([ + { + request: { + query, + + variables: (requestVariables) => true + }, + - variableMatcher: (requestVariables) => true + } + ]); + ``` + +- [#12526](https://github.com/apollographql/apollo-client/pull/12526) [`391af1d`](https://github.com/apollographql/apollo-client/commit/391af1dd733219b7e1e14cfff9d5e3ce3967242f) Thanks [@phryneas](https://github.com/phryneas)! - The `@apollo/client` and `@apollo/client/core` entry points are now equal. + In the next major, the `@apollo/client/core` entry point will be removed. + Please change imports over from `@apollo/client/core` to `@apollo/client`. + +- [#12525](https://github.com/apollographql/apollo-client/pull/12525) [`8785186`](https://github.com/apollographql/apollo-client/commit/87851863b94eebbc208671b17aeca73748ac41f6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error when a client-only query is used in a mocked response passed to `MockLink`. + +- [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `delay` for all mocked responses passed to `MockLink` using `realisticDelay`. This ensures your test handles loading states by default and is not reliant on a specific timing. + + If you would like to restore the old behavior, use a global default delay of `0`. + + ```ts + MockLink.defaultOptions = { + delay: 0, + }; + ``` + +- [#12530](https://github.com/apollographql/apollo-client/pull/12530) [`2973e2a`](https://github.com/apollographql/apollo-client/commit/2973e2a6e6fd81fa59b769d84c252c98ca69440d) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `newData` option for mocked responses passed to `MockLink` or the `mocks` option on `MockedProvider`. This option was undocumented and was nearly identical to using the `result` option as a callback. + + To replicate the old behavior of `newData`, use `result` as a callback and add the `maxUsageCount` option with a value set to `Number.POSITIVE_INFINITY`. + + **with `MockLink`** + + ```diff + new MockLink([ + { + request: { query, variables }, + - newData: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + + maxUsageCount: Number.POSITIVE_INFINITY, + } + ]) + ``` + + **with `MockedProvider`** + + ```diff + ({ data: { greeting: "Hello " + variables.greeting } }), + + result: (variables) => ({ data: { greeting: "Hello " + variables.greeting } }), + + maxUsageCount: Number.POSITIVE_INFINITY, + } + ]} + /> + ``` + +### Minor Changes + +- [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow mocked responses passed to `MockLink` to accept a callback for the `delay` option. The `delay` callback will be given the current operation which can be used to determine what delay should be used for the mock. + +- [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new `realisticDelay` helper function for use with the `delay` callback for mocked responses used with `MockLink`. `realisticDelay` will generate a random value between 20 and 50ms to provide an experience closer to unpredictable network latency. `realisticDelay` can be configured with a `min` and `max` to set different thresholds if the defaults are not sufficient. + + ```ts + import { realisticDelay } from "@apollo/client/testing"; + + new MockLink([ + { + request: { query }, + result: { data: { greeting: "Hello" } }, + delay: realisticDelay(), + }, + { + request: { query }, + result: { data: { greeting: "Hello" } }, + delay: realisticDelay({ min: 10, max: 100 }), + }, + ]); + ``` + +- [#12532](https://github.com/apollographql/apollo-client/pull/12532) [`ae0dcad`](https://github.com/apollographql/apollo-client/commit/ae0dcad89924e6b8090ca3182df30e528589b562) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add ability to specify a default `delay` for all mocked responses passed to `MockLink`. This `delay` can be configured globally (all instances of `MockLink` will use the global defaults), or per-instance (all mocks in a single instance will use the defaults). A `delay` defined on a single mock will supercede all default delays. Per-instance defaults supercede global defaults. + + **Global defaults** + + ```ts + MockLink.defaultOptions = { + // Use a default delay of 20ms for all mocks in all instances without a specified delay + delay: 20, + + // altenatively use a callback which will be executed for each mock + delay: () => getRandomNumber(), + + // or use the built-in `realisticDelay`. This is the default + delay: realisticDelay(), + }; + ``` + + **Per-instance defaults** + + ```ts + new MockLink( + [ + // Use the default delay + { + request: { query }, + result: { data: { greeting: "Hello" } }, + }, + { + request: { query }, + result: { data: { greeting: "Hello" } }, + // Override the default for this mock + delay: 10, + }, + ], + { + defaultOptions: { + // Use a default delay of 20ms for all mocks without a specified delay + delay: 20, + + // altenatively use a callback which will be executed for each mock + delay: () => getRandomNumber(), + + // or use the built-in `realisticDelay`. This is the default + delay: realisticDelay(), + }, + } + ); + ``` + +## 4.0.0-alpha.7 + +### Major Changes + +- [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/context` and `@apollo/client/react/hooks` entry points. Please use `@apollo/client/react` instead. + +- [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `@apollo/client/react/parser` entry point. There is no replacement. + +### Patch Changes + +- [#12513](https://github.com/apollographql/apollo-client/pull/12513) [`9c3207c`](https://github.com/apollographql/apollo-client/commit/9c3207c44ddad1f8b845c09495d6c070ace8de7b) Thanks [@phryneas](https://github.com/phryneas)! - Removed the `parser` cache. The functionality has been replaced in a way that doesn't need caching. + +## 4.0.0-alpha.6 + +### Major Changes + +- [#12485](https://github.com/apollographql/apollo-client/pull/12485) [`d338303`](https://github.com/apollographql/apollo-client/commit/d3383033d306b7d66e90f5f3170c24453cd76464) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Throw an error for queries and mutations if the link chain completes without emitting a value. + +- [#12484](https://github.com/apollographql/apollo-client/pull/12484) [`9a8b9ce`](https://github.com/apollographql/apollo-client/commit/9a8b9cebbcf290984a4f154f261a4090e636e50e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `loading`, `networkStatus`, and `partial` properties on all promise-based query APIs. These properties were mostly static and were unnecessary since promise resolution guaranteed that the query was not longer loading. + + This affects the following APIs: + + - `client.query` + - `client.refetchQueries` + - `client.reFetchObservableQueries` + - `client.resetStore` + - `observableQuery.fetchMore` + - `observableQuery.refetch` + - `observableQuery.reobserve` + - `observableQuery.setVariables` + - The `useLazyQuery` `execute` function + +### Minor Changes + +- [#12497](https://github.com/apollographql/apollo-client/pull/12497) [`ff2cbe1`](https://github.com/apollographql/apollo-client/commit/ff2cbe1db1815c30f5fda7f6c07091663e065582) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Add a `data` property to `CombinedGraphQLErrors` that captures any partial data returned by the GraphQL response when `errors` are also returned. + +- [#12488](https://github.com/apollographql/apollo-client/pull/12488) [`c98b633`](https://github.com/apollographql/apollo-client/commit/c98b6335de5b15e546aa5db79a8cf2dc9d914dcf) Thanks [@phryneas](https://github.com/phryneas)! - Add a new method for static SSR of React components, `prerenderStatic`. + The old methods, `getDataFromTree`, `getMarkupFromTree` and `renderToStringWithData` + have been deprecated in favor of `prerenderStatic`. + + If used with React 19 and the `prerender` or `prerenderToNodeStream` apis from + `react-dom/static`, this method can now be used to SSR-prerender suspense-enabled + hook APIs. + +## 4.0.0-alpha.5 + +### Major Changes + +- [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `variables` from the result returned from `useSubscription`. + +- [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`. + +- [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on mutations for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors created when using an `errorPolicy` of `all` will now resolve the promise and be returned on the `error` property of the result, or stripped away when the `errorPolicy` is `none`. + +- [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `client.mutate` now returns a `MutateResult` instead of `FetchResult`. As a result, the `errors` property has been removed in favor of `error` which is set if either a network error occured or GraphQL errors are returned from the server. + + `useMutation` now also returns a `MutateResult` instead of a `FetchResult`. + +- [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Mutations no longer report errors if the GraphQL result from the server contains an empty array of errors. + +- [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback. + +- [#12478](https://github.com/apollographql/apollo-client/pull/12478) [`5ea6a45`](https://github.com/apollographql/apollo-client/commit/5ea6a45b3ec2f0d526abe78ae03c42bb519f87c7) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `onSubscriptionData` and `onSubscriptionComplete` callbacks from `useSubscription`. Use `onData` and `onComplete` instead. + +- [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error. + +- [#12476](https://github.com/apollographql/apollo-client/pull/12476) [`6afff60`](https://github.com/apollographql/apollo-client/commit/6afff60beece953406af2cbe07f7ccbf973cadaa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open. + + When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead. + +### Minor Changes + +- [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - Split out SSR-specific code from useQuery hook, remove RenderPromises + +### Patch Changes + +- [#12487](https://github.com/apollographql/apollo-client/pull/12487) [`b695e5e`](https://github.com/apollographql/apollo-client/commit/b695e5e10ab0eb47948e914b610f67c40267349e) Thanks [@phryneas](https://github.com/phryneas)! - `useQuery` with `ssr: false` - previously, `skip` had a higher priortity than `ssr: false` while `ssr: false` had a higher priority than `fetchPolicy: "standby"` (which is roughly equivalent to `skip`). + + This priority has been adjusted so now both `skip` and `fetchPolicy: "standby"` have a higher priority than `ssr: false` and will return `loading: false`, while `ssr: false` will only come after those and will return `loading: true` if those are not set. + +- [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where passing `onError` to `useMutation` would resolve the promise returned by the `mutate` function instead of rejecting when using an `errorPolicy` of `none`. + +- [#12475](https://github.com/apollographql/apollo-client/pull/12475) [`3de63eb`](https://github.com/apollographql/apollo-client/commit/3de63ebcdf95a87adc31e6b4a39cae5391ed945a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where additional response properties were returned on the result returned from `client.mutate`, such as `@defer` payload fields. These properties are now stripped out to correspond to the TypeScript type. + +## 4.0.0-alpha.4 + +### Major Changes + +- [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setOptions` has been removed as it was an alias of `reobserve`. Prefer using `reobserve` directly instead. + + ```diff + const observable = client.watchQuery(options); + + // Use reobserve to set new options and reevaluate the query + - observable.setOptions(newOptions); + + observable.reobserve(newOptions); + ``` + + As a result of this change, `reobserve` has been marked for public use and is no longer considered an internal API. The `newNetworkStatus` argument has been removed to facilitate this change. + +- [#12470](https://github.com/apollographql/apollo-client/pull/12470) [`d32902f`](https://github.com/apollographql/apollo-client/commit/d32902f26a4c5dea30421ee52aeea52df3e5334e) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` and `disableNetworkFetches` have been reworked: + + Previously, a `ObservableQuery` created by `client.query` or `client.watchQuery` + while one of those were active would permanently be changed from a `fetchPolicy` + of `"network-only"` or `"cache-and-network"` to `"cache-first"`, and stay that way + even long after `disableNetworkFetches` would have been deactivated. + + Now, the `ObservableQuery` will keep their original `fetchPolicy`, but queries + made during `disableNetworkFetches` will just apply the `fetchPolicy` replacement + at request time, just for that one request. + + `ApolloClient.disableNetworkFetches` has been renamed to `ApolloClient.prioritizeCacheValues` to better reflect this behaviour. + +- [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Flatten out React hook types. As a result, the base types have been removed. Prefer using the hook types instead. Removed types include: + + - `BaseMutationOptions` + - `BaseQueryOptions` + - `BaseSubscriptionOptions` + - `ObservableQueryFields` + - `MutationSharedOptions` + - `QueryFunctionOptions` + +- [#12463](https://github.com/apollographql/apollo-client/pull/12463) [`3868df8`](https://github.com/apollographql/apollo-client/commit/3868df81f973dc7b5a79fadf4dc1b0e291003b7f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useQuery` no longer returns `reobserve` as part of its result. It was possible to use `reobserve` to set new options on the underlying `ObservableQuery` instance which differed from the options passed to the hook. This could result in unexpected results. Instead prefer to rerender the hook with new options. + +### Patch Changes + +- [#12465](https://github.com/apollographql/apollo-client/pull/12465) [`a132163`](https://github.com/apollographql/apollo-client/commit/a1321637cafb4023d6df416e9467294114d8346b) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Rename all React hook result types and options. These types have all moved under a namespace that matches the hook name. For example, `useQuery` exports `useQuery.Options` and `useQuery.Result` types. As such, the old hook types have been deprecated and will be removed in v5. + +## 4.0.0-alpha.3 + +### Major Changes + +- [#12457](https://github.com/apollographql/apollo-client/pull/12457) [`32e85ea`](https://github.com/apollographql/apollo-client/commit/32e85ea9eb93c1ffb10d6f70e9e2775e1326e9aa) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Network errors triggered by queries now adhere to the `errorPolicy`. This means that GraphQL errors and network errors now behave the same way. Previously promise-based APIs, such as `client.query`, would reject the promise with the network error even if `errorPolicy` was set to `ignore`. The promise is now resolved with the `error` property set to the network error instead. + +- [#12464](https://github.com/apollographql/apollo-client/pull/12464) [`0595f39`](https://github.com/apollographql/apollo-client/commit/0595f39deba52ac43fa0780b742564134ec7ab89) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `called` property from `useQuery`. + +## 4.0.0-alpha.2 + +### Major Changes + +- [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `TSerialized` generic argument to `ApolloCache`. The `ApolloCache` base cache abstraction now returns `unknown` for `cache.extract` which can be overridden by a cache subclass. + +- [#12450](https://github.com/apollographql/apollo-client/pull/12450) [`876d070`](https://github.com/apollographql/apollo-client/commit/876d07042cf3348b3769b2bb415aa5f70ce9844c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `TCacheShape` generic argument to `ApolloClient`. `client.extract()` now returns `unknown` by default. You will either need to type-cast this to the expected serialized shape, or use the `cache.extract()` directly from the subclass to get more specific types. + +- [#12446](https://github.com/apollographql/apollo-client/pull/12446) [`ab920d2`](https://github.com/apollographql/apollo-client/commit/ab920d2701aa276482dbc78b44a1c25c76467bc9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `defaultOptions` option from `useQuery`. Use options directly or use the global `ApolloClient` `defaultOptions`. + +- [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `canonizeResults` option. It was prone to memory leaks. As such, some results that were referentially equal when `canonizeResults` option was set to `true` no longer retain the same object identity. + +- [#12442](https://github.com/apollographql/apollo-client/pull/12442) [`c5ead08`](https://github.com/apollographql/apollo-client/commit/c5ead08d0f10ddd6232b742defe9620533bf41e6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `resetResultIdentities` option from `InMemoryCache.gc()`. This affected object canonization which has been removed. + +- [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default the `TData` generic type to `unknown` in all APIs that use a `TData` generic argument such as `useQuery`, `client.query`, etc. + +### Patch Changes + +- [#12451](https://github.com/apollographql/apollo-client/pull/12451) [`77e1b13`](https://github.com/apollographql/apollo-client/commit/77e1b133bdba32c67b5a840090dbacb16282dee9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Default `TVariables` generic type to `OperationVariables` instead of `any` throughout the client in areas that did not yet have the default as such. + +- [#12454](https://github.com/apollographql/apollo-client/pull/12454) [`925548a`](https://github.com/apollographql/apollo-client/commit/925548a9baadb19b7bb78ee84c6f9e64b55c39e9) Thanks [@phryneas](https://github.com/phryneas)! - Fix up the 4.0 CommonJS build + +## 4.0.0-alpha.1 + +### Major Changes + +- [#12433](https://github.com/apollographql/apollo-client/pull/12433) [`b86e50b`](https://github.com/apollographql/apollo-client/commit/b86e50b1dc121cd67fe73655256b6c61afc18cb4) Thanks [@phryneas](https://github.com/phryneas)! - Remove workarounds for streaming with non-WhatWG response bodies to reduce bundle size. + + This removes support for `fetch` implementations that return Node Streams, Async Iterators or Blob instances as `Response.body`. + + In the WhatWG Fetch specification, [`Response.body`](https://fetch.spec.whatwg.org/#body) is specified as a WhatWG [ReadableStream](https://streams.spec.whatwg.org/#readablestream). + + At this point in time, this is natively supported in browsers, `node` and React Native (via [react-native-fetch-api](https://www.npmjs.com/package/react-native-fetch-api), see our [setup instructions for React Native](https://www.apollographql.com/docs/react/integrations/react-native#consuming-multipart-http-via-text-streaming)). + + If you are using an older `fetch` polyfill that deviates from the spec, this might not be compatible - for example, [node-fetch](https://github.com/node-fetch/node-fetch?tab=readme-ov-file#interface-body) returns a node `Readable` instead of a `ReadableStream`. + In those cases, please switch to a compatible alternative such as the `node`-native `fetch`, or `undici`. + +### Minor Changes + +- [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Drop `rehackt` dependency. + We can now directly import from `react` without causing build errors in RSC. + +- [#12437](https://github.com/apollographql/apollo-client/pull/12437) [`4779dc7`](https://github.com/apollographql/apollo-client/commit/4779dc7badaba10d8c7a271eb0da6a079049b65d) Thanks [@phryneas](https://github.com/phryneas)! - Remove polyfills for Object.freeze,seal and preventExtensions in React Native + + These polyfills were only necessary until React Native 0.59, which + [patched the problem](https://github.com/facebook/react-native/pull/21492) on + the React Native side. + + With React Native 0.61, the `Map` function was [completely replaced](https://github.com/facebook/react-native/commit/93b9ac74e59bbe84ea388d7c1879857b4acab114) + with a native implementation that never had the problems we guarded against. + +- [#12438](https://github.com/apollographql/apollo-client/pull/12438) [`5089516`](https://github.com/apollographql/apollo-client/commit/5089516aa3ad140df22bb8a458faeeb884ed0388) Thanks [@phryneas](https://github.com/phryneas)! - Add `react-server` entry point with stubs for normal exports. + +## 4.0.0-alpha.0 + +### Major Changes + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `asyncMap` utility function. Instead use one of the RxJS operators that creates Observables from promises, such as `from`. + +- [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `isApolloError` utility function to check if the error object is an `ApolloError` instance. Use `instanceof` to check for more specific error types that replace `ApolloError`. + +- [#12379](https://github.com/apollographql/apollo-client/pull/12379) [`ef892b4`](https://github.com/apollographql/apollo-client/commit/ef892b4dc505b02049525f9aba32c51f1c00c922) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `addTypename` option from `InMemoryCache` and `MockedProvider`. `__typename` is now always added to the outgoing query document when using `InMemoryCache` and cannot be disabled. + + If you are using `` with `addTypename={false}`, ensure that your mocked responses include a `__typename` field. This will ensure cache normalization kicks in and behaves more like production. + +- [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `errors` property from `useQuery` and `useLazyQuery`. Read errors from the `error` property instead. + +- [#12222](https://github.com/apollographql/apollo-client/pull/12222) [`d1a9054`](https://github.com/apollographql/apollo-client/commit/d1a905461d4378522c3257de00afba2ae8decd22) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Drop support for React 16. + +- [#12376](https://github.com/apollographql/apollo-client/pull/12376) [`a0c996a`](https://github.com/apollographql/apollo-client/commit/a0c996a816fbb6a2323231c0422d1c8a3e20cbaf) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `ignoreResults` option from `useMutation`. If you don't want to synchronize component state with the mutation, use `useApolloClient` to access your client instance and use `client.mutate` directly. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Unusubscribing from `ObservableQuery` while a request is in flight will no longer terminate the request by unsubscribing from the link observable. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `previousData` property on `useLazyQuery` will now change only when `data` changes. Previously `previousData` would change to the same value as `data` while the query was loading. + +- [#12224](https://github.com/apollographql/apollo-client/pull/12224) [`51e6c0f`](https://github.com/apollographql/apollo-client/commit/51e6c0f8657d20cedc570c6e9a244f877047dd61) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove deprecated `partialRefetch` option. + +- [#12407](https://github.com/apollographql/apollo-client/pull/12407) [`8b1390b`](https://github.com/apollographql/apollo-client/commit/8b1390bf0050c6bd4d5a32b67c3b96369d0552d4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Calling `refetch` with new variables will now set the `networkStatus` to `refetch` instead of `setVariables`. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `iterateObserversSafely` utility function. + +- [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Apollo Client no longer wraps errors in `ApolloError`. `ApolloError` has been replaced with separate error classes depending on the cause of the error. As such, APIs that return an `error` property have been updated to use the generic `Error` type. Use `instanceof` to check for more specific error types. + + ## Migration guide + + `ApolloError` encapsulated 4 main error properties. The type of error would determine which property was set: + + - `graphqlErrors` - Errors returned from the `errors` field by the GraphQL server + - `networkError` - Any non-GraphQL error that caused the query to fail + - `protocolErrors` - Transport-level errors that occur during [multipart HTTP subscriptions](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol) + - `clientErrors` - A space to define custom errors. Mostly unused. + + These errors were mutally exclusive, meaning both `networkError` and `graphqlErrors` were never set simultaneously. The following replaces each of these fields from `ApolloError`. + + ### `graphqlErrors` + + GraphQL errors are now encapsulated in a `CombinedGraphQLErrors` instance. You can access the raw GraphQL errors via the `errors` property. + + ```js + import { CombinedGraphQLErrors } from "@apollo/client"; + + // ... + + const { error } = useQuery(query); + + if (error && error instanceof CombinedGraphQLErrors) { + console.log(error.errors); + } + ``` + + ### `networkError` + + Network errors are no longer wrapped and are instead passed through directly. + + ```js + const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + observer.error(new Error("Test error")); + }); + }), + }); + + // ... + + const { error } = useQuery(query); + + // error is `new Error('Test error')`; + ``` + + ### `protocolErrors` + + Protocol errors are now encapsulated in a `CombinedProtocolErrors` instance. You can access the raw protocol errors via the `errors` property. + + ```js + import { CombinedProtocolErrors } from "@apollo/client"; + + // ... + + const { error } = useSubscription(subscription); + + if (error && error instanceof CombinedProtocolErrors) { + console.log(error.errors); + } + ``` + + ### `clientErrors` + + These were unused by the client and have no replacement. Any non-GraphQL or non-protocol errors are now passed through unwrapped. + + ### Strings as errors + + If the link sends a string error, Apollo Client will wrap this in an `Error` instance. This ensures `error` properties are guaranteed to be of type `Error`. + + ```js + const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + // Oops we sent a string instead of wrapping it in an `Error` + observer.error("Test error"); + }); + }), + }); + + // ... + + const { error } = useQuery(query); + + // The error string is wrapped and returned as `new Error('Test error')`; + ``` + + ### Non-error types + + If the link chain sends any other object type as an error, Apollo Client will wrap this in an `UnknownError` instance with the [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) set to the original object. This ensures `error` properties are guaranteed to be of type `Error`. + + ```js + const client = new ApolloClient({ + link: new ApolloLink(() => { + return new Observable((observer) => { + observer.error({ message: "Not a proper error type" }); + }); + }), + }); + + // ... + + const { error } = useQuery(query); + + // error is an `UnknownError` instance. error.cause returns the original object. + ``` + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromError` utility function. Use [`throwError`](https://rxjs.dev/api/index/function/throwError) instead. + +- [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `graphql`, `withQuery`, `withMutation`, `withSubscription`, and `withApollo` hoc components. Use the provided React hooks instead. + +- [#12262](https://github.com/apollographql/apollo-client/pull/12262) [`10ef733`](https://github.com/apollographql/apollo-client/commit/10ef7338cdcbbaf75d806f426e9708c9e095c2da) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `itAsync` test utility. + +- [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Updates the `ServerError` and `ServerParseError` types to be proper `Error` subclasses. Perviously these were plain `Error` intances with additional properties added at runtime. All properties are retained, but `instanceof` checks now work correctly. + + ```js + import { ServerError, ServerParseError } from "@apollo/client"; + + if (error instanceof ServerError) { + // ... + } + + if (error instanceof ServerParseError) { + // ... + } + ``` + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports SSR environments and will now throw if the `execute` function is called in SSR. If you need to run a query in an SSR environment, use `useQuery` instead. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The execute function returned from `useLazyQuery` now only supports the `context` and `variables` options. This means that passing options supported by the hook no longer override the hook value. + + To change options, rerender the component with new options. These options will take effect with the next query execution. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery` will no longer terminate on errors and will instead emit a `next` value with an `error` property. This ensures that `ObservableQuery` instances can continue to receive updates after errors are returned in requests without the need to resubscribe to the observable. + +- [#12398](https://github.com/apollographql/apollo-client/pull/12398) [`8cf5077`](https://github.com/apollographql/apollo-client/commit/8cf5077bed1ab46fdd32c5e253071506c0076064) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `throwServerError` utility function. Now that `ServerError` is an + `Error` subclass, you can throw these errors directly: + + ```js + import { ServerError } from "@apollo/client"; + + // instead of + throwServerError(response, result, "error message"); + + // Use + throw new ServerError("error message", { response, result }); + ``` + +- [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `Cache.DiffResult` type is now a union type with better type safety for both complete and partial results. Checking `diff.complete` will now narrow the type of `result` depending on whether the value is `true` or `false`. + + When `true`, `diff.result` will be a non-null value equal to the `T` generic type. When `false`, `diff.result` now reports `result` as `DeepPartial | null` indicating that fields in the result may be missing (`DeepPartial`) or empty entirely (`null`). + +- [#12396](https://github.com/apollographql/apollo-client/pull/12396) [`00f3d0a`](https://github.com/apollographql/apollo-client/commit/00f3d0a674eede1f909092283041cf8ac8d1b576) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `errors` property from the results emitted from `ObservableQuery` or returned from `client.query`. Read errors from the `error` property instead. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The result resolved from the promise returned from the execute function in `useLazyQuery` is now an `ApolloQueryResult` type and no longer includes all the fields returned from the `useLazyQuery` hook tuple. + + If you need access to the additional properties such as `called`, `refetch`, etc. not included in `ApolloQueryResult`, read them from the hook instead. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will no longer rerender with the loading state when calling the execute function the first time unless the `notifyOnNetworkStatusChange` option is set to `true` (which is the new default). + + If you prefer the behavior from 3.x, rerender the component with + `notifyOnNetworkStatusChange` set to `false` after the execute function is + called the first time. + + ```ts + function MyComponent() { + const [notifyOnNetworkStatusChange, setNotifyOnNetworkStatusChange] = + useState(true); + const [execute] = useLazyQuery(query, { notifyOnNetworkStatusChange }); + + async function runExecute() { + await execute(); + + // Set to false after the initial fetch to stop receiving notifications + // about changes to the loading states. + setNotifyOnNetworkStatusChange(false); + } + + // ... + } + ``` + +- [#12254](https://github.com/apollographql/apollo-client/pull/12254) [`0028ac0`](https://github.com/apollographql/apollo-client/commit/0028ac0147aaea9ab559f15630200a132b43da42) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the default `Accept` header to `application/graphql-response+json`. + +- [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `ObservableQuery.setVariables` will now resolve with the last emitted result instead of `undefined` when either the variables match the current variables or there are no subscribers to the query. + +- [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client now defaults to production mode, not development mode, if the + environment cannot be determined. + + In modern bundlers, this should automatically be handled by the bundler loading + the bundler with the `development` export condition. + + If neither the `production` nor the `development` export condition are + used by the bundler/runtime, Apollo Client will fall back to `globalThis.__DEV__` + to determine if it should run in production or development mode. + + Unlike Apollo Client 3 though, if `globalThis.__DEV__` is not set to `true`, + Apollo Client will now default to `production`, not to `development`, behaviour. + + This switch to _explicilty_ requiring `true` also resolves a situation where + an HTML element with `id="__DEV__"` would create a global `__DEV__` variable + with a referent to the DOM element, which in the past was picked up as "truthy" and + would have triggered development mode. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `reobserve` option is no longer available in the result returned from `useLazyQuery`. This was considered an internal API and should not be used directly. + +- [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `data` property on `ApolloQueryResult`. Previously this field was non-optional, non-null `TData`, however at runtime this value could be set to `undefined`. This field is now reported as `TData | undefined`. + + This will affect you in a handful of places: + + - The `data` property emitted from the result passed to the `next` callback from `client.watchQuery` + - Fetch-based APIs that return an `ApolloQueryResult` type such as `observableQuery.refetch`, `observableQuery.fetchMore`, etc. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The promise returned when calling the execute function from `useLazyQuery` will now reject when using an `errorPolicy` of `none` when GraphQL errors are returned from the result. + +- [#12223](https://github.com/apollographql/apollo-client/pull/12223) [`69c1cb6`](https://github.com/apollographql/apollo-client/commit/69c1cb6f831941598987185238a299b050a364bd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `subscribeAndCount` testing utility from `@apollo/client/testing`. + +- [#12300](https://github.com/apollographql/apollo-client/pull/12300) [`4d581e4`](https://github.com/apollographql/apollo-client/commit/4d581e4f5a3c5409e5f06a5f164beabdada150f1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Moves all React-related exports to the `@apollo/client/react` entrypoint and out of the main `@apollo/client` entrypoint. This prevents the need to install React in order to use the core client. + + The following is a list of exports available in `@apollo/client` that should now import from `@apollo/client/react`. + + - `ApolloConsumer` + - `ApolloProvider` + - `createQueryPreloader` + - `getApolloContext` + - `skipToken` + - `useApolloClient` + - `useBackgroundQuery` + - `useFragment` + - `useLazyQuery` + - `useLoadableQuery` + - `useMutation` + - `useQuery` + - `useQueryRefHandlers` + - `useReactiveVar` + - `useReadQuery` + - `useSubscription` + - `useSuspenseQuery` + + The following is a list of exports available in `@apollo/client/testing` that should now import from `@apollo/client/testing/react`: + + - `MockedProvider` + +- [#12428](https://github.com/apollographql/apollo-client/pull/12428) [`abed922`](https://github.com/apollographql/apollo-client/commit/abed92225fd2a5d2a0a2298893a1170df1cd7400) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes the `urql` multipart subscriptions utilities. Use the native multipart subscriptions support in `urql` instead. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Switch to [RxJS](https://rxjs.dev/) as the observable implementation. `rxjs` is now a peer dependency of Apollo Client which means you will now need to install `rxjs` in addition to `@apollo/client`. + + This change is mostly transparent, however transforming values on observables, common in link implementations, differs in RxJS vs `zen-observable`. For example, you could modify values in the link chain emitted from a downstream link by using the `.map` function. In RxJS, this is done with the `.pipe` function and passing a `map` operator instead. + + ```ts + import { map } from "rxjs"; + + const link new ApolloLink((operation, forward) => { + return forward(operation).pipe( + map((result) => performTransform(result)) + ); + }); + ``` + + For a full list of operators and comprehensive documentation on the capabilities of RxJS, check out the [documentation](https://rxjs.dev/). + +- [#12329](https://github.com/apollographql/apollo-client/pull/12329) [`61febe4`](https://github.com/apollographql/apollo-client/commit/61febe4ef8712a2035d7ac89ea7283138db5229d) Thanks [@phryneas](https://github.com/phryneas)! - Rework package publish format (#12329, #12382) + + We have reworked the way Apollo Client is packaged. + + - shipping ESM and CJS + - fixing up source maps + - the build targets a modern runtime environment (browserslist query: `"since 2023, node >= 20, not dead"`) + - removed the "proxy directory" `package.json` files, e.g. `cache/core/package.json` and `react/package.json`. While these helped with older build tools, modern build tooling uses the `exports` field in the root `package.json` instead and the presence of these files can confuse modern build tooling. If your build tooling still relies on those, please update your imports to import from e.g. `@apollo/client/cache/core/index.js` instead of `@apollo/client/cache/core` - but generally, this should not be necessary. + - added an `exports` field to `package.json` to expose entry points + - instead of `globalThis.__DEV__`, Apollo Client now primarily relies on the `development` and `production` exports conditions. It falls back to `globalThis.__DEV__` if the bundler doesn't know these, though. + +- [#12397](https://github.com/apollographql/apollo-client/pull/12397) [`2545a54`](https://github.com/apollographql/apollo-client/commit/2545a5415b06283be83eb9c4a03a3a8a39b8bcde) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `ObservableQuery.resetQueryStoreErrors` method. This method reset some internal state that was not consumed elsewhere in the client and resulted in a no-op. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `fromPromise` utility function. Use [`from`](https://rxjs.dev/api/index/function/from) instead. + +- [#12388](https://github.com/apollographql/apollo-client/pull/12388) [`0d825be`](https://github.com/apollographql/apollo-client/commit/0d825bef533b41f2e99ef22e620d9f9472825057) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Require environments that support `WeakMap`, `WeakSet` and symbols. Apollo Client would fallback to `Map` and `Set` if the weak versions were not available. This has been removed and expects that these features are available in the source environment. + + If you are running in an environment without `WeakMap`, `WeakSet` or symbols, you will need to find appropriate polyfills. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports calling the execute function in render and will now throw. If you need to execute the query immediately, use `useQuery` instead or move the call to a `useEffect`. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - The `defaultOptions` and `initialFetchPolicy` options are no longer supported with `useLazyQuery`. + + If you use `defaultOptions`, pass those options directly to the hook instead. If you use `initialFetchPolicy`, use `fetchPolicy` instead. + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` no longer supports `variables` in the hook options and therefore no longer performs variable merging. The execute function must now be called with `variables` instead. + + ```ts + function MyComponent() { + const [execute] = useLazyQuery(query); + + function runExecute() { + execute({ variables: { ... }}); + } + } + ``` + + This change means the execute function returned from `useLazyQuery` is more type-safe. The execute function will require you to pass a `variables` option if the query type includes required variables. + +- [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` + + `cache.diff` now returns `null` instead of an empty object (`{}`) when `returnPartialData` is `true` and the result is empty. + + If you use `cache.diff` directly with `returnPartialData: true`, you will need to check for `null` before accessing any other fields on the `result` property. A non-null value indicates that at least one field was present in the cache for the given query document. + + ### Changes for third-party cache implementations + + The client now expects `cache.diff` to return `null` instead of an empty object when there is no data that can be fulfilled from the cache and `returnPartialData` is `true`. If your cache implementation returns an empty object, please update this to return `null`. + +- [#12430](https://github.com/apollographql/apollo-client/pull/12430) [`2ff66d0`](https://github.com/apollographql/apollo-client/commit/2ff66d06b6d444fbcb46e580ac40e673e695740f) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Removes `ObservableQuery.result()` method. If you use this method and need similar functionality, use the `firstValueFrom` helper in RxJS. + + ```ts + import { firstValueFrom, from } from "rxjs"; + + // The `from` is necessary to turn `observableQuery` into an RxJS observable + const result = await firstValueFrom(from(observableQuery)); + ``` + +- [#12359](https://github.com/apollographql/apollo-client/pull/12359) [`ebb4d96`](https://github.com/apollographql/apollo-client/commit/ebb4d9644104244fb066b93a32df778928f2f8a9) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the `onCompleted` and `onError` callbacks from `useQuery` and `useLazyQuery`. + + See [#12352](https://github.com/apollographql/apollo-client/issues/12352) for more context on this change. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Subscriptions are no longer eagerly started after calling `client.subscribe`. To kick off the subscription, you will now need to subscribe to the returned observable. + + ```ts + // Subscriptions are no longer started when calling subscribe on its own. + const subscriptionObservable = client.subscribe(...); + + // Instead, subscribe to the returned observable to kick off the subscription. + subscriptionObservable.subscribe({ + next: (value) => console.log(value) + }); + ``` + +- [#12367](https://github.com/apollographql/apollo-client/pull/12367) [`e6af35e`](https://github.com/apollographql/apollo-client/commit/e6af35ed30c732ad834e6c524bc9ce5adbe5f706) Thanks [@jerelmiller](https://github.com/jerelmiller)! - `useLazyQuery` will now only execute the query when the execute function is called. Previously `useLazyQuery` would behave like `useQuery` after the first call to the execute function which means changes to options might perform network requests. + + You can now safely rerender `useLazyQuery` with new options which will take effect the next time you manually trigger the query. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove `toPromise` utility function. Use [`firstValueFrom`](https://rxjs.dev/api/index/function/firstValueFrom) instead. + +- [#12304](https://github.com/apollographql/apollo-client/pull/12304) [`86469a2`](https://github.com/apollographql/apollo-client/commit/86469a25abb72dbd68adff3554e3909036e77eee) Thanks [@jerelmiller](https://github.com/jerelmiller)! - ### Changes for users of `InMemoryCache` + + `cache.diff` no longer throws when `returnPartialData` is set to `false` without a complete result. Instead, `cache.diff` will return `null` when it is unable to read a full cache result. + + If you use `cache.diff` directly with `returnPartialData: false`, remove the `try`/`catch` block and replace with a check for `null`. + + ### Changes for third-party cache implementations + + The client now expects `cache.diff` to return `null` instead of throwing when the cache returns an incomplete result and `returnPartialData` is `false`. The internal `try`/`catch` blocks have been removed around `cache.diff`. If your cache implementation throws for incomplete results, please update this to return `null`. + +- [#12211](https://github.com/apollographql/apollo-client/pull/12211) [`c2736db`](https://github.com/apollographql/apollo-client/commit/c2736db3ad6f8b6e56f065682d5b76614f41bfd4) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Remove the deprecated `Query`, `Mutation`, and `Subscription` components. Use the provided React hooks instead. + +### Minor Changes + +- [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - Apollo Client is no longer using `ts-invariant`, but ships with a modified variant of it. + + The existing export `setLogVerbosity` from `@apollo/client` is still available and + now points to this new integration. + **In most cases, you should be using this export.** + It will no longer adjust the verbosity of `ts-invariant` and as such no longer + influence other packages relying on `ts-invariant`. + + The new entry point `@apollo/client/utilities/invariant` now exports `invariant`, + `InvariantError` and `setVerbosity`. + (Note that these tools are mostly meant to be used by Apollo Client and libraries directly + based on Apollo Client like the `@apollo/client-integration-*` packages.) + +- [#12333](https://github.com/apollographql/apollo-client/pull/12333) [`3e4beaa`](https://github.com/apollographql/apollo-client/commit/3e4beaa8b768a893da80aae0428f79ee01d6aa38) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Deprecate the `partial` flag on `ApolloQueryResult` and make it a non-optional property. Previously `partial` was only set conditionally if the result emitted was partial. This value is now available with all results that return an `ApolloQueryResult`. + +### Patch Changes + +- [#12291](https://github.com/apollographql/apollo-client/pull/12291) [`ae5d06a`](https://github.com/apollographql/apollo-client/commit/ae5d06ac45ca6584d3c79aa417dae22f37a7d3b6) Thanks [@phryneas](https://github.com/phryneas)! - Remove deprecated `resetApolloContext` export + +- [#12402](https://github.com/apollographql/apollo-client/pull/12402) [`903c3ef`](https://github.com/apollographql/apollo-client/commit/903c3ef9f77280492c298b4d8e5f96f110e3cda1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Use an an empty object (`{}`) rather than an object with `null` prototype (`Object.create(null)`) in all areas that instantiate objects. + +- [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - \* dropped the deprecated `DEV` export from `@apollo/client/utilities` and `@apollo/client/utilities/globals` + + - moved the `__DEV__` export from `@apollo/client/utilities/globals` to `@apollo/client/utilities/environment` + - moved the `invariant`, `newInvariantError` and `InvariantError` exports from `@apollo/client/utilities/globals` to `@apollo/client/utilities/invariant` + +- [#12432](https://github.com/apollographql/apollo-client/pull/12432) [`c7c2f61`](https://github.com/apollographql/apollo-client/commit/c7c2f6122c874eed16d5621be26992f86d9756eb) Thanks [@phryneas](https://github.com/phryneas)! - ObservableQuery: implement the `rxjs` `InteropObservable` interface to ensure `from(observableQuery)` stays possible + +- [#12385](https://github.com/apollographql/apollo-client/pull/12385) [`cad5117`](https://github.com/apollographql/apollo-client/commit/cad511723a1b8b0ac2042cf49435f7affb0dc4e4) Thanks [@phryneas](https://github.com/phryneas)! - `@apollo/client`, `@apollo/client/core` and `@apollo/client/cache` no longer export an empty `Cache` runtime object. This is meant to be a type-only namespace. + +- [#12384](https://github.com/apollographql/apollo-client/pull/12384) [`6aa6fd3`](https://github.com/apollographql/apollo-client/commit/6aa6fd316cfdb31ebbe3e3133cca2965604e7ca1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Don't emit a partial cache result from `cache-only` queries when `returnPartialData` is `false`. + ## 3.14.0 ### Minor Changes diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000000..ee917ff7010 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,139 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Apollo Client Overview + +Apollo Client is a comprehensive caching GraphQL client for TypeScript/JavaScript. The project is maintained at version 4.x.x and uses a monorepo structure with npm workspaces. + +## Common Development Commands + +### Build Commands + +- `npm run build` - Build the entire project +- `npm run build -w codegen` - Build specific workspace (e.g., codegen) + +### Testing Commands + +- `npm test` - Run all tests with Jest +- `npm run test:type-benches` - Run type benchmarks +- `npm run test:memory` - Run memory tests + +### Code Quality Commands + +- `npm run typecheck` - Run TypeScript type checking +- `npm run lint` - Run ESLint with extended rules +- `npm run format` - Format code with Prettier +- `npm run check:format` - Check if code is formatted correctly +- `npm run knip` - Check for unused files/exports +- `npm run madge` - Check for circular dependencies + +### Documentation & API + +- `npm run extract-api` - Generate API documentation +- `npm run typedoc` - Generate TypeDoc documentation +- `npm run docmodel` - Generate API documentation model + +### Release & Publishing + +- `npx changeset` - Create a changeset for your changes + +## High-Level Architecture + +### Core Modules + +1. **Core (`src/core/`)** - Main Apollo Client implementation + + - `ApolloClient.ts` - Main client class + - `ObservableQuery.ts` - Observable query implementation + - `QueryManager.ts` - Query lifecycle management + +2. **Cache (`src/cache/`)** - Caching layer + + - `inmemory/` - InMemoryCache implementation (default cache) + - `core/` - Base cache abstractions + +3. **Link (`src/link/`)** - Network layer abstraction + + - `http/` - HTTP link for GraphQL over HTTP + - `batch/` - Batch link for combining queries + - `error/` - Error handling link + - `schema/` - Schema link for local execution + - `ws/` - WebSocket link for subscriptions + +4. **React Integration (`src/react/`)** - React hooks and components + + - `hooks/` - React hooks (useQuery, useMutation, etc.) + - `ssr/` - Server-side rendering support + - `context/` - React context providers + +5. **Utilities (`src/utilities/`)** - Shared utilities + + - `graphql/` - GraphQL document utilities + - `internal/` - Internal utilities + - `invariant/` - Error handling utilities + +6. **Testing (`src/testing/`)** - Testing utilities + + - `core/` - Core testing utilities + - `react/` - React testing utilities (MockedProvider) + +7. **Masking (`src/masking/`)** - Data masking for fragment colocation + +8. **Local State (`src/local-state/`)** - Local state management + +### TypeScript Configuration + +- Uses TypeScript 5.7.3 with strict mode enabled +- Module resolution: NodeNext +- Target: ESNext +- Separate tsconfig files for different purposes: + - `tsconfig.json` - Main configuration + - `tsconfig.build.json` - Build configuration + - `tsconfig.tests.json` - Test configuration + +### Testing Infrastructure + +- Jest with ts-jest for testing +- Custom test environment extending jsdom +- React Testing Library for React component tests +- Multiple React version testing (17, 18, 19) +- Coverage reporting with lcov + +### Build System + +- Uses custom build script (`config/build.ts`) +- API Extractor for API documentation +- Size limit checking for bundle size +- Source map verification +- Publint for package publishing validation + +### Code Organization Patterns + +1. **Exports** - All public exports go through index files +2. **Internal APIs** - Use `@apollo/client/*/internal` paths +3. **Environment-specific builds** - Production/development variants +4. **Type safety** - Heavy use of TypeScript generics and type inference +5. **Reactive programming** - Uses RxJS for observables +6. **Immutability** - Emphasizes immutable data structures + +### Contributing Guidelines + +- All changes require a changeset (`npx changeset`) +- PRs should include tests for bug fixes +- Follow existing code style (enforced by ESLint/Prettier) +- Large features need design discussion first +- Code review required from core contributors + +### Important Notes + +- This is a monorepo with workspaces: main package, codegen, and codemods +- The project is currently at version 4.x.x (release candidate) +- Supports multiple peer dependencies (React 17/18/19, GraphQL 16) +- Uses patch-package for dependency patches +- Has extensive CI checks that must pass before merging + +## Additional Instructions + +@.claude/documentation.md +@.claude/hooks.md diff --git a/COLLABORATORS.md b/COLLABORATORS.md index 95ae4295c22..e0573721c09 100644 --- a/COLLABORATORS.md +++ b/COLLABORATORS.md @@ -15,8 +15,8 @@ Thanks for helping make Apollo OSS better! Here are a few quick repo maintenance ## Pull Requests -* Ensure PR’s have tests (when it makes sense, which is almost always). -* Make sure `CHANGELOG`’s are updated/maintained. Either request that the PR author adds a `CHANGELOG` entry, or add one yourself. Make sure the PR is referenced along with their GitHub username, and link to their profile (to give them extra kudos). -* Don’t forget to consider how a PR you’re merging will affect the docs; either ask contributors for docs changes, open a new issue to track outstanding changes, or consider implementing the docs changes yourself. -* Always think about backwards compatibility; please don’t merge PR’s that require major version bumps, unless talking it over with the core team. -* If the PR has a small number of commits, or a large number of semantically unimportant commits, squash and merge the PR. If the PR commits are well thought out, isolated and would add value to the git history if kept separate, do a merge commit. +- Ensure PR’s have tests (when it makes sense, which is almost always). +- Make sure `CHANGELOG`’s are updated/maintained. Either request that the PR author adds a `CHANGELOG` entry, or add one yourself. Make sure the PR is referenced along with their GitHub username, and link to their profile (to give them extra kudos). +- Don’t forget to consider how a PR you’re merging will affect the docs; either ask contributors for docs changes, open a new issue to track outstanding changes, or consider implementing the docs changes yourself. +- Always think about backwards compatibility; please don’t merge PR’s that require major version bumps, unless talking it over with the core team. +- If the PR has a small number of commits, or a large number of semantically unimportant commits, squash and merge the PR. If the PR commits are well thought out, isolated and would add value to the git history if kept separate, do a merge commit. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22afe337585..1d069c52323 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,7 +56,7 @@ For a small bug fix change (less than 20 lines of code changed), feel free to op ### Suggesting features -Most of the features in Apollo Client came from suggestions by you, the community! We welcome any ideas about how to make Apollo better for your use case. Head on over to the [Apollo Client Feature Request repo](https://github.com/apollographql/apollo-feature-requests), and open up a new feature request / discussion issue with your details. +Most of the features in Apollo Client came from suggestions by you, the community! We welcome any ideas about how to make Apollo better for your use case. Head on over to the [Apollo Client Feature Request repo](https://github.com/apollographql/apollo-feature-requests), and open up a new feature request / discussion issue with your details. **Note:** Feature requests and non-bug related discussions are no longer managed in this repo's issue tracker. Feature request and/or discussions opened here will be closed. @@ -117,14 +117,14 @@ npm run test:watch Call jest directly making sure to pass in the jest config, and use its `testRegex` option: ``` -jest --config ./config/jest.config.js --testRegex __tests__/useQuery.test.tsx +jest --config ./config/jest.config.ts --testRegex __tests__/useQuery.test.tsx ``` ### Wiring a checkout into an application It can be useful to link an Apollo Client checkout into an application, to test how Apollo Client development changes impact a real app. We'll use the [Apollo fullstack tutorial application](https://github.com/apollographql/fullstack-tutorial) to demonstrate this. -1) Clone and install Apollo Client. +1. Clone and install Apollo Client. ``` git clone https://github.com/apollographql/apollo-client.git @@ -135,7 +135,7 @@ cd .. > From this point forward `[apollo-client-root]` represents the root directory of your Apollo Client checkout (e.g. `/some/path/apollo-client`). -2) Clone and install the fullstack tutorial. +2. Clone and install the fullstack tutorial. ``` git clone https://github.com/apollographql/fullstack-tutorial.git @@ -148,7 +148,7 @@ npm i > From this point forward `[fullstack-tutorial-root]` represents the root directory of your Fullstack Tutorial checkout (e.g. `/some/path/fullstack-tutorial`). -3) Link the application's `@apollo/client` package to your Apollo Client checkout's compiled files. +3. Link the application's `@apollo/client` package to your Apollo Client checkout's compiled files. ``` # ... assuming still in [fullstack-tutorial-root]/final/client from step 2 @@ -157,7 +157,7 @@ rm -Rf ./client ln -s [apollo-client-root]/dist client ``` -4) If using React, prevent a duplicate React version lookup error by telling your application to use Apollo Client's React version. +4. If using React, prevent a duplicate React version lookup error by telling your application to use Apollo Client's React version. ``` # ... assuming still in [fullstack-tutorial-root]/final/client/node_modules/@apollo from step 3 @@ -167,7 +167,7 @@ ln -s [apollo-client-root]/node_modules/react ln -s [apollo-client-root]/node_modules/react-dom ``` -5) Start the fullstack tutorial. +5. Start the fullstack tutorial. Server: @@ -185,7 +185,7 @@ cd [fullstack-tutorial-root]/final/client npm start ``` -6) Start building Apollo Client and watching for file changes. +6. Start building Apollo Client and watching for file changes. ``` # ... in a separate terminal window @@ -193,7 +193,7 @@ cd [apollo-client-root] npm run watch ``` -7) Verify Apollo Client changes show up in the fullstack tutorial. +7. Verify Apollo Client changes show up in the fullstack tutorial. ``` # ... assuming still in [apollo-client-root] from step 6 diff --git a/README.md b/README.md index 5b287eaf3dc..31a74c7e72c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Apollo Logo

Apollo Client

- + **The industry-leading GraphQL client for TypeScript, JavaScript, React, Vue, Angular, and more.** Apollo Client delivers powerful caching, intuitive APIs, and comprehensive developer tools to accelerate your app development. ➡️ [**Get Started with Apollo Client →**](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) @@ -17,55 +17,59 @@ ## ❓ Why Choose Apollo Client? - ✅ Zero-config caching - Intelligent caching out of the box
- ✅ Framework agnostic - Works with React, Vue, Angular, Svelte, and vanilla JavaScript
- ✅ TypeScript-first - Full type safety and IntelliSense support
- ✅ React 19 ready - Supports Suspense, RSC, Compiler, and more
- ✅ Production-tested - Powers countless apps worldwide that serve millions of end users
- - ## 🚀 Quick Start - +✅ Zero-config caching - Intelligent caching out of the box
+✅ Framework agnostic - Works with React, Vue, Angular, Svelte, and vanilla JavaScript
+✅ TypeScript-first - Full type safety and IntelliSense support
+✅ React 19 ready - Supports Suspense, RSC, Compiler, and more
+✅ Production-tested - Powers countless apps worldwide that serve millions of end users
+ +## 🚀 Quick Start + ```sh npm install @apollo/client graphql ``` ## 💡 Resources -| Resource | Description | Link | -| ----- | ----- | ----- | -| **Getting Started Guide** | Complete setup and first query | [Start Here →](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | -| **Full Documentation** | Comprehensive guides and examples | [Read Docs →](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | -| **API Reference** | Complete API documentation | [Browse API →](https://www.apollographql.com/docs/react/api/apollo-client?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | -| **VS Code Extension** | Enhanced development experience | [Install Extension →](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) | -| **DevTools** | Debug your GraphQL apps | [Chrome](https://chrome.google.com/webstore/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm) \| [Firefox](https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/) | -| **Free Course** | Learn GraphQL and Apollo Client | [Take Course →](https://odyssey.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | +| Resource | Description | Link | +| ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Getting Started Guide** | Complete setup and first query | [Start Here →](https://www.apollographql.com/docs/react/get-started?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | +| **Full Documentation** | Comprehensive guides and examples | [Read Docs →](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | +| **API Reference** | Complete API documentation | [Browse API →](https://www.apollographql.com/docs/react/api/apollo-client?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | +| **VS Code Extension** | Enhanced development experience | [Install Extension →](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) | +| **DevTools** | Debug your GraphQL apps | [Chrome](https://chrome.google.com/webstore/detail/apollo-client-devtools/jdkknkkbebbapilgoeccciglkfbmbnfm) \| [Firefox](https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/) | +| **Free Course** | Learn GraphQL and Apollo Client | [Take Course →](https://odyssey.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) | ## 💬 Get Support **Need help?** We're here for you: -* [**Community Forum**](https://community.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Q\&A and discussions -* [**GraphQL Discord**](https://discord.graphql.org) \- Real-time chat with the community +- [**Community Forum**](https://community.apollographql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Q\&A and discussions +- [**GraphQL Discord**](https://discord.graphql.org) \- Real-time chat with the community -## 🧑‍🚀 About Apollo +## 🧑‍🚀 About Apollo Deliver tomorrow's roadmap today with our comprehensive suite of API orchestration tools: -* [**Apollo Client**](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Type-safe apps with GraphQL-powered on-device caching ([React](https://www.apollographql.com/docs/react?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [iOS](https://www.apollographql.com/docs/ios?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [Kotlin](https://www.apollographql.com/docs/kotlin?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) -* [**Apollo Connectors**](https://www.apollographql.com/graphos/apollo-connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint -* [**Apollo MCP Server**](https://www.apollographql.com/apollo-mcp-server?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- AI needs APIs. The fastest way to ship reliable AI experiences -* [**Apollo Router**](https://www.apollographql.com/docs/router?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Scale your APIs seamlessly with GraphQL Federation, Security, Auth, and more -* [**GraphOS**](https://www.apollographql.com/graphos?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Deploy, manage, govern, and explore your APIs ([start for free, no credit card needed](https://www.apollographql.com/pricing?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) +- [**Apollo Client**](https://www.apollographql.com/docs/react?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Type-safe apps with GraphQL-powered on-device caching ([React](https://www.apollographql.com/docs/react?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [iOS](https://www.apollographql.com/docs/ios?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme), [Kotlin](https://www.apollographql.com/docs/kotlin?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) +- [**Apollo Connectors**](https://www.apollographql.com/graphos/apollo-connectors?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Compose all your GraphQL and REST APIs into one GraphQL endpoint +- [**Apollo MCP Server**](https://www.apollographql.com/apollo-mcp-server?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- AI needs APIs. The fastest way to ship reliable AI experiences +- [**Apollo Router**](https://www.apollographql.com/docs/router?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Scale your APIs seamlessly with GraphQL Federation, Security, Auth, and more +- [**GraphOS**](https://www.apollographql.com/graphos?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) \- Deploy, manage, govern, and explore your APIs ([start for free, no credit card needed](https://www.apollographql.com/pricing?utm_medium=github&utm_source=apollographql_apollo-client&utm_campaign=readme)) [**Explore the Complete Apollo Platform →**](https://www.apollographql.com/?utm_source=github&utm_medium=apollographql-_apollo-client&utm_campaign=readme) ## 🛠️ Maintained by -|Name|Username| -|---|---| -|Jeff Auriemma|[@bignimbus](https://github.com/bignimbus)| -|Jerel Miller|[@jerelmiller](https://github.com/jerelmiller)| -|Lenz Weber-Tronic|[@phryneas](https://github.com/phryneas)| +| Name | Username | +| ----------------- | ---------------------------------------------- | +| Jeff Auriemma | [@bignimbus](https://github.com/bignimbus) | +| Jerel Miller | [@jerelmiller](https://github.com/jerelmiller) | +| Lenz Weber-Tronic | [@phryneas](https://github.com/phryneas) | + +## Versioning Policy + +While Apollo Client follows SemVer, it might introduce changes like changing transpilation targets, updating dependencies or dropping support for older versions of dependencies in minor releases. For more details, see our [Versioning Policy](./VERSIONING_POLICY.md). ## 🗺️ Roadmap @@ -73,27 +77,27 @@ We regularly update our [public roadmap](https://github.com/apollographql/apollo ## 📣 Tell us what you think -| ☑️ Apollo Client User Survey | -| :----- | +| ☑️ Apollo Client User Survey | +| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. | ## 🗓️ Events -Join these live events to meet other GraphQL users and learn more: +Join these live events to meet other GraphQL users and learn more: -🎪 [**GraphQL Summit 2025**](https://summit.graphql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) - Oct 6-8, 2025 • San Francisco - *1000+ engineers, talks, workshops, and office hours* +🎪 [**GraphQL Summit 2025**](https://summit.graphql.com?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) +Oct 6-8, 2025 • San Francisco +_1000+ engineers, talks, workshops, and office hours_ 🌟 [**GraphQLConf 2025**](https://graphql.org/conf/2025) - Sep 8-10, 2025 • Amsterdam - *Celebrating 10 Years of GraphQL* +Sep 8-10, 2025 • Amsterdam +_Celebrating 10 Years of GraphQL_ [**View All Events →**](https://www.apollographql.com/events?utm_source=github&utm_medium=apollographql_apollo-client&utm_campaign=readme) ## 🏆 Contributing -Thank you for your interest in submitting a Pull Request to Apollo Client! Read our [guidelines](https://github.com/apollographql/apollo-client/blob/main/CONTRIBUTING.md) first, and don't hesitate to get in touch. +Thank you for your interest in submitting a Pull Request to Apollo Client! Read our [guidelines](https://github.com/apollographql/apollo-client/blob/main/CONTRIBUTING.md) first, and don't hesitate to get in touch. **New to open source?** Check out our [**Good First Issues**](https://github.com/apollographql/apollo-client/issues?q=is%3Aopen%20label%3A%22%3Abooks%3A%20good-first-issue%22) to get started. @@ -103,4 +107,4 @@ Please read our [Code of Conduct](https://community.apollographql.com/faq). This ## 🪪 License -Source code in this repository is available under the terms of the MIT License. Read the full text [here](https://github.com/apollographql/apollo-client/blob/main/LICENSE). +Source code in this repository is available under the terms of the MIT License. Read the full text [here](https://github.com/apollographql/apollo-client/blob/main/LICENSE). diff --git a/ROADMAP.md b/ROADMAP.md index c7bc37e3f12..20d94a5c926 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,6 +18,7 @@ For up to date release notes, refer to the project's [Changelog](https://github. ### Apollo Client #### 3.14.0 - August 21st, 2025 + _Release candidate - July 7th, 2025_ - 4.0 compatibility release/deprecations @@ -25,6 +26,7 @@ _Release candidate - July 7th, 2025_ To be released together with 4.0. #### [4.0.0](https://github.com/apollographql/apollo-client/milestone/31) - August 21st, 2025 + _Release candidate - June 18th 2025_ ### GraphQL Testing Library @@ -55,7 +57,9 @@ _These changes will take longer than anticipated due to prioritization on Apollo - Add compatibility for 4.0 **TanStack Start** + - Support for Apollo Client Streaming in TanStack Router - will stay alpha **React Router** + - Support for Apollo Client Streaming in React Router 7 - will stay alpha diff --git a/VERSIONING_POLICY.md b/VERSIONING_POLICY.md new file mode 100644 index 00000000000..58bcc62b156 --- /dev/null +++ b/VERSIONING_POLICY.md @@ -0,0 +1,93 @@ +# Apollo Client Versioning Policy + +Apollo Client tries to follow SemVer versioning. + +However, we reserve the right to change transpilation targets, drop polyfills or update required dependencies. These changes will be released in minor versions. +This is to ensure that Apollo Client can take advantage of the latest JavaScript features, performance improvements, and security fixes. + +This document outlines the versioning strategy for Apollo Client's dependencies. + +## Syntax transpilation target + +The current transpilation target for Apollo Client is `@babel/preset-env` with the `browserlist` target `since 2023, node >= 20, not dead`. + +That means Apollo Client supports the following environments and their derivatives: + +| Environment | Version | +| ---------------- | ------- | +| Chrome | 97+ | +| Firefox | 96+ | +| Edge | 97+ | +| Safari | 15.4+ | +| Opera | 83+ | +| Samsung Internet | 17+ | +| Node.js | 20+ | + +Using Apollo Client in different environments may require you to transpile the syntax using a lower version, or polyfilling missing APIs. + +We reserve the right to update the transpilation target in minor releases, but we commit to always include at least two years of browser support and the officially supported Node.js versions in the target. + +## Language features + +Apollo Client might start using new APIs and language features that are considered ["Baseline: Widely available"](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility) by MDN. Usage of new language features will be released in a new minor version. + +### Non-polyfillable, non-transpilable language features + +We try to avoid new features that cannot be transpiled or polyfilled. + +However, we consider the following features to be supported widely enough that Apollo Client can use them at any time without considering it a major breaking change. + +- [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) (already used in Apollo Client) +- [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) (already used in Apollo Client) +- [`WeakRef`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef) (already used by dependencies) +- [`FinalizationRegistry`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry) (already used by dependencies) +- [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) + +> [!NOTE] +> Not all of the these features are currently used at this time. Usage of these features might fluctuate between minor versions. + +## TypeScript types + +We reserve the right to update TypeScript types as needed, such as to fix bugs, align types with actual runtime behavior or add compatibility with changes in upcoming TypeScript versions. +Updates to types might requires changes to your application, and while we are careful to keep such changes to a minimum, we do not consider these breaking changes in the sense of SemVer. + +## Dependencies + +### TypeScript + +We make an effort to only use TypeScript features that have been available as stable for at least one year. This generally means we support the [last four minor versions](https://github.com/microsoft/TypeScript/wiki/TypeScript%27s-Release-Process#how-often-does-typescript-release) of TypeScript. If you use a TypeScript version older than these, you might experience some type compatibility issues with Apollo Client. + +> Note that this is a shorter support window than [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window). + +However, we reserve the right to use newer syntax in new features, in a way that doesn't break compilation with older TypeScript versions. These new features might not be available to consumers on older TypeScript versions. + +### React + +We aim to support, at minimum, the latest two major versions of React. +Some Apollo Client features might require the latest major version of React and won't be available to consumers on older React versions (e.g. `useSuspenseQuery` which relies on React Suspense). + +We will note when such a case occurs so that you understand when a feature requires a specific React version. + +> Please note that the React team almost never backports bugfixes to older major versions. From time to time, you might encounter bugs when using Apollo Client caused by React itself that are fixed in recent React versions, but are unavailable in older major versions. We strongly recommend you keep up-to-date with the latest React version. + +### React Native + +We try to support, at minimum, the latest version of React Native. Note that React Native relies on many polyfills that might differ from the implementations of other platforms. Some polyfills might also be missing. + +Where possible, we try to avoid using APIs that are not available in React Native. +If an API is not available, we will try to provide workarounds using the [`react-native` exports condition](https://reactnative.dev/blog/2023/06/21/package-exports-support#the-new-react-native-condition). + +### The `graphql` package + +We commit to supporting the latest major version of the `graphql` package, with a grace period of at least one year before we drop support for older versions. + +Within a `graphql` major, we only guarantee compatibility with the latest minor version. We strongly encourage consumers to regularly update the `graphql` package to get the latest bugfixes and features. + +### Other dependencies + +We reserve the right to update dependencies in minor releases of Apollo Client, as well as dropping support for older versions of dependencies. + +### Peer dependencies + +The rules stated above apply to peer dependencies as well. Peer dependencies can be updated in minor releases, just like regular dependencies. +However, we do commit to not adding new peer depenencies during the lifetime of a major - but if an existing peer dependency is renamed, we might follow that rename in a minor release. diff --git a/api-extractor.json b/api-extractor.json index d026e304ed8..d38d4cb26f9 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -4,8 +4,8 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "projectFolder": ".", - "mainEntryPointFilePath": "/dist/index.d.ts", - "bundledPackages": [], + "mainEntryPointFilePath": "/dist/core/index.d.ts", + "bundledPackages": ["@apollo/client"], "newlineKind": "lf", "enumMemberOrder": "preserve", diff --git a/codegen/CHANGELOG.md b/codegen/CHANGELOG.md new file mode 100644 index 00000000000..fdb17fd8af8 --- /dev/null +++ b/codegen/CHANGELOG.md @@ -0,0 +1,69 @@ +# @apollo/client-graphql-codegen + +## 1.0.0-rc.0 + +### Major Changes + +- [#12723](https://github.com/apollographql/apollo-client/pull/12723) [`1f9ed72`](https://github.com/apollographql/apollo-client/commit/1f9ed7200a249676e3efec6b61814376f47ce596) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Version bump only for codegen to release as `rc`. + +## 1.0.0-alpha.0 + +### Major Changes + +- [#12617](https://github.com/apollographql/apollo-client/pull/12617) [`ea633a1`](https://github.com/apollographql/apollo-client/commit/ea633a110b7ffa138a33f68a0b41b0437aee61d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduce a new GraphQL Codegen plugin aimed at creating resolver types for `LocalState`. This plugin is similar to `@graphql-codegen/typescript-resolvers` but tailored to provide types that work with `LocalState`. + + To use the plugin, install `@apollo/client-graphql-codegen` and add the following to your codegen config: + + ```ts + // codegen.ts + + const config: CodegenConfig = { + // ... + generates: { + "./path/to/local/resolvers.ts": { + schema: ["./path/to/localSchema.graphql"], + plugins: ["typescript", "@apollo/client-graphql-codegen/local-state"], + // ... + }, + }, + }; + ``` + + This will generate a `Resolvers` type in the generated file that can be used to provide type information to `LocalState`. + + ```ts + import type { Resolvers } from "./path/to/resolvers-types.ts"; + + const localState = new LocalState({ + // ... + }); + ``` + + It is also recommended to add the following config: + + ```ts + // codegen.ts + import type { LocalStatePluginConfig } from "@apollo/client-graphql-codegen/local-state"; + + const config: CodegenConfig = { + // ... + generates: { + "./path/to/local/resolvers.ts": { + config: { + // Ensures you return a `__typename` for any `@client` fields that + // return object or array types + nonOptionalTypename: true, + + // Required if your localSchema extends existing schema types. + baseTypesPath: "./relative/path/to/base/schema/types", + + // If you provide a `context` function to customize the context value, + // provide the path or type here. + contextType: "./path/to/contextValue#ContextValue", + } satisfies LocalStatePluginConfig, + }, + }, + }; + ``` + + NOTE: It is recommended that the schema file passed to the `schema` option is your local schema, not your entire app schema in order to only generate resolver types for your local fields, otherwise the plugin will generate resolver types for your entire remote schema as well. diff --git a/codegen/local-state/config.ts b/codegen/local-state/config.ts new file mode 100644 index 00000000000..156c28cda7b --- /dev/null +++ b/codegen/local-state/config.ts @@ -0,0 +1,415 @@ +/** + * Adapted from + * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/config.ts + * + * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Dotan Simha + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +import type { + AvoidOptionalsConfig, + RawConfig, +} from "@graphql-codegen/visitor-plugin-common"; + +/** + * This plugin generates TypeScript signature for `resolve` functions of your GraphQL API. + * You can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers). + * + * You can find a blog post explaining the usage of this plugin here: https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen + */ +export interface LocalStatePluginConfig extends RawConfig { + /** + * Path to base schema types used to import schema type definitions for + * extended types in your local schema. This is required if your schema type + * definitions defines an extended type (i.e. `extend type User {...}`). + * + * @example + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: ["typescript", "@apollo/client/local-state/codegen"], + * config: { + * baseTypesPath: "./relative/path/to/schema/types", + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + baseTypesPath?: string; + + /** + * The import name for the base schema types. + * + * @defaultValue BaseSchemaTypes + * + * @example + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: ["typescript", "@apollo/client/local-state/codegen"], + * config: { + * baseSchemaTypesImportName: "MyBaseSchemaTypes", + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + baseSchemaTypesImportName?: string; + + /** + * This will cause the generator to avoid using optionals (`?`), + * so all field resolvers must be implemented in order to avoid compilation errors. + * @defaultValue false + * + * @example + * + * ## Override all definition types + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: ["typescript", "@apollo/client/local-state/codegen"], + * config: { + * avoidOptionals: true, + * }, + * }, + * }, + * }; + * export default config; + * ``` + * + * ## Override only specific definition types + * + * ```ts filename="codegen.ts" + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: ["typescript", "@apollo/client/local-state/codegen"], + * config: { + * avoidOptionals: { + * field: true, + * inputValue: true, + * object: true, + * defaultValue: true, + * query: true, + * mutation: true, + * subscription: true, + * }, + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + avoidOptionals?: boolean | AvoidOptionalsConfig; + + /** + * Adds `_` to generated `Args` types in order to avoid duplicate identifiers. + * + * @example + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * addUnderscoreToArgsType: true, + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + addUnderscoreToArgsType?: boolean; + /** + * Use this configuration to set a custom type for your `context`, and it will + * affect all the resolvers, without the need to override it using generics each time. + * If you wish to use an external type and import it from another file, you can use `add` plugin + * and add the required `import` statement, or you can use a `module#type` syntax. + * + * @example + * + * ## Custom Context Type + * + * ```ts filename="codegen.ts" + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * contextType: "MyContext", + * }, + * }, + * }, + * }; + * export default config; + * ``` + * + * ## Custom Context Type by Path + * + * Note that the path should be relative to the generated file. + * + * ```ts filename="codegen.ts" + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * contextType: "./my-types#MyContext", + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + contextType?: string; + /** + * Adds a suffix to the imported names to prevent name clashes. + * + * @example + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * mapperTypeSuffix: "Model", + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + mapperTypeSuffix?: string; + /** + * Replaces a GraphQL type usage with a custom type, allowing you to return custom object from + * your resolvers. + * You can use both `module#type` and `module#namespace#type` syntax. + * + * @example + * + * ## Custom Context Type + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * mappers: { + * User: "./my-models#UserDbObject", + * Book: "./my-models#Collections", + * }, + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + mappers?: { + [typeName: string]: string; + }; + /** + * Allow you to set the default mapper when it's not being override by `mappers` or generics. + * You can specify a type name, or specify a string in `module#type` or `module#namespace#type` format. + * The default value of mappers is the TypeScript type generated by `typescript` package. + * + * @example + * + * ## Replace with any + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * defaultMapper: "any", + * }, + * }, + * }, + * }; + * export default config; + * ``` + * + * ## Custom Base Object + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * defaultMapper: "./my-file#BaseObject", + * }, + * }, + * }, + * }; + * export default config; + * ``` + * + * ## Wrap default types with Partial + * + * You can also specify a custom wrapper for the original type, without overriding the original generated types, use `{T}` to specify the identifier. (for flow, use `$Shape<{T}>`) + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * // plugins... + * config: { + * defaultMapper: "Partial<{T}>", + * }, + * }, + * }, + * }; + * export default config; + * ``` + * + * ## Allow deep partial with `utility-types` + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: [ + * "typescript", + * "@apollo/client/local-state/codegen", + * { add: { content: "import { DeepPartial } from 'utility-types';" } }, + * ], + * config: { + * defaultMapper: "DeepPartial<{T}>", + * avoidCheckingAbstractTypesRecursively: true, // required if you have complex nested abstract types + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + defaultMapper?: string; + /** + * Warns about unused mappers. + * + * @defaultValue true + * + * @example + * + * ```ts + * import type { CodegenConfig } from "@graphql-codegen/cli"; + * + * const config: CodegenConfig = { + * // ... + * generates: { + * "path/to/file": { + * plugins: ["typescript", "@apollo/client/local-state/codegen"], + * config: { + * showUnusedMappers: true, + * }, + * }, + * }, + * }; + * export default config; + * ``` + */ + showUnusedMappers?: boolean; + /** + * Generates immutable types by adding `readonly` to properties and uses `ReadonlyArray`. + * + * @defaultValue false + */ + immutableTypes?: boolean; + /** + * Prefixes all GraphQL related generated types with that value, as namespaces import. + * You can use this feature to allow separation of plugins to different files. + * + * @defaultValue '' + */ + namespacedImportName?: string; + /** + * Suffix we add to each generated type resolver. + * + * @defaultValue Resolvers + */ + resolverTypeSuffix?: string; + /** + * The type name to use when exporting all resolvers signature as unified type. + * + * @defaultValue Resolvers + */ + allResolversTypeName?: string; +} diff --git a/codegen/local-state/index.ts b/codegen/local-state/index.ts new file mode 100644 index 00000000000..f8d3ac7ad85 --- /dev/null +++ b/codegen/local-state/index.ts @@ -0,0 +1,2 @@ +export type { LocalStatePluginConfig } from "./config.js"; +export { plugin } from "./plugin.js"; diff --git a/codegen/local-state/plugin.ts b/codegen/local-state/plugin.ts new file mode 100644 index 00000000000..51a77b02d87 --- /dev/null +++ b/codegen/local-state/plugin.ts @@ -0,0 +1,123 @@ +/** + * Adapted from + * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/index.ts + * + * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Dotan Simha + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +import type { PluginFunction, Types } from "@graphql-codegen/plugin-helpers"; +import { + getCachedDocumentNodeFromSchema, + oldVisit, +} from "@graphql-codegen/plugin-helpers"; +import type { RootResolver } from "@graphql-codegen/visitor-plugin-common"; +import type { GraphQLSchema } from "graphql"; + +import type { LocalStatePluginConfig } from "./config.js"; +import { LocalStateVisitor } from "./visitor.js"; + +export const plugin: PluginFunction< + LocalStatePluginConfig, + Types.ComplexPluginOutput<{ + generatedResolverTypes: RootResolver["generatedResolverTypes"]; + }> +> = async ( + schema: GraphQLSchema, + _documents: Types.DocumentFile[], + config: LocalStatePluginConfig +) => { + const imports: string[] = []; + const showUnusedMappers = + typeof config.showUnusedMappers === "boolean" ? + config.showUnusedMappers + : true; + + const importType = config.useTypeImports ? "import type" : "import"; + const prepend: string[] = []; + + // Extended types are types that extend existing schema types (i.e. `extend type User {...}`) + const extendedTypes = Object.entries(schema.getTypeMap()).reduce( + (memo, [typename, type]) => { + return type.astNode?.loc?.startToken.value === "extend" ? + memo.add(typename) + : memo; + }, + new Set() + ); + + if (extendedTypes.size > 0) { + if (!config.baseTypesPath) { + throw new Error( + "`baseTypesPath` must be defined when your local schema extends existing schema types." + ); + } + + prepend.push( + `import * as ${ + config.baseSchemaTypesImportName ?? "BaseSchemaTypes" + } from '${config.baseTypesPath}';` + ); + } + + const visitor = new LocalStateVisitor(config, schema, extendedTypes); + const astNode = getCachedDocumentNodeFromSchema(schema); + + // runs visitor + const visitorResult = oldVisit(astNode, { leave: visitor as any }); + + const resolversTypeMapping = visitor.buildResolversTypes(); + const resolversParentTypeMapping = visitor.buildResolversParentTypes(); + const { getRootResolver, mappersImports, unusedMappers } = visitor; + + if (showUnusedMappers && unusedMappers.length) { + console.warn(`Unused mappers: ${unusedMappers.join(",")}`); + } + + if (imports.length) { + prepend.push(`${importType} { ${imports.join(", ")} } from 'graphql';`); + } + + prepend.push( + `${importType} { LocalState } from '@apollo/client/local-state'`, + `${importType} { DeepPartial } from '@apollo/client/utilities';` + ); + + prepend.push(...mappersImports, ...visitor.globalDeclarations); + + const rootResolver = getRootResolver(); + + return { + prepend, + content: [ + resolversTypeMapping, + resolversParentTypeMapping, + ...visitorResult.definitions.filter( + (d: unknown) => typeof d === "string" + ), + rootResolver.content, + ].join("\n"), + meta: { + generatedResolverTypes: rootResolver.generatedResolverTypes, + }, + }; +}; diff --git a/codegen/local-state/visitor.ts b/codegen/local-state/visitor.ts new file mode 100644 index 00000000000..7deda08b020 --- /dev/null +++ b/codegen/local-state/visitor.ts @@ -0,0 +1,681 @@ +/** + * Adapted from + * https://github.com/dotansimha/graphql-code-generator/blob/master/packages/plugins/typescript/resolvers/src/visitor.ts + * + * https://github.com/dotansimha/graphql-code-generator/blob/master/LICENSE + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Dotan Simha + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND ONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +import { TypeScriptOperationVariablesToObject } from "@graphql-codegen/typescript"; +import type { + DeclarationKind, + ParsedMapper, + ParsedResolversConfig, + ResolverTypes, + RootResolver, +} from "@graphql-codegen/visitor-plugin-common"; +import { + BaseResolversVisitor, + DeclarationBlock, + getBaseTypeNode, + getConfigValue, + indent, + normalizeAvoidOptionals, + parseMapper, +} from "@graphql-codegen/visitor-plugin-common"; +import type { + DirectiveDefinitionNode, + EnumTypeDefinitionNode, + FieldDefinitionNode, + GraphQLNamedType, + GraphQLSchema, + InterfaceTypeDefinitionNode, + ListTypeNode, + NamedTypeNode, + NonNullTypeNode, + ObjectTypeDefinitionNode, + ScalarTypeDefinitionNode, + UnionTypeDefinitionNode, +} from "graphql"; +import { + isEnumType, + isInterfaceType, + isObjectType, + isUnionType, + Kind, +} from "graphql"; + +import type { LocalStatePluginConfig } from "./config.js"; + +type FieldDefinitionPrintFn = ( + parentName: string, + avoidResolverOptionals: boolean +) => string | null; + +const ENUM_RESOLVERS_SIGNATURE = + "export type EnumResolverSignature = { [key in keyof T]?: AllowedValues };"; + +interface ParsedTypeScriptResolversConfig extends ParsedResolversConfig { + allowParentTypeOverride: boolean; + extendedTypes: Set; + baseSchemaTypesImportName: string; + contextType: ParsedMapper; + rootValueType: never; +} + +export class LocalStateVisitor extends BaseResolversVisitor< + LocalStatePluginConfig, + ParsedTypeScriptResolversConfig +> { + constructor( + pluginConfig: LocalStatePluginConfig, + schema: GraphQLSchema, + extendedTypes: Set + ) { + super( + pluginConfig, + { + avoidOptionals: normalizeAvoidOptionals(pluginConfig.avoidOptionals), + allowParentTypeOverride: false, + contextType: parseMapper( + pluginConfig.contextType || "@apollo/client#DefaultContext", + "DefaultContext" + ), + baseSchemaTypesImportName: getConfigValue( + pluginConfig.baseSchemaTypesImportName, + "BaseSchemaTypes" + ), + extendedTypes, + } as ParsedTypeScriptResolversConfig, + schema + ); + this.setVariablesTransformer( + new TypeScriptOperationVariablesToObject( + this.scalars, + this.convertName, + this.config.avoidOptionals, + this.config.immutableTypes, + this.config.namespacedImportName, + [], + this.config.enumPrefix, + this.config.enumSuffix, + this.config.enumValues + ) + ); + } + + protected applyResolverTypeWrapper(str: string): string { + return str; + } + + protected createResolversFields({ + applyWrapper, + clearWrapper, + getTypeToUse, + currentType, + shouldInclude, + }: { + applyWrapper: (str: string) => string; + clearWrapper: (str: string) => string; + getTypeToUse: (str: string) => string; + currentType: "ResolversTypes" | "ResolversParentTypes"; + shouldInclude?: (type: GraphQLNamedType) => boolean; + }): ResolverTypes { + if (currentType === "ResolversTypes") { + return super.createResolversFields({ + applyWrapper, + clearWrapper, + getTypeToUse, + currentType, + shouldInclude, + }); + } + + const allSchemaTypes = this.schema.getTypeMap(); + const typeNames = this._federation.filterTypeNames( + Object.keys(allSchemaTypes) + ); + + // avoid checking all types recursively if we have no `mappers` defined + if (Object.keys(this.config.mappers).length > 0) { + for (const typeName of typeNames) { + if (this["_shouldMapType"][typeName] === undefined) { + const schemaType = allSchemaTypes[typeName]; + this["_shouldMapType"][typeName] = this.shouldMapType(schemaType); + } + } + } + + return typeNames.reduce((prev: ResolverTypes, typeName: string) => { + const schemaType = allSchemaTypes[typeName]; + + if ( + typeName.startsWith("__") || + (shouldInclude && !shouldInclude(schemaType)) + ) { + return prev; + } + + const isRootType = this._rootTypeNames.has(typeName); + const isMapped = this.config.mappers[typeName]; + const isScalar = this.config.scalars[typeName]; + const hasDefaultMapper = !!this.config.defaultMapper?.type; + + if (isRootType) { + if (this.config.extendedTypes.has(typeName)) { + const node = allSchemaTypes[typeName] + .astNode as ObjectTypeDefinitionNode; + + const baseType = `DeepPartial<${this.config.baseSchemaTypesImportName}.${typeName}>`; + const localFieldNames = + node.fields?.map((field) => `'${field.name.value}'`) ?? []; + + prev[typeName] = applyWrapper( + // Don't define fields from local resolvers on the root type + // since the root value passed to a local root resolver only + // contains keys from the server schema. The schema types might + // however be generated from both the local and remote schema in + // order to generate queries that contain both types of fields. + // Filtering the local fields out ensures a more accurate type in + // this situation. + localFieldNames.length > 0 ? + `Omit<${baseType}, ${localFieldNames.join(" | ")}>` + : baseType + ); + } else { + prev[typeName] = applyWrapper("{}"); + } + + return prev; + } + if ( + isMapped && + this.config.mappers[typeName].type && + !hasPlaceholder(this.config.mappers[typeName].type) + ) { + this.markMapperAsUsed(typeName); + prev[typeName] = applyWrapper(this.config.mappers[typeName].type); + } else if (isEnumType(schemaType) && this.config.enumValues[typeName]) { + const isExternalFile = !!this.config.enumValues[typeName].sourceFile; + prev[typeName] = + isExternalFile ? + this.convertName(this.config.enumValues[typeName].typeIdentifier, { + useTypesPrefix: false, + useTypesSuffix: false, + }) + : this.config.enumValues[typeName].sourceIdentifier!; + } else if ( + hasDefaultMapper && + !hasPlaceholder(this.config.defaultMapper!.type) + ) { + prev[typeName] = applyWrapper(this.config.defaultMapper!.type); + } else if (isScalar) { + prev[typeName] = applyWrapper(this._getScalar(typeName)); + } else if (isInterfaceType(schemaType)) { + this._hasReferencedResolversInterfaceTypes = true; + const type = this.convertName("ResolversInterfaceTypes"); + const generic = this.convertName(currentType); + prev[typeName] = applyWrapper(`${type}<${generic}>['${typeName}']`); + return prev; + } else if (isUnionType(schemaType)) { + this._hasReferencedResolversUnionTypes = true; + const type = this.convertName("ResolversUnionTypes"); + const generic = this.convertName(currentType); + prev[typeName] = applyWrapper(`${type}<${generic}>['${typeName}']`); + } else if (isEnumType(schemaType)) { + prev[typeName] = this.convertName( + typeName, + { + useTypesPrefix: this.config.enumPrefix, + useTypesSuffix: this.config.enumSuffix, + }, + true + ); + } else { + prev[typeName] = this.convertName(typeName, {}, true); + + if (prev[typeName] !== "any" && isObjectType(schemaType)) { + const relevantFields = this["getRelevantFieldsToOmit"]({ + schemaType, + getTypeToUse, + shouldInclude, + }); + + // If relevantFields, puts ResolverTypeWrapper on top of an entire type + let internalType = + relevantFields.length > 0 ? + this.replaceFieldsInType(prev[typeName], relevantFields) + : prev[typeName]; + + if (isMapped) { + // replace the placeholder with the actual type + if (hasPlaceholder(internalType)) { + internalType = replacePlaceholder(internalType, typeName); + } + if ( + this.config.mappers[typeName].type && + hasPlaceholder(this.config.mappers[typeName].type) + ) { + internalType = replacePlaceholder( + this.config.mappers[typeName].type, + internalType + ); + } + } + + if (this.config.extendedTypes.has(typeName)) { + const node = allSchemaTypes[typeName]?.astNode; + + if (node?.kind !== Kind.OBJECT_TYPE_DEFINITION) { + throw new Error( + "Extended type must be an object type definition" + ); + } + + const baseType = `${this.config.baseSchemaTypesImportName}.${typeName}`; + + const localFieldNames = + node.fields?.map((field) => `'${field.name.value}'`) ?? []; + + prev[typeName] = + // Don't define fields from local resolvers on the parent type + // since the parent type passed to a local resolver only contains + // keys from the server schema. The schema types might however be + // generated from both the local and remote schema in order to + // generate queries that contain both types of fields. Filtering + // the local fields out ensures a more accurate type in this + // situation. + localFieldNames.length > 0 ? + `Omit, ${localFieldNames.join(" | ")}>` + : baseType; + } else { + prev[typeName] = applyWrapper(internalType); + } + } + } + + if ( + !isMapped && + hasDefaultMapper && + hasPlaceholder(this.config.defaultMapper!.type) + ) { + const originalTypeName = + isScalar ? this._getScalar(typeName) : prev[typeName]; + + if (isUnionType(schemaType)) { + // Don't clear ResolverTypeWrapper from Unions + prev[typeName] = replacePlaceholder( + this.config.defaultMapper!.type, + originalTypeName + ); + } else { + const name = clearWrapper(originalTypeName); + const replaced = replacePlaceholder( + this.config.defaultMapper!.type, + name + ); + prev[typeName] = applyWrapper(replaced); + } + } + + return prev; + }, {} as ResolverTypes); + } + + protected formatRootResolver( + schemaTypeName: string, + resolverType: string, + declarationKind: DeclarationKind + ): string { + const avoidOptionals = this.config.avoidOptionals.resolvers; + + return `${schemaTypeName}${ + avoidOptionals ? "" : "?" + }: ${resolverType}${this.getPunctuation(declarationKind)}`; + } + + private clearOptional(str: string): string { + if (str.startsWith("Maybe")) { + return str.replace(/Maybe<(.*?)>$/, "$1"); + } + + return str; + } + + ListType(node: ListTypeNode): string { + return `Maybe<${super.ListType(node)}>`; + } + + DirectiveDefinition( + _node: DirectiveDefinitionNode, + _key: string | number, + _parent: any + ): string { + return ""; + } + + EnumTypeDefinition(node: EnumTypeDefinitionNode): string { + const rawTypeName = node.name as any; + + // If we have enumValues set, and it's point to an external enum - we need to allow internal values resolvers + // In case we have enumValues set but as explicit values, no need to to do mapping since it's already + // have type validation (the original enum has been modified by base types plugin). + // If we have mapper for that type - we can skip + if ( + !this.config.mappers[rawTypeName] && + !this.config.enumValues[rawTypeName] + ) { + return ""; + } + + const name = this.convertName(node, { + suffix: this.config.resolverTypeSuffix, + }); + this._collectedResolvers[rawTypeName] = { + typename: name, + baseGeneratedTypename: name, + }; + const hasExplicitValues = this.config.enumValues[rawTypeName]?.mappedValues; + + return new DeclarationBlock(this._declarationBlockConfig) + .export() + .asKind("type") + .withName(name) + .withContent( + hasExplicitValues ? + this.buildEnumResolversExplicitMappedValues( + node, + this.config.enumValues[rawTypeName].mappedValues! + ) + : this.buildEnumResolverContentBlock( + node, + this.getTypeToUse(rawTypeName) + ) + ).string; + } + + ObjectTypeDefinition(node: ObjectTypeDefinitionNode): string { + const declarationKind = "type"; + const name = this.convertName(node, { + suffix: this.config.resolverTypeSuffix, + }); + const typeName = node.name as any as string; + + const rootType = ((): false | "query" | "mutation" | "subscription" => { + if (this.schema.getQueryType()?.name === typeName) { + return "query"; + } + if (this.schema.getMutationType()?.name === typeName) { + return "mutation"; + } + if (this.schema.getSubscriptionType()?.name === typeName) { + return "subscription"; + } + return false; + })(); + + const fieldsContent = ( + node.fields as unknown as FieldDefinitionPrintFn[] + ).map((f) => { + return f( + typeName, + (rootType === "query" && this.config.avoidOptionals.query) || + (rootType === "mutation" && this.config.avoidOptionals.mutation) || + (rootType === "subscription" && + this.config.avoidOptionals.subscription) || + (rootType === false && this.config.avoidOptionals.resolvers) + ); + }); + + const block = new DeclarationBlock(this._declarationBlockConfig) + .export() + .asKind(declarationKind) + .withName(name) + .withBlock(fieldsContent.join("\n")); + + this._collectedResolvers[node.name as any] = { + typename: name, + baseGeneratedTypename: name, + }; + + return block.string; + } + + UnionTypeDefinition( + _node: UnionTypeDefinitionNode, + _key: string | number, + _parent: any + ): string { + return ""; + } + + FieldDefinition( + node: FieldDefinitionNode, + key: string | number, + parent: any + ): FieldDefinitionPrintFn { + const hasArguments = node.arguments && node.arguments.length > 0; + const declarationKind = "type"; + + return (parentName, avoidResolverOptionals) => { + const original: FieldDefinitionNode = parent[key]; + + let argsType = + hasArguments ? + this.convertName( + parentName + + (this.config.addUnderscoreToArgsType ? "_" : "") + + this.convertName(node.name, { + useTypesPrefix: false, + useTypesSuffix: false, + }) + + "Args", + { + useTypesPrefix: true, + }, + true + ) + : null; + + if (argsType !== null) { + const argsToForceRequire = original.arguments!.filter( + (arg) => !!arg.defaultValue || arg.type.kind === "NonNullType" + ); + + if (argsToForceRequire.length > 0) { + argsType = this.applyRequireFields(argsType, argsToForceRequire); + } else if (original.arguments!.length > 0) { + argsType = this.applyOptionalFields(argsType, original.arguments!); + } + } + const { mappedTypeKey, resolverType } = ((): { + mappedTypeKey: string; + resolverType: string; + } => { + const baseType = getBaseTypeNode(original.type); + const realType = baseType.name.value; + const typeToUse = this.getTypeToUse(realType); + /** + * Turns GraphQL type to TypeScript types (`mappedType`) e.g. + * + * - String! -> ResolversTypes['String']> + * - String -> Maybe + * - [String] -> Maybe>> + * - [String!]! -> Array + */ + const mappedType = this._variablesTransformer.wrapAstTypeWithModifiers( + typeToUse, + original.type + ); + + return { + mappedTypeKey: mappedType, + resolverType: "LocalState.Resolver", + }; + })(); + + const signature: { + name: string; + modifier: string; + type: string; + genericTypes: string[]; + } = { + name: node.name as any, + modifier: avoidResolverOptionals ? "" : "?", + type: resolverType, + genericTypes: [ + mappedTypeKey, + this.getParentTypeToUse(parentName), + this.config.contextType.type, + argsType!, + ].filter((f) => f), + }; + + return indent( + `${signature.name}${signature.modifier}: ${ + signature.type + }<${signature.genericTypes.join(", ")}>${this.getPunctuation( + declarationKind + )}` + ); + }; + } + + InterfaceTypeDefinition(_node: InterfaceTypeDefinitionNode): string { + return ""; + } + + public getRootResolver(): RootResolver { + const name = this.convertName(this.config.allResolversTypeName); + const declarationKind = "type"; + + const userDefinedTypes: RootResolver["generatedResolverTypes"]["userDefined"] = + {}; + const content = [ + new DeclarationBlock(this._declarationBlockConfig) + .export() + .asKind(declarationKind) + .withName(name) + .withBlock( + Object.keys(this._collectedResolvers) + .map((schemaTypeName) => { + const resolverType = this._collectedResolvers[schemaTypeName]; + + if (resolverType.baseGeneratedTypename) { + userDefinedTypes[schemaTypeName] = { + name: resolverType.baseGeneratedTypename, + }; + } + + return indent( + this.formatRootResolver( + schemaTypeName, + resolverType.typename, + declarationKind + ) + ); + }) + .join("\n") + ).string, + ].join("\n"); + + return { + content, + generatedResolverTypes: { + resolversMap: { name }, + userDefined: userDefinedTypes, + }, + }; + } + + protected wrapWithListType(str: string): string { + return `${this.config.immutableTypes ? "ReadonlyArray" : "Array"}<${str}>`; + } + + protected getParentTypeForSignature(_node: FieldDefinitionNode) { + return "ParentType"; + } + + NamedType(node: NamedTypeNode): string { + return `Maybe<${super.NamedType(node)}>`; + } + + NonNullType(node: NonNullTypeNode): string { + const baseValue = super.NonNullType(node); + + return this.clearOptional(baseValue); + } + + ScalarTypeDefinition(node: ScalarTypeDefinitionNode): string { + console.warn( + `Custom scalars type '${node.name.value}' is ignored and cannot be resolved with \`LocalState\`. Please map the scalar type to a primitive with the \`scalars\` config.` + ); + this._hasScalars = true; + return ""; + } + + protected getPunctuation(_declarationKind: DeclarationKind): string { + return ";"; + } + + protected buildEnumResolverContentBlock( + node: EnumTypeDefinitionNode, + mappedEnumType: string + ): string { + const valuesMap = `{ ${(node.values || []) + .map( + (v) => + `${v.name as any as string}${ + this.config.avoidOptionals.resolvers ? "" : "?" + }: any` + ) + .join(", ")} }`; + + this._globalDeclarations.add(ENUM_RESOLVERS_SIGNATURE); + + return `EnumResolverSignature<${valuesMap}, ${mappedEnumType}>`; + } + + protected buildEnumResolversExplicitMappedValues( + node: EnumTypeDefinitionNode, + valuesMapping: { [valueName: string]: string | number } + ): string { + return `{ ${(node.values || []) + .map((v) => { + const valueName = v.name as any as string; + const mappedValue = valuesMapping[valueName]; + + return `${valueName}: ${ + typeof mappedValue === "number" ? mappedValue : `'${mappedValue}'` + }`; + }) + .join(", ")} }`; + } +} + +function replacePlaceholder(pattern: string, typename: string): string { + return pattern.replace(/\{T\}/g, typename); +} + +function hasPlaceholder(pattern: string): boolean { + return pattern.includes("{T}"); +} diff --git a/codegen/package.json b/codegen/package.json new file mode 100644 index 00000000000..985bd3ff75e --- /dev/null +++ b/codegen/package.json @@ -0,0 +1,46 @@ +{ + "name": "@apollo/client-graphql-codegen", + "version": "1.0.0-rc.0", + "description": "Apollo Client GraphQL Codegen Plugins", + "keywords": [ + "apollo", + "client", + "graphql", + "codegen" + ], + "author": "packages@apollographql.com", + "license": "MIT", + "type": "module", + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/apollographql/apollo-client.git", + "directory": "codegen" + }, + "bugs": { + "url": "https://github.com/apollographql/apollo-client/issues" + }, + "homepage": "https://www.apollographql.com/docs/react/", + "exports": { + "./local-state": "./dist/local-state/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "prebuild": "npm run clean", + "clean": "rimraf dist", + "build": "tsc", + "prepack": "npm run build", + "publint": "publint run --strict ." + }, + "dependencies": {}, + "devDependencies": { + "typescript": "^5.8.3" + }, + "peerDependencies": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-codegen/typescript": "^4.0.0", + "@graphql-codegen/visitor-plugin-common": "^5.0.0" + } +} diff --git a/codegen/tsconfig.json b/codegen/tsconfig.json new file mode 100644 index 00000000000..203aad66057 --- /dev/null +++ b/codegen/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "noEmit": false, + "target": "ESNext", + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["DOM", "ES2022"], + "paths": {}, + "types": [], + "rootDir": "./", + "outDir": "./dist", + "declaration": true, + "sourceMap": true, + "skipLibCheck": true, + "strict": true + }, + "include": ["**/*.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/config/apiExtractor.ts b/config/apiExtractor.ts index 4d9a3a82ede..410d1c2af94 100644 --- a/config/apiExtractor.ts +++ b/config/apiExtractor.ts @@ -1,16 +1,27 @@ +import { spawnSync } from "node:child_process"; +import fs from "node:fs"; +import { readFile, writeFile } from "node:fs/promises"; +import { format, join, parse } from "node:path"; +import { parseArgs } from "node:util"; import * as path from "path"; + +import type { IConfigFile } from "@microsoft/api-extractor"; import { Extractor, ExtractorConfig, ExtractorLogLevel, - IConfigFile, } from "@microsoft/api-extractor"; -import { parseArgs } from "node:util"; -import fs from "node:fs"; -// @ts-ignore -import { map, buildDocEntryPoints } from "./entryPoints.js"; -import { readFileSync } from "fs"; +import pkg from "../dist/package.json" with { type: "json" }; + +import type { ExportsCondition } from "./entryPoints.ts"; +import { buildDocEntryPoints } from "./entryPoints.ts"; +import { + patchApiExtractorInternals, + withPseudoNodeModules, +} from "./helpers.ts"; + +patchApiExtractorInternals(); const parsed = parseArgs({ options: { @@ -35,55 +46,124 @@ if ( } // Load and parse the api-extractor.json file -const configObjectFullPath = path.resolve(__dirname, "../api-extractor.json"); +const configObjectFullPath = path.resolve( + import.meta.dirname, + "../api-extractor.json" +); const baseConfig = ExtractorConfig.loadFile(configObjectFullPath); -const packageJsonFullPath = path.resolve(__dirname, "../package.json"); +const packageJsonFullPath = path.resolve( + import.meta.dirname, + "../package.json" +); +const reportFolder = baseConfig.apiReport.reportFolder!.replace( + "", + join(import.meta.dirname, "..") +); + +const entryPoints = Object.entries(pkg.exports as ExportsCondition) + .filter(([key]) => !(key.includes("*") || key.includes(".json"))) + .map(([key, value]) => { + return { + path: key.slice("./".length), + key, + value, + }; + }); process.exitCode = 0; -const tempDir = fs.mkdtempSync("api-model"); +const tempDir = fs.mkdtempSync( + path.join(import.meta.dirname, "..", "dist", "api-model") +); try { if (parsed.values.generate?.includes("docModel")) { console.log( "\n\nCreating API extractor docmodel for the a combination of all entry points" ); const entryPointFile = path.join(tempDir, "entry.d.ts"); - fs.writeFileSync(entryPointFile, buildDocEntryPoints()); + fs.writeFileSync( + entryPointFile, + buildDocEntryPoints({ + rootDir: path.resolve(import.meta.dirname, ".."), + targetDir: "dist", + jsExt: "js", + }) + ); - buildReport(entryPointFile, "docModel"); + const result = await buildReport( + "@apollo/client", + entryPointFile, + "docModel" + ); if (process.exitCode === 50) { process.exitCode = 0; // if there were only warnings, we still want to exit with 0 } + + console.log("Creating file with all possible canonical references..."); + const canonicalReferences = new Set(); + const file = await readFile(result.extractorConfig.apiJsonFilePath, "utf8"); + JSON.parse(file, (key, value) => { + if ( + key === "canonicalReference" && + typeof value === "string" && + value.startsWith("@apollo/client") + ) { + canonicalReferences.add(value); + } + return undefined; + }); + await writeFile( + format({ + ...parse(result.extractorConfig.apiJsonFilePath), + base: "canonical-references.json", + }), + JSON.stringify([...canonicalReferences.values()], null, 2), + "utf8" + ); } if (parsed.values.generate?.includes("apiReport")) { - map((entryPoint: { dirs: string[] }) => { - const path = entryPoint.dirs.join("/"); - const mainEntryPointFilePath = - `/dist/${path}/index.d.ts`.replace("//", "/"); + for (const entryPoint of entryPoints) { + let entry = entryPoint.value; + while (typeof entry === "object") { + entry = entry.types || Object.values(entry).at(-1); + } + const mainEntryPointFilePath = `/dist/${entry}` + .replace("//", "/") + .replace(/\.cjs$/, ".d.cts") + .replace(/\.js$/, ".d.ts"); console.log( "\n\nCreating API extractor report for " + mainEntryPointFilePath ); - buildReport( + const reportFileName = `api-report${ + entryPoint.path ? "-" + entryPoint.path.replace(/\//g, "_") : "" + }.api.md`; + await buildReport( + join("@apollo/client", entryPoint.key), mainEntryPointFilePath, "apiReport", - `api-report${path ? "-" + path.replace(/\//g, "_") : ""}.api.md` + reportFileName ); - }); + } } } finally { fs.rmSync(tempDir, { recursive: true }); } -function buildReport( +async function buildReport( + bundledPackages: string | string[], mainEntryPointFilePath: string, mode: "apiReport" | "docModel", reportFileName = "" ) { + if (!Array.isArray(bundledPackages)) { + bundledPackages = [bundledPackages]; + } const configObject: IConfigFile = { ...(JSON.parse(JSON.stringify(baseConfig)) as IConfigFile), mainEntryPointFilePath, }; + configObject.bundledPackages = bundledPackages; if (mode === "apiReport") { configObject.apiReport!.enabled = true; @@ -109,32 +189,14 @@ function buildReport( configObjectFullPath, }); - const extractorResult = Extractor.invoke(extractorConfig, { - localBuild: process.env.CI === undefined || process.env.CI === "false", - showVerboseMessages: true, - }); - - let succeededAdditionalChecks = true; - if (fs.existsSync(extractorConfig.reportFilePath)) { - const contents = readFileSync(extractorConfig.reportFilePath, "utf8"); - if (contents.includes("rehackt")) { - succeededAdditionalChecks = false; - console.error( - "❗ %s contains a reference to the `rehackt` package!", - extractorConfig.reportFilePath - ); - } - if (contents.includes('/// ')) { - succeededAdditionalChecks = false; - console.error( - "❗ %s contains a reference to the global `React` type!/n" + - 'Use `import type * as ReactTypes from "react";` instead', - extractorConfig.reportFilePath - ); - } - } + const extractorResult = await withPseudoNodeModules(() => + Extractor.invoke(extractorConfig, { + localBuild: process.env.CI === undefined || process.env.CI === "false", + showVerboseMessages: true, + }) + ); - if (extractorResult.succeeded && succeededAdditionalChecks) { + if (extractorResult.succeeded) { console.log(`✅ API Extractor completed successfully`); } else { process.exitCode = extractorResult.errorCount === 0 ? 50 : 1; @@ -142,8 +204,18 @@ function buildReport( `❗ API Extractor completed with ${extractorResult.errorCount} errors` + ` and ${extractorResult.warningCount} warnings` ); - if (!succeededAdditionalChecks) { - console.error("Additional checks failed."); + if (extractorResult.apiReportChanged) { + spawnSync( + "diff", + [ + join(reportFolder, reportFileName), + join(reportFolder, "temp", reportFileName), + ], + { + stdio: "inherit", + } + ); } } + return extractorResult; } diff --git a/config/babel.ts b/config/babel.ts new file mode 100644 index 00000000000..94df84f1517 --- /dev/null +++ b/config/babel.ts @@ -0,0 +1,32 @@ +import { transformFromAstAsync } from "@babel/core"; + +import type { BuildStep } from "./build.ts"; +import { applyRecast } from "./helpers.ts"; + +export const babelTransform: BuildStep = async (options) => { + return applyRecast({ + glob: `**/*.${options.jsExt}`, + cwd: options.targetDir, + async transformStep({ ast, sourceName, relativeSourcePath }) { + const result = await transformFromAstAsync(ast as any, undefined, { + filename: sourceName, + sourceFileName: sourceName, + sourceMaps: true, + code: false, + ast: true, + cloneInputAst: false, + retainLines: true, + presets: [ + [ + "@babel/preset-env", + { + modules: false, + targets: "since 2023, node >= 20, not dead", + } satisfies import("@babel/preset-env").Options, + ], + ], + }); + return { ast: result.ast!, map: result.map }; + }, + }); +}; diff --git a/config/build.ts b/config/build.ts new file mode 100644 index 00000000000..92cf915a98a --- /dev/null +++ b/config/build.ts @@ -0,0 +1,109 @@ +import { join, resolve } from "node:path"; +import { parseArgs } from "node:util"; + +import { $ } from "zx"; + +import { babelTransform } from "./babel.ts"; +import { compileTs } from "./compileTs.ts"; +import { reactCompiler } from "./react-compiler.ts"; +import { deprecateInternals } from "./deprecateInternals.ts"; +import { addExports } from "./exports.ts"; +import { distDir } from "./helpers.ts"; +import { inlineInheritDoc } from "./inlineInheritDoc.ts"; +import { prepareDist } from "./prepareDist.ts"; +import { processInvariants } from "./processInvariants.ts"; +import { verifySourceMaps } from "./verifySourceMaps.ts"; +import { updateVersion, verifyVersion } from "./version.ts"; + +export interface BuildStepOptions { + type: "esm" | "cjs"; + rootDir: string; + packageRoot: string; + /** build target directory, relative to `rootDir` */ + targetDir: string; + jsExt: "js" | "cjs"; + tsExt: "ts" | "cts"; + first: boolean; + last: boolean; +} +export type BuildStep = { + (options: BuildStepOptions): void | Promise; +}; +type BuildSteps = Record; + +$.cwd = join(import.meta.dirname, ".."); +$.verbose = true; + +const buildSteps = { + prepareDist, + addExports, + typescript: compileTs, + babelTransform, + updateVersion, + inlineInheritDoc, + deprecateInternals, + processInvariants, + reactCompiler, + verifyVersion, + verifySourceMaps, +} satisfies BuildSteps; +const additionalSteps = {} satisfies BuildSteps; + +const args = parseArgs({ + options: { + step: { + type: "string", + multiple: true, + default: ["build"], + }, + }, +}); + +const allSteps = Object.assign( + {}, + buildSteps, + additionalSteps +) satisfies BuildSteps; + +const runSteps = args.values.step.flatMap((step) => + step === "build" ? Object.keys(buildSteps) : [step] +); + +const wrongSteps = runSteps.filter((step) => !(step in allSteps)); +if (wrongSteps.length) { + throw new Error( + `Unknown steps: ${wrongSteps.join(", ")}. Valid steps are ${Object.keys( + allSteps + ).join(", ")}` + ); +} + +console.log("Running build steps: %s", runSteps.join(", ")); + +const buildStepOptions = [ + // this order is important so that globs on the esm build don't accidentally match the cjs build + { type: "esm", targetDir: "dist", jsExt: "js", tsExt: "ts" }, + { type: "cjs", targetDir: "dist/__cjs", jsExt: "cjs", tsExt: "cts" }, +] satisfies Omit< + BuildStepOptions, + "first" | "last" | "rootDir" | "packageRoot" +>[]; +for (const options of buildStepOptions) { + const first = options === buildStepOptions.at(0); + const last = options === buildStepOptions.at(-1); + const rootDir = resolve(import.meta.dirname, ".."); + + for (const step of runSteps) { + const buildStep: BuildStep = allSteps[step]; + + console.log("--- Step %s: running ---", step); + await buildStep({ ...options, first, last, rootDir, packageRoot: distDir }); + if (process.exitCode) { + console.error( + `\n\nStep ${step} failed, exiting with code ${process.exitCode}` + ); + process.exit(); + } + console.log("--- Step %s: done ---", step); + } +} diff --git a/config/bundlesize.ts b/config/bundlesize.ts index 4a5ad18177b..9ca7ee652f2 100644 --- a/config/bundlesize.ts +++ b/config/bundlesize.ts @@ -1,11 +1,12 @@ import { readFileSync } from "fs"; import { join } from "path"; import { gzipSync } from "zlib"; + import bytes from "bytes"; const gzipBundleByteLengthLimit = bytes("35.25KB"); const minFile = join("dist", "apollo-client.min.cjs"); -const minPath = join(__dirname, "..", minFile); +const minPath = join(import.meta.dirname, "..", minFile); const gzipByteLen = gzipSync(readFileSync(minPath)).byteLength; const overLimit = gzipByteLen > gzipBundleByteLengthLimit; diff --git a/config/compare-build-output-to.sh b/config/compare-build-output-to.sh index c8d44c59784..e1dd60c6930 100755 --- a/config/compare-build-output-to.sh +++ b/config/compare-build-output-to.sh @@ -12,7 +12,7 @@ patterndiff(){ count=0 while IFS= read -r -d '' file do - if ! filediff="$(diff <(tr "'" '"' < "$comparison/dist/$file") <(tr "'" '"' < "$root/dist/$file") -w)"; then + if ! filediff="$(diff <(tr "'" '"' < "$comparison/dist/$file") <(tr "'" '"' < "$root/dist/$file"))"; then (( count++ )) echo "$file" if [[ "$file" == *.min.* ]]; then @@ -53,35 +53,54 @@ EOF git worktree add --force --detach --checkout "$comparison" "$upstream" || { cd "$comparison" && git checkout "$upstream"; } || exit 1 cd "$comparison" || { echo "checkout failed"; exit 1; } -cp -r "$root/node_modules" . +[ -d node_modules ] || cp -r "$root/node_modules" . npm i >&2 git status >&2 npm run build >&2 +node config/apiExtractor.ts --main-only --generate docModel >&2 cd "$root" || exit 1 git status >&2 npm run build >&2 +node config/apiExtractor.ts --main-only --generate docModel >&2 set +e patterndiff "*.js" patterndiff "*.cjs" patterndiff "*.d.ts" +patterndiff "*.d.cts" cat < + + +### $(diff -qr "$comparison/docs/public" "docs/public" | wc -l) files with differences + + + +\`\`\`diff + +$(diff -r "$comparison/docs/public" "docs/public") + +\`\`\` + + ## differences in other files
-### $(diff -qr "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -w | wc -l) files with differences +### $(diff -qr "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -x "*.d.cts" -w | wc -l) files with differences \`\`\`diff -$(diff -r "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -w) +$(diff -r "$comparison/dist" "dist" -x "*.map" -x "*.native.*" -x "*.js" -x "*.cjs" -x "*.d.ts" -x "*.d.cts" -w) \`\`\` diff --git a/config/compileTs.ts b/config/compileTs.ts new file mode 100644 index 00000000000..73bfb58db39 --- /dev/null +++ b/config/compileTs.ts @@ -0,0 +1,159 @@ +import { readFileSync } from "node:fs"; +import { readFile, writeFile } from "node:fs/promises"; +import { join } from "node:path"; + +import { visit } from "recast"; +import { parseConfigFileTextToJson } from "typescript"; +import { $ } from "zx"; + +import type { BuildStep, BuildStepOptions } from "./build.ts"; +import type { ExportsCondition } from "./entryPoints.ts"; +import { applyRecast, updatePackageJson } from "./helpers.ts"; + +export const compileTs: BuildStep = async (options) => { + // TODO use `await using` instead of the `try..finally` here once Node supports it + const tsconfig = await withBuildTsConfig(); + try { + if (options.type === "esm") { + await $`npx tsc --project tsconfig.build.json --outDir ${options.targetDir}`; + } else { + const packageJsonPath = join(import.meta.dirname, "..", `package.json`); + const originalPackageJson = await readFile( + join(options.rootDir, "package.json"), + "utf-8" + ); + try { + // module `node18` will compile to CommonJS if the [detected module format](https://www.typescriptlang.org/docs/handbook/modules/reference.html#module-format-detection) + // is CommonJS, so we temporarily overwrite the `package.json` file + // this is the right way to build CommonJS, the `commonjs` module option should actually not be used + // see https://www.typescriptlang.org/docs/handbook/modules/reference.html#commonjs + await updatePackageJson(options.rootDir, (packageJson) => { + packageJson.type = "commonjs"; + }); + // noCheck is required to suppress errors like + // error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@wry/equality")' call instead. + await $`npx tsc --project tsconfig.build.json --outDir ${options.targetDir} --module node16 --moduleResolution node16 --noCheck`; + } finally { + await writeFile(packageJsonPath, originalPackageJson); + } + + await renameJsFilesToCjs(options); + } + } finally { + await tsconfig[Symbol.asyncDispose](); + } +}; + +function renameJsFilesToCjs(options: BuildStepOptions) { + return applyRecast({ + glob: `**/*.{js,d.ts}`, + cwd: options.targetDir, + transformStep({ ast, sourceName }) { + return { + ast: visit(ast, { + visitCallExpression(path) { + const node = path.node; + if ( + node.callee.type === "Identifier" && + node.callee.name === "require" && + node.arguments.length === 1 && + node.arguments[0].type === "StringLiteral" && + node.arguments[0].value.startsWith(".") && + node.arguments[0].value.endsWith(".js") + ) { + node.arguments[0].value = node.arguments[0].value.replace( + /\.js$/, + ".cjs" + ); + } + this.traverse(path); + }, + visitExportAllDeclaration(path) { + const node = path.node; + if ( + node.source && + node.source.type === "StringLiteral" && + node.source.value.startsWith(".") && + node.source.value.endsWith(".js") + ) { + node.source.value = node.source.value.replace(/\.js$/, ".cjs"); + } + this.traverse(path); + }, + visitExportNamedDeclaration(path) { + const node = path.node; + if ( + node.source && + node.source.type === "StringLiteral" && + node.source.value.startsWith(".") && + node.source.value.endsWith(".js") + ) { + node.source.value = node.source.value.replace(/\.js$/, ".cjs"); + } + this.traverse(path); + }, + visitImportDeclaration(path) { + const node = path.node; + if ( + node.source.type === "StringLiteral" && + node.source.value.startsWith(".") && + node.source.value.endsWith(".js") + ) { + node.source.value = node.source.value.replace(/\.js$/, ".cjs"); + } + this.traverse(path); + }, + visitTSImportType(path) { + const node = path.node; + if ( + node.argument.type === "StringLiteral" && + node.argument.value.startsWith(".") && + node.argument.value.endsWith(".js") + ) { + node.argument.value = node.argument.value.replace( + /\.js$/, + ".cjs" + ); + } + this.traverse(path); + }, + }), + targetFileName: sourceName + .replace(/\.js$/, ".cjs") + .replace(/\.d\.ts$/, ".d.cts"), + }; + }, + }); +} + +async function withBuildTsConfig() { + const tsconfigPath = join(import.meta.dirname, "..", `tsconfig.build.json`); + const originalTsconfig = await readFile(tsconfigPath, "utf-8"); + const tsconfig = parseConfigFileTextToJson( + tsconfigPath, + originalTsconfig + ).config; + tsconfig.files = getEntryPoints(); + await writeFile(tsconfigPath, JSON.stringify(tsconfig, null, 2)); + return { + [Symbol.asyncDispose]() { + return writeFile(tsconfigPath, originalTsconfig); + }, + }; +} + +function getEntryPoints() { + const pkg = JSON.parse( + readFileSync(join(import.meta.dirname, "..", "package.json"), "utf-8") + ); + const acc = new Set([pkg.exports]); + const results = new Set(["./src/react/types/types.documentation.ts"]); + for (const entry of acc) { + if (typeof entry === "string") { + results.add(entry); + } else if (typeof entry === "object") { + Object.values(entry).forEach((e) => acc.add(e)); + } + } + return Array.from(results); +} diff --git a/config/deprecateInternals.ts b/config/deprecateInternals.ts new file mode 100644 index 00000000000..82890b3d9c6 --- /dev/null +++ b/config/deprecateInternals.ts @@ -0,0 +1,38 @@ +import { visit } from "recast"; + +import type { BuildStep } from "./build.ts"; +import { applyRecast, frameComment } from "./helpers.ts"; + +export const deprecateInternals: BuildStep = async (options) => + applyRecast({ + glob: `**/*.{${options.jsExt},d.${options.tsExt}}`, + cwd: options.targetDir, + transformStep({ ast }) { + return { + ast: visit(ast, { + visitNode(path) { + this.traverse(path); + const node = path.node; + + if (!node.comments) { + return; + } + + for (const comment of node.comments) { + if ( + comment.type === "CommentBlock" && + comment.value.includes("@internal") + ) { + if (comment.value.includes("@deprecated")) continue; + + comment.value = frameComment( + comment.value.trim() + + "\n\n@deprecated This is an internal API and should not be used directly. This can be removed or changed at any time." + ); + } + } + }, + }), + }; + }, + }); diff --git a/config/dirname.cjs b/config/dirname.cjs new file mode 100644 index 00000000000..329c3956577 --- /dev/null +++ b/config/dirname.cjs @@ -0,0 +1,4 @@ +// workaround for `entryPoints.ts` that needs access to the current directory, +// but cannot use `import.meta` as the file is required by Jest, which transpiles +// the file to CommonJS - ending up with "SyntaxError: Cannot use 'import.meta' outside a module" +module.exports.__dirname = __dirname; diff --git a/config/entryPoints.js b/config/entryPoints.js deleted file mode 100644 index e1778f4cb27..00000000000 --- a/config/entryPoints.js +++ /dev/null @@ -1,141 +0,0 @@ -const entryPoints = [ - { dirs: [], bundleName: "main" }, - { dirs: ["cache"] }, - { dirs: ["core"] }, - { dirs: ["dev"] }, - { dirs: ["errors"] }, - { dirs: ["link", "batch"] }, - { dirs: ["link", "batch-http"] }, - { dirs: ["link", "context"] }, - { dirs: ["link", "core"] }, - { dirs: ["link", "error"] }, - { dirs: ["link", "http"] }, - { dirs: ["link", "persisted-queries"] }, - { dirs: ["link", "retry"] }, - { dirs: ["link", "remove-typename"] }, - { dirs: ["link", "schema"] }, - { dirs: ["link", "subscriptions"] }, - { dirs: ["link", "utils"] }, - { dirs: ["link", "ws"] }, - { dirs: ["masking"] }, - { dirs: ["react"] }, - { dirs: ["react", "components"] }, - { dirs: ["react", "context"] }, - { dirs: ["react", "hoc"] }, - { dirs: ["react", "hooks"] }, - { dirs: ["react", "internal"] }, - { dirs: ["react", "parser"] }, - { dirs: ["react", "ssr"] }, - { dirs: ["testing"], extensions: [".js", ".jsx"] }, - { dirs: ["testing", "core"] }, - { dirs: ["testing", "experimental"] }, - { dirs: ["utilities"] }, - { dirs: ["utilities", "subscriptions", "relay"] }, - { dirs: ["utilities", "subscriptions", "urql"] }, - { dirs: ["utilities", "globals"], sideEffects: true }, -]; - -const lookupTrie = Object.create(null); -entryPoints.forEach((info) => { - let node = lookupTrie; - info.dirs.forEach((dir) => { - const dirs = node.dirs || (node.dirs = Object.create(null)); - node = dirs[dir] || (dirs[dir] = { isEntry: false }); - }); - node.isEntry = true; -}); - -exports.forEach = function (callback, context) { - entryPoints.forEach(callback, context); -}; - -exports.map = function map(callback, context) { - return entryPoints.map(callback, context); -}; - -const path = require("path").posix; - -exports.check = function (id, parentId) { - const resolved = path.resolve(path.dirname(parentId), id); - const importedParts = partsAfterDist(resolved); - - if (importedParts) { - const entryPointIndex = lengthOfLongestEntryPoint(importedParts); - if (entryPointIndex === importedParts.length) { - return true; - } - - if (entryPointIndex >= 0) { - const parentParts = partsAfterDist(parentId); - const parentEntryPointIndex = lengthOfLongestEntryPoint(parentParts); - const sameEntryPoint = - entryPointIndex === parentEntryPointIndex && - arraysEqualUpTo(importedParts, parentParts, entryPointIndex); - - // If the imported ID and the parent ID have the same longest entry - // point prefix, then this import is safely confined within that - // entry point. Returning false lets Rollup know this import is not - // external, and can be bundled into the CJS bundle that we build - // for this shared entry point. - if (sameEntryPoint) { - return false; - } - - console.warn( - `Risky cross-entry-point nested import of ${id} in ${partsAfterDist( - parentId - ).join("/")}` - ); - } - } - - return false; -}; - -function partsAfterDist(id) { - const parts = id.split(path.sep); - const distIndex = parts.lastIndexOf("dist"); - if (/^index.jsx?$/.test(parts[parts.length - 1])) { - parts.pop(); - } - if (distIndex >= 0) { - return parts.slice(distIndex + 1); - } -} - -exports.getEntryPointDirectory = function (file) { - const parts = partsAfterDist(file) || file.split(path.sep); - const len = lengthOfLongestEntryPoint(parts); - if (len >= 0) return parts.slice(0, len).join(path.sep); -}; - -function lengthOfLongestEntryPoint(parts) { - let node = lookupTrie; - let longest = -1; - for (let i = 0; node && i < parts.length; ++i) { - if (node.isEntry) longest = i; - node = node.dirs && node.dirs[parts[i]]; - } - if (node && node.isEntry) { - return parts.length; - } - return longest; -} - -function arraysEqualUpTo(a, b, end) { - for (let i = 0; i < end; ++i) { - if (a[i] !== b[i]) return false; - } - return true; -} - -exports.buildDocEntryPoints = () => { - const dist = path.resolve(__dirname, "../dist"); - const entryPoints = exports.map((entryPoint) => { - return `export * from "${dist}/${entryPoint.dirs.join("/")}/index.d.ts";`; - }); - entryPoints.push( - `export * from "${dist}/react/types/types.documentation.ts";` - ); - return entryPoints.join("\n"); -}; diff --git a/config/entryPoints.ts b/config/entryPoints.ts new file mode 100644 index 00000000000..f042008419f --- /dev/null +++ b/config/entryPoints.ts @@ -0,0 +1,57 @@ +import { readFileSync } from "fs"; +import path from "path"; + +// @ts-ignore An import path can only end with a '.cts' extension when 'allowImportingTsExtensions' is enabled. +import type { BuildStepOptions } from "./build.ts"; +import { __dirname } from "./dirname.cjs"; + +const pkg = JSON.parse( + readFileSync(path.resolve(__dirname, "../package.json"), { + encoding: "utf-8", + }) +) as typeof import("../package.json"); + +export type ExportsCondition = string | { [key: string]: ExportsCondition }; + +type EntryPoint = { + dirs: string[]; + key: string; + value: ExportsCondition; +}; +export const entryPoints = Object.entries(pkg.exports).map( + ([key, value]) => ({ + dirs: key + .slice("./".length) + .split("/") + .filter((d) => d !== ""), + key, + value, + }) +); + +export const buildDocEntryPoints = ( + options: Pick +) => { + const acc = entryPoints.map((entryPoint) => { + let identifier = ""; + if (entryPoint.dirs.length) { + identifier = + `entrypoint_` + entryPoint.dirs.join("__").replace(/-/g, "_"); + } + if (identifier === "core") return; + return `export * ${identifier ? `as ${identifier}` : ""} from "${path.join( + "@apollo/client", + ...entryPoint.dirs + )}";`; + }); + acc.push( + `export * from "${path.join( + options.rootDir, + options.targetDir, + "react", + "types", + `types.documentation.${options.jsExt}` + )}";` + ); + return acc.join("\n"); +}; diff --git a/config/exports.ts b/config/exports.ts new file mode 100644 index 00000000000..35d27c269a0 --- /dev/null +++ b/config/exports.ts @@ -0,0 +1,117 @@ +import assert from "node:assert"; +import { mkdir, readFile, writeFile } from "node:fs/promises"; +import { join } from "node:path"; + +import type { BuildStep } from "./build.ts"; +import { entryPoints } from "./entryPoints.ts"; +import { updatePackageJson } from "./helpers.ts"; + +type ConditionRoot = { + import?: string; + "module-sync"?: string; + module?: string; + require?: string; + default?: string; +}; + +export const addExports: BuildStep = async (options) => { + await updatePackageJson(options.packageRoot, (pkg) => { + // normal entry points a la `@apollo/client` and `@apollo/client/core`. + // these entry points will be used in most cases and point to the right file depending + // on how the user is consuming the package. + for (const entryPoint of entryPoints) { + if (typeof entryPoint.value === "string") { + pkg.exports[entryPoint.key] = processEntryPoint( + entryPoint.value, + pkg.exports[entryPoint.key] + ); + } else { + for (const [key, value] of Object.entries(entryPoint.value)) { + if (!pkg.exports[entryPoint.key]) { + pkg.exports[entryPoint.key] = {}; + } + assert( + typeof value === "string", + "nesting of this complexity is not supported yet" + ); + pkg.exports[entryPoint.key][key] = processEntryPoint( + value, + pkg.exports[entryPoint.key][key] + ); + } + } + } + }); + + // add legacy-style exports for `@apollo/client/index.js`, `@apollo/client/core/index.js`, + // `@apollo/client/main.cjs`, `@apollo/client/core/core.cjs`, etc. + // adding full entries for these would completely reiterate the other exports, + // not doing so would break things like a `production`/`development` distinction. + // instead, we create a new directory structure with stub files that `export * from "@apollo/client/..." + // which will then be picked up by the detailed export maps + for (const entryPoint of entryPoints) { + const from = `@apollo/client/${entryPoint.key.substring(2)}`.replace( + /\/$/, + "" + ); + const baseName = + options.type === "esm" ? "index" : entryPoint.dirs.at(-1) || "main"; + await writeLegacyExport(entryPoint.dirs, baseName, from); + } + if (options.type === "cjs") { + // Legacy entry point for `@apollo/client/apollo-client.cjs`. + // This was a rolled-up build in the past, while now it's one of many compiled files. + // It's probably still better to have this available in case someone ever used it with bundlers. + await writeLegacyExport([], "apollo-client", "@apollo/client"); + } + + function processEntryPoint(value: string, existing: ConditionRoot = {}) { + value = value.replace( + /^.\/src/, + `.${options.targetDir.replace(/^dist/, "")}` + ); + + if (options.type === "esm") { + const target = value.replace(/\.ts$/, `.${options.jsExt}`); + existing.module = target; + existing["module-sync"] = target; + // this will be handled by `default`, which directly follows, so we can omit it + // existing.import = target; + existing.default = target; + } else { + existing.require = value.replace(/\.ts$/, `.${options.jsExt}`); + } + return JSON.parse( + JSON.stringify(existing, [ + // ensure the order of keys is consistent + "react-compiler", + "module", + "module-sync", + "require", + "import", + "default", + ]) + ); + } + + async function writeLegacyExport( + dirs: string[], + baseName: string, + from: string + ) { + const dirname = join(options.packageRoot, "legacyEntryPoints", ...dirs); + await mkdir(dirname, { recursive: true }); + await writeFile( + join(dirname, `${baseName}.d.${options.tsExt}`), + `export * from "${from}";`, + { encoding: "utf-8" } + ); + await writeFile( + join(dirname, `${baseName}.${options.jsExt}`), + options.type === "esm" ? + `export * from "${from}";` + : `module.exports = require("${from}");`, + { encoding: "utf-8" } + ); + } +}; diff --git a/config/helpers.ts b/config/helpers.ts index 58c306ae378..12fef37120a 100644 --- a/config/helpers.ts +++ b/config/helpers.ts @@ -1,53 +1,280 @@ +import * as assert from "node:assert"; +import { glob, unlink, writeFile } from "node:fs/promises"; +import { mkdir, readFile, rm, symlink } from "node:fs/promises"; +import { relative } from "node:path"; import * as path from "path"; -import * as recast from "recast"; -import * as parser from "recast/parsers/babel"; -import glob = require("glob"); -export const distDir = path.resolve(__dirname, "..", "dist"); +import { ApiModelGenerator } from "@microsoft/api-extractor/lib/generators/ApiModelGenerator.js"; +import type { ApiItem, ApiPackage } from "@microsoft/api-extractor-model"; +import { + ApiDeclaredItem, + ApiEntryPoint, + ApiNamespace, +} from "@microsoft/api-extractor-model"; +import { apiItem_onParentChanged } from "@microsoft/api-extractor-model/lib/items/ApiItem.js"; +import { TSDocParser } from "@microsoft/tsdoc"; +import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.js"; +import * as recast from "recast"; +import * as parser from "recast/parsers/babel.js"; +import * as tsParser from "recast/parsers/typescript.js"; +// @ts-ignore unfortunately we don't have types for this as it's JS with JSDoc +// eslint-disable-next-line import/no-unresolved +import * as sorcery from "sorcery"; -export function eachFile( - dir: string, - callback: (absPath: string, relPath: string) => any -) { - const promises: Promise[] = []; +import type { JSONSchemaForNPMPackageJsonFiles } from "./schema.package.json.ts"; - return new Promise((resolve, reject) => { - glob(`${dir.replace(/\\/g, "/")}/**/*.js`, (error, files) => { - if (error) return reject(error); +export const distDir = path.resolve(import.meta.dirname, "..", "dist"); - files.sort().forEach((file) => { - const relPath = path.relative(dir, file); +export function reparse(source: string) { + return recast.parse(source, { parser }); +} - // Outside the distDir, somehow. - if (relPath.startsWith("../")) return; +export function reprint(ast: ReturnType) { + return recast.print(ast).code; +} - // Avoid re-transforming CommonJS bundle files. - if (relPath.endsWith(".cjs")) return; - if (relPath.endsWith(".cjs.js")) return; - if (relPath.endsWith(".cjs.native.js")) return; +type MaybePromise = T | Promise; - // Avoid re-transforming CommonJS bundle files. - if (relPath.endsWith(".min.js")) return; +export async function applyRecast({ + glob: globString, + cwd, + transformStep, +}: { + glob: string; + cwd: string; + transformStep: (options: { + ast: recast.types.ASTNode; + sourceName: string; + relativeSourcePath: string; + }) => MaybePromise<{ + ast: recast.types.ASTNode; + targetFileName?: string; + copy?: boolean; + }>; +}) { + for await (let sourceFile of glob(globString, { + withFileTypes: true, + cwd, + exclude(fileName) { + return fileName.parentPath.indexOf("legacyEntryPoints") !== -1; + }, + })) { + const baseDir = sourceFile.parentPath; + const sourceFileName = sourceFile.name; + const sourcePath = path.join(baseDir, sourceFile.name); + const source = await readFile(sourcePath, { encoding: "utf8" }); + const sourceMapName = source.match(/\/\/# sourceMappingURL=(.*)$/m)?.[1]; + assert.ok( + sourceMapName, + `No source map found for file ${sourcePath} in ${source}` + ); + const sourceMapPath = path.join(baseDir, sourceMapName); + const sourceMapContents = JSON.parse( + await readFile(sourceMapPath, { + encoding: "utf8", + }) + ); - // This file is not meant to be imported or processed. - if (relPath.endsWith("invariantErrorCodes.js")) return; + // from now on, we're treating this data as if it were from an "intermediate" file instead + // we might want to override the original source file after all + // we place this in a "parallel folder" so relative paths have the same depth + const intermediateName = path.join("../intermediate", sourceFileName); + const intermediateNamePath = path.join(baseDir, intermediateName); - promises.push( - new Promise((resolve) => { - resolve(callback(file, relPath)); - }) - ); - }); + const ast = recast.parse(source, { + parser: tsParser, + sourceFileName: intermediateName, + }); + const transformResult = await transformStep({ + ast, + sourceName: sourceFileName, + relativeSourcePath: relative(cwd, sourcePath), + }); + const targetFileName = transformResult.targetFileName || sourceFileName; + const targetFilePath = path.join(baseDir, targetFileName); - resolve(); + const result = recast.print(transformResult.ast, { + sourceMapName: `${targetFileName}.map`, }); - }).then(() => Promise.all(promises)); + + if (!transformResult.copy) { + if (targetFileName !== sourceFileName) { + // we are renaming the files - as we won't be overriding in place, + // delete the old files + await rm(sourcePath); + await rm(sourceMapPath); + } else if (result.code === source) { + // no changes, so we can skip writing the file, which guarantees no further + // changes to the source map + continue; + } + } + + // load the resulting "targetFileName" and the intermediate file into sorcery + // it will read the original .ts source from the file system + const virtualFiles = { + content: { + [intermediateNamePath]: source, + [targetFilePath]: result.code, + }, + sourcemaps: { + [intermediateNamePath]: sourceMapContents, + [targetFilePath]: result.map, + }, + }; + // we use sorcery to combine all these source maps back into one + const chain = await sorcery.load(targetFilePath, virtualFiles); + // save everything back to the file system, applying the source map changes of the transformation + await chain.write(); + } } -export function reparse(source: string) { - return recast.parse(source, { parser }); +/** + * creates a pseudo "dist/node_modules" folder with + * "dist/node_modules/@apollo/client" symlinked to "dist" + * so that tools can pick up the client package as an "external" package + */ +export async function withPseudoNodeModules(fn: () => T) { + const node_modules = path.join(distDir, "node_modules"); + const parent = path.join(node_modules, "@apollo"); + const link = path.join(parent, "client"); + + try { + await mkdir(parent, { recursive: true }); + await unlink(link).catch(() => {}); + await symlink(distDir, link); + + return await fn(); + } finally { + await rm(node_modules, { recursive: true }); + } } -export function reprint(ast: ReturnType) { - return recast.print(ast).code; +export function frameComment(text: string) { + const framed = text + .split("\n") + .map((t) => (t.match(/\s+\*/) ? t.trim() : t)) + .map((t) => (!t.startsWith("*") ? "* " + t : t)) + .join("\n") + .replaceAll(/(^(\s*\*\s*\n)*|(\n\s*\*\s*)*$)/g, ""); + return `*\n${framed}\n`; +} + +type PackageJson = Omit & { + author: string; +}; + +export async function updatePackageJson( + dirname: string, + updater: (pkg: PackageJson) => PackageJson | void, + replacer: null | ((this: any, key: string, value: any) => any) = null +) { + const packageJsonPath = path.join(dirname, "package.json"); + const pkg = JSON.parse( + await readFile(packageJsonPath, "utf8") + ) as PackageJson; + const newContents = updater(pkg) ?? pkg; + await writeFile( + packageJsonPath, + JSON.stringify(newContents, replacer, 2) + "\n" + ); +} + +export function patchApiExtractorInternals() { + // The TSDoc parser mangles some parts of DocBlocks in a way that's problematic + // for us. + // This code is used to keep the original DocComment intact, so that we can + // use it later in the API docs. + + const orig_parseRange = TSDocParser.prototype.parseRange; + TSDocParser.prototype.parseRange = function (range) { + const parsed = orig_parseRange.call(this, range); + parsed.docComment.emitAsTsdoc = function () { + return range.toString(); + }; + return parsed; + }; + + /* + In `buildDocEntryPoints` we create a file with namespace re-exports for all sub-entrypoints. + We don't want to actually export these as namespaces, but instead want to turn them into additional `EntryPoint` objects. + API Extractor itself cannot load more than one entrypoint, although the file format supports it - so we patch the logic here to reorganize the structure before saving. + */ + const orig_buildApiPackage = ApiModelGenerator.prototype.buildApiPackage; + ApiModelGenerator.prototype.buildApiPackage = function ( + this: ApiModelGenerator + ) { + const mappings: Record = {}; + const apiPackage: ApiPackage = orig_buildApiPackage.call(this); + const mainEntrypoint = apiPackage.entryPoints[0]; + for (const [index, namespace] of Object.entries( + mainEntrypoint.members + // we iterate backwards so that we can remove entries without affecting the indexes + ).reverse()) { + if ( + !(namespace instanceof ApiNamespace) || + !namespace.name.startsWith("entrypoint_") + ) { + continue; + } + // we want to turn namespaces into entry points + const entryPoint = new ApiEntryPoint({ + name: namespace.name + .slice("entrypoint_".length) + .replace(/__/g, "/") + .replace(/_/g, "-"), + members: [], + }); + + for (const member of namespace.members) { + // this is an internal function call - the only way to "detach" an existing node + // from its parent, so that it can be added to the new entry point + member[apiItem_onParentChanged](undefined); + entryPoint.addMember(member); + } + + apiPackage.addMember(entryPoint); + + (mainEntrypoint.members as ApiItem[]).splice(+index, 1); + + mappings[ + namespace.canonicalReference.toString().slice(0, -":namespace".length) + ] = entryPoint.canonicalReference.toString(); + } + + function fixup(item: ApiItem) { + item.members.forEach(fixup); + if (item instanceof ApiDeclaredItem) { + for (const excerpt of item.excerptTokens) { + const stringified = excerpt.canonicalReference?.toString(); + if (stringified?.startsWith("@apollo/client!entrypoint_")) { + // @ts-ignore + excerpt["_canonicalReference"] = DeclarationReference.parse( + stringified.replace( + /(@apollo\/client!entrypoint_[^.]+)[.:]/, + (_, start) => { + if (!mappings[start]) { + throw new Error( + `No mapping found for ${start} in ${JSON.stringify( + mappings + )}` + ); + } + return mappings[start]; + } + ) + ); + } + } + } + } + + fixup(apiPackage); + return apiPackage; + }; + + return () => { + TSDocParser.prototype.parseRange = orig_parseRange; + ApiModelGenerator.prototype.buildApiPackage = orig_buildApiPackage; + }; } diff --git a/config/inlineInheritDoc.ts b/config/inlineInheritDoc.ts index 558be9f375f..42d96c880f6 100644 --- a/config/inlineInheritDoc.ts +++ b/config/inlineInheritDoc.ts @@ -1,8 +1,8 @@ /** - * This CLI tool will inline docblocks specified with `@inheritDoc` on build. - * + * This build step will inline docblocks specified with `@inheritDoc` on build. * * E.g. a in a dockblock like this: + * * ```js * /** {@inheritDoc @apollo/client!QueryOptions#query:member} *\/ * ``` @@ -16,37 +16,54 @@ * generally flattening types without repeating docs everywhere. * * You can get these "canonical ids" by running + * * ```sh * yarn docmodel * ``` + * * and looking at the generated [`client.api.json`](../docs/shared/client.api.json) file. */ /** End file docs */ // @ts-ignore -import { buildDocEntryPoints } from "./entryPoints.js"; -// @ts-ignore -import { Project, ts, printNode, Node } from "ts-morph"; -import { ApiModel, ApiDocumentedItem } from "@microsoft/api-extractor-model"; -import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference"; -import { StringBuilder, TSDocEmitter } from "@microsoft/tsdoc"; -import fs from "node:fs"; +import fs, { mkdirSync, symlinkSync } from "node:fs"; import path from "node:path"; + import { Extractor, ExtractorConfig, ExtractorLogLevel, } from "@microsoft/api-extractor"; +import { ApiDocumentedItem, ApiModel } from "@microsoft/api-extractor-model"; +import type { DocComment, DocExcerpt, DocNode } from "@microsoft/tsdoc"; +import type { TextRange } from "@microsoft/tsdoc"; +import { DeclarationReference } from "@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference.js"; +import { visit } from "recast"; -console.log( - "Processing {@inheritDoc } comments in .d.ts files." -); +import type { BuildStep, BuildStepOptions } from "./build.ts"; +import { buildDocEntryPoints } from "./entryPoints.ts"; +import { + applyRecast, + frameComment, + patchApiExtractorInternals, + withPseudoNodeModules, +} from "./helpers.ts"; -const model = loadApiModel(); -processComments(); +export const inlineInheritDoc: BuildStep = async (options) => { + console.log( + "Processing {@inheritDoc } comments in .d.ts files." + ); -function getCommentFor(canonicalReference: string) { + const model = await withPseudoNodeModules(() => loadApiModel(options)); + await processComments(model, options); +}; + +function getCommentFor( + canonicalReference: string, + variables: undefined | Record, + model: ApiModel +) { const apiItem = model.resolveDeclarationReference( DeclarationReference.parse(canonicalReference), undefined @@ -57,11 +74,27 @@ function getCommentFor(canonicalReference: string) { ); if (apiItem instanceof ApiDocumentedItem) { if (!apiItem.tsdocComment) return ""; - const stringBuilder = new StringBuilder(); - const emitter = new TSDocEmitter(); - emitter["_emitCommentFraming"] = false; - emitter["_renderCompleteObject"](stringBuilder, apiItem.tsdocComment); - return stringBuilder.toString(); + const unusedVariables = new Set(Object.keys(variables || {})); + let string = renderDocComment(apiItem.tsdocComment); + + string = string.replaceAll(/\\?\{\\?\{(\w+)\\?\}\\?\}/g, (_, variable) => { + unusedVariables.delete(variable); + const value = variables?.[variable]; + if (value === undefined) { + throw new Error( + `Variable "${variable}" is required but not defined for @inheritDoc "${canonicalReference}"` + ); + } + return value; + }); + if (unusedVariables.size > 0) { + throw new Error( + `Variables ${[...unusedVariables].join( + ", " + )} are defined but not used in @inheritDoc "${canonicalReference}"` + ); + } + return string; } else { throw new Error( `"${canonicalReference}" is not documented, so no documentation can be inherited.` @@ -69,18 +102,28 @@ function getCommentFor(canonicalReference: string) { } } -function loadApiModel() { +function loadApiModel(options: BuildStepOptions) { const tempDir = fs.mkdtempSync("api-model"); try { const entryPointFile = path.join(tempDir, "entry.d.ts"); - fs.writeFileSync(entryPointFile, buildDocEntryPoints()); + fs.writeFileSync(entryPointFile, buildDocEntryPoints(options)); + mkdirSync(path.join(tempDir, "node_modules", "@apollo"), { + recursive: true, + }); + symlinkSync( + options.packageRoot, + path.join(tempDir, "node_modules", "@apollo", "client") + ); // Load and parse the api-extractor.json file const configObjectFullPath = path.resolve( - __dirname, + import.meta.dirname, "../api-extractor.json" ); - const packageJsonFullPath = path.resolve(__dirname, "../package.json"); + const packageJsonFullPath = path.resolve( + import.meta.dirname, + "../package.json" + ); const tempModelFile = path.join(tempDir, "client.api.json"); const configObject = ExtractorConfig.loadFile(configObjectFullPath); @@ -119,7 +162,9 @@ function loadApiModel() { configObjectFullPath, }); + const restore = patchApiExtractorInternals(); Extractor.invoke(extractorConfig); + restore(); const model = new ApiModel(); model.loadPackage(tempModelFile); @@ -129,45 +174,100 @@ function loadApiModel() { } } -function processComments() { - const inheritDocRegex = /\{@inheritDoc ([^}]+)\}/; +function processComments(model: ApiModel, options: BuildStepOptions) { + const inheritDocRegex = + /\{\s*@inheritDoc\s+(\S+)(?:\s+(\{[^}]*\}))?\s*\}(?:\s*$)?/; - const project = new Project({ - tsConfigFilePath: "tsconfig.json", - skipAddingFilesFromTsConfig: true, - }); + return applyRecast({ + glob: `**/*.{${options.jsExt},d.${options.tsExt}}`, + cwd: options.targetDir, + transformStep({ ast, sourceName }) { + return { + ast: visit(ast, { + visitNode(path) { + this.traverse(path); + const node = path.node; - const sourceFiles = project.addSourceFilesAtPaths("dist/**/*.d.ts"); - for (const file of sourceFiles) { - file.forEachDescendant((node) => { - if ( - Node.isPropertySignature(node) || - Node.isMethodSignature(node) || - Node.isMethodDeclaration(node) || - Node.isCallSignatureDeclaration(node) || - Node.isInterfaceDeclaration(node) - ) { - const docsNode = node.getJsDocs()[0]; - if (!docsNode) return; - const oldText = docsNode.getInnerText(); - let newText = oldText; - while (inheritDocRegex.test(newText)) { - newText = newText.replace( - inheritDocRegex, - (_, canonicalReference) => { - return getCommentFor(canonicalReference) || ""; + if (!node.comments) { + return; } - ); - } - if (oldText !== newText) { - docsNode.replaceWithText(frameComment(newText)) as any; - } - } - }); - file.saveSync(); - } + + for (const comment of node.comments) { + if (comment.type === "CommentBlock") { + let newText = comment.value; + while (inheritDocRegex.test(newText)) { + newText = newText.replace( + inheritDocRegex, + (_, canonicalReference, variables) => { + try { + return ( + getCommentFor( + canonicalReference, + variables ? JSON.parse(variables) : undefined, + model + ) || "" + ); + } catch (e) { + console.warn("\n\n" + e.message); + process.exitCode = 1; + } + } + ); + } + if (newText.includes("@inheritDoc")) { + console.warn( + "\n\nFound @inheritDoc after processing, something went wrong.", + { + sourceName, + originalText: comment.value, + finalReplacement: newText, + } + ); + process.exitCode = 1; + } + if (comment.value !== newText) { + comment.value = frameComment(newText); + } + } + } + }, + }), + }; + }, + }); } -function frameComment(text: string) { - return `/**\n * ${text.trim().replace(/\n/g, "\n * ")}\n */`; +function renderDocComment(node: DocComment): string { + let commentRange: TextRange | undefined = undefined; + function iterate(node: undefined | DocNode | readonly DocNode[]) { + if (!node) return; // no node + if (commentRange) return; // we already found what we're looking for + if ("forEach" in node) { + node.forEach(iterate); + return; + } + if (node.kind === "Excerpt") { + const excerptNode = node as DocExcerpt; + commentRange = excerptNode.content.parserContext.commentRange; + } + node.getChildNodes().forEach(iterate); + } + iterate(node); + + if (!commentRange) { + return ""; + } + + let text = commentRange.toString(); + return text + .slice(2, -2) + .split("\n") + .map((line) => + line + // remove leading ` *` or ` * ` + .replace(/^\s*\* ?/, "") + // remove singular trailing spaces, but preserve multiple trailing spaces as those have a meaning in markdown + .replace(/(?/config/jest/setup.ts"], - globals: { - __DEV__: true, - }, testEnvironmentOptions: { url: "http://localhost", }, @@ -14,32 +16,33 @@ const defaults = { printBasicPrototype: true, }, transform: { - "^.+\\.tsx?$": [ + "(dist/.+\\.js|\\.tsx?)$": [ "ts-jest", { - diagnostics: { - warnOnly: process.env.TEST_ENV !== "ci", - }, + // just transpile, no type checking. We type-check in CI by running `tsc` directly. + isolatedModules: true, + tsconfig: join(import.meta.dirname, "..", "tsconfig.tests.json"), }, ], }, - resolver: "ts-jest-resolver", + resolver: "/config/jest/resolver.ts", + transformIgnorePatterns: ["/node_modules/(?!(rxjs)/)"], + prettierPath: null, + moduleNameMapper: { + // Our internal testing utilities are not part of the final build, so we + // want to always import them from the source directory. + "^@apollo/client/testing/internal$": "/testing/internal/index.ts", + }, }; +const ignoreDTSFiles = ".d.ts$"; const ignoreTSFiles = ".ts$"; const ignoreTSXFiles = ".tsx$"; -const react19TestFileIgnoreList = [ - ignoreTSFiles, - // The HOCs and Render Prop Components have been deprecated since March 2020, - // and to test them we would need to rewrite a lot of our test suites. - // We will not support them any more for React 19. - // They will probably work, but we make no more guarantees. - "src/react/hoc/.*", - "src/react/components/.*", -]; +const react19TestFileIgnoreList = [ignoreDTSFiles, ignoreTSFiles]; const react17TestFileIgnoreList = [ + ignoreDTSFiles, ignoreTSFiles, // We only support Suspense with React 18, so don't test suspense hooks with // React 17 @@ -50,12 +53,27 @@ const react17TestFileIgnoreList = [ "src/react/hooks/__tests__/useLoadableQuery.test.tsx", "src/react/hooks/__tests__/useQueryRefHandlers.test.tsx", "src/react/query-preloader/__tests__/createQueryPreloader.test.tsx", + "src/react/ssr/__tests__/prerenderStatic.test.tsx", ]; const tsStandardConfig = { ...defaults, displayName: "Core Tests", - testPathIgnorePatterns: [ignoreTSXFiles], + testPathIgnorePatterns: [ + ignoreDTSFiles, + ignoreTSXFiles, + "src/local-state/__tests__/LocalState/testUtils.ts", + "src/local-state/__tests__/LocalState/fixtures/.*.ts$", + ], +}; + +const tsRxJSMinConfig = { + ...tsStandardConfig, + displayName: "Core Tests - RxJS min version", + moduleNameMapper: { + ...tsStandardConfig.moduleNameMapper, + "^rxjs$": "rxjs-min", + }, }; // For both React (Jest) "projects", ignore core tests (.ts files) as they @@ -69,8 +87,13 @@ const standardReact19Config = { const standardReact18Config = { ...defaults, displayName: "ReactDOM 18", - testPathIgnorePatterns: [ignoreTSFiles], + testPathIgnorePatterns: [ + ignoreDTSFiles, + ignoreTSFiles, + "src/react/ssr/__tests__/prerenderStatic.test.tsx", + ], moduleNameMapper: { + ...defaults.moduleNameMapper, "^react$": "react-18", "^react-dom$": "react-dom-18", "^react-dom/(.*)$": "react-dom-18/$1", @@ -82,6 +105,7 @@ const standardReact17Config = { displayName: "ReactDOM 17", testPathIgnorePatterns: react17TestFileIgnoreList, moduleNameMapper: { + ...defaults.moduleNameMapper, "^react$": "react-17", "^react-dom$": "react-dom-17", "^react-dom/client$": "/../config/jest/react-dom-17-client.js", @@ -90,9 +114,10 @@ const standardReact17Config = { }, }; -module.exports = { +export default { projects: [ tsStandardConfig, + tsRxJSMinConfig, standardReact17Config, standardReact18Config, standardReact19Config, diff --git a/config/listImports.ts b/config/listImports.ts new file mode 100644 index 00000000000..51d04598d4b --- /dev/null +++ b/config/listImports.ts @@ -0,0 +1,30 @@ +/** + * used via e.g. + * + * ```sh + * node --experimental-transform-types --no-warnings --conditions 'react-server' config/listImports.ts @apollo/client/react + * ``` + * + * from `src/__tests__/exports.ts` + */ +// @ts-ignore +import { registerHooks } from "node:module"; + +registerHooks({ + resolve(specifier, context, nextResolve) { + try { + return nextResolve(specifier, context); + } catch (e) { + if (specifier.endsWith(".js")) { + for (const ext of [".ts", ".tsx"]) { + return nextResolve(specifier.slice(0, -3) + ext, context); + } + } + throw e; + } + }, +}); + +Object.keys(await import(process.argv[2])) + .sort() + .forEach((i) => console.log(i)); diff --git a/config/madge.ts b/config/madge.ts new file mode 100644 index 00000000000..201fe938412 --- /dev/null +++ b/config/madge.ts @@ -0,0 +1,38 @@ +import { join } from "node:path"; + +import * as madgePkg from "madge"; +const madge = madgePkg.default; +process.env.DEBUG = "*"; + +for (const customConditions of [[], ["development"], ["production"]]) { + const inst = await madge(join(import.meta.dirname, "../src"), { + baseDir: join(import.meta.dirname, ".."), + fileExtensions: ["ts", "tsx", "js", "jsx"], + tsConfig: { + compilerOptions: { + moduleResolution: "NodeNext", + customConditions, + }, + }, + includeNpm: true, + detectiveOptions: { + ts: { + skipTypeImports: true, + }, + }, + }); + const circular = inst.circular(); + if (circular.length) { + process.exitCode = 1; + console.warn( + "❌ Circular dependencies found for customConditions:", + customConditions + ); + console.log(circular); + } else { + console.log( + "✅ No circular dependencies found for customConditions:", + customConditions + ); + } +} diff --git a/config/postprocessDist.ts b/config/postprocessDist.ts deleted file mode 100644 index 6599c54ad0f..00000000000 --- a/config/postprocessDist.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { distDir } from "./helpers.ts"; -import fs from "node:fs"; -import path from "node:path"; - -const globalTypesFile = path.resolve(distDir, "utilities/globals/global.d.ts"); -fs.writeFileSync( - globalTypesFile, - fs - .readFileSync(globalTypesFile, "utf8") - .split("\n") - .filter((line) => line.trim() !== "const __DEV__: boolean;") - .join("\n"), - "utf8" -); diff --git a/config/precheck.js b/config/precheck.ts similarity index 68% rename from config/precheck.js rename to config/precheck.ts index 31548802c02..8a2f4bc391f 100644 --- a/config/precheck.js +++ b/config/precheck.ts @@ -1,6 +1,7 @@ -const { lockfileVersion } = require("../package-lock.json"); +import lockfile from "../package-lock.json" with { type: "json" }; +const { lockfileVersion } = lockfile; -const expectedVersion = 2; +const expectedVersion = 3; if (typeof lockfileVersion !== "number" || lockfileVersion < expectedVersion) { throw new Error( diff --git a/config/prepareChangesetsRelease.ts b/config/prepareChangesetsRelease.ts deleted file mode 100644 index 171503939b0..00000000000 --- a/config/prepareChangesetsRelease.ts +++ /dev/null @@ -1,41 +0,0 @@ -// The Apollo Client source that is published to npm is prepared via -// config/prepareDist.js. -// -// If a release is being manually published, npm run build (which in turn runs -// prepareDist.js via postbuild script) performs all of the necessary processing -// to prepare the release. However, if a release is being automatically -// published via Changesets, there are some additional required -// steps: -// -// - Copy the .changeset folder into "dist" so Changesets can pick up the -// markdown changesets when generating the release. -// - Copy CHANGELOG.md into "dist" so Changesets can use it to generate release -// notes. -// - Add both .changeset and CHANGELOG.md to an .npmignore so they are not -// included in the published package. - -const fs = require("fs"); -const path = require("path"); - -const distRoot = `${__dirname}/../dist`; -const srcDir = `${__dirname}/..`; -const destDir = `${srcDir}/dist`; - -// recursive copy function -function copyDir(src: string, dest: string) { - fs.mkdirSync(dest, { recursive: true }); - let entries = fs.readdirSync(src, { withFileTypes: true }); - - for (let entry of entries) { - let srcPath = path.join(src, entry.name); - let destPath = path.join(dest, entry.name); - - entry.isDirectory() ? - copyDir(srcPath, destPath) - : fs.copyFileSync(srcPath, destPath); - } -} - -fs.copyFileSync(`${srcDir}/CHANGELOG.md`, `${destDir}/CHANGELOG.md`); -copyDir(`${srcDir}/.changeset`, `${destDir}/.changeset`); -fs.writeFileSync(`${destDir}/.npmignore`, `.changeset\nCHANGELOG.md`); diff --git a/config/prepareDist.js b/config/prepareDist.js deleted file mode 100644 index e96c108840c..00000000000 --- a/config/prepareDist.js +++ /dev/null @@ -1,104 +0,0 @@ -// The Apollo Client source that is published to npm is located in the -// "dist" directory. This utility script is called when building Apollo Client, -// to make sure the "dist" directory is prepared for publishing. -// -// This script will: -// -// - Copy the current root package.json into "dist" after adjusting it for -// publishing. -// - Copy the supporting files from the root into "dist" (e.g. `README.MD`, -// `LICENSE`, etc.). -// - Create a new `package.json` for each sub-set bundle we support, and -// store it in the appropriate dist sub-directory. - -const fs = require("fs"); -const path = require("path"); -const recast = require("recast"); - -const distRoot = `${__dirname}/../dist`; - -/* @apollo/client */ - -const packageJson = require("../package.json"); -const entryPoints = require("./entryPoints.js"); - -// Enable default interpretation of .js files as ECMAScript modules. We don't -// put this in the source ../package.json file because it interferes with tools -// like ts-node, which we use to run various ../config/*.ts scripts. -// TODO(benjamn) Fully diagnose that interference. -packageJson.type = "module"; - -// The root package.json is marked as private to prevent publishing -// from happening in the root of the project. This sets the package back to -// public so it can be published from the "dist" directory. -packageJson.private = false; - -// Remove package.json items that we don't need to publish -delete packageJson.scripts; -delete packageJson.bundlesize; -delete packageJson.engines; - -// The root package.json points to the CJS/ESM source in "dist", to support -// on-going package development (e.g. running tests, supporting npm link, etc.). -// When publishing from "dist" however, we need to update the package.json -// to point to the files within the same directory. -const distPackageJson = - JSON.stringify( - packageJson, - (_key, value) => { - if (typeof value === "string" && value.startsWith("./dist/")) { - const parts = value.split("/"); - parts.splice(1, 1); // remove dist - return parts.join("/"); - } - return value; - }, - 2 - ) + "\n"; - -// Save the modified package.json to "dist" -fs.writeFileSync(`${distRoot}/package.json`, distPackageJson); - -// Copy supporting files into "dist" -const srcDir = `${__dirname}/..`; -const destDir = `${srcDir}/dist`; -fs.copyFileSync(`${srcDir}/README.md`, `${destDir}/README.md`); -fs.copyFileSync(`${srcDir}/LICENSE`, `${destDir}/LICENSE`); - -// Create individual bundle package.json files, storing them in their -// associated dist directory. This helps provide a way for the Apollo Client -// core to be used without React, as well as AC's cache, utilities, SSR, -// components, HOC, and various links to be used by themselves, via CommonJS -// entry point files that only include the exports needed for each bundle. -entryPoints.forEach(function buildPackageJson({ - dirs, - bundleName = dirs[dirs.length - 1], - sideEffects = false, -}) { - if (!dirs.length) return; - fs.writeFileSync( - path.join(distRoot, ...dirs, "package.json"), - JSON.stringify( - { - name: path.posix.join("@apollo", "client", ...dirs), - type: "module", - main: `${bundleName}.cjs`, - module: "index.js", - types: "index.d.ts", - sideEffects, - }, - null, - 2 - ) + "\n" - ); -}); - -entryPoints.forEach(function buildCts({ - dirs, - bundleName = dirs[dirs.length - 1], -}) { - fs.writeFileSync( - path.join(distRoot, ...dirs, `${bundleName}.d.cts`), - 'export * from "./index.d.ts";\n' - ); -}); diff --git a/config/prepareDist.ts b/config/prepareDist.ts new file mode 100644 index 00000000000..c049c6f51b3 --- /dev/null +++ b/config/prepareDist.ts @@ -0,0 +1,78 @@ +// The Apollo Client source that is published to npm is located in the +// "dist" directory. This utility script is called when building Apollo Client, +// to make sure the "dist" directory is prepared for publishing. +// +// This script will: +// +// - Copy the current root package.json into "dist" after adjusting it for +// publishing. +// - Copy the supporting files from the root into "dist" (e.g. `README.MD`, +// `LICENSE`, etc.). +// - Create a new `package.json` for each sub-set bundle we support, and +// store it in the appropriate dist sub-directory. + +import { copyFile, mkdir } from "node:fs/promises"; +import { join } from "node:path"; + +import type { BuildStep } from "./build.ts"; +import { updatePackageJson } from "./helpers.ts"; + +export const prepareDist: BuildStep = async (options) => { + if (!options.first) return; + + await mkdir(options.packageRoot, { recursive: true }); + await copyFile( + join(options.rootDir, "package.json"), + join(options.packageRoot, "package.json") + ); + await updatePackageJson( + options.packageRoot, + (packageJson) => { + // The root package.json is marked as private to prevent publishing + // from happening in the root of the project. This sets the package back to + // public so it can be published from the "dist" directory. + packageJson.private = false; + + // Remove package.json items that we don't need to publish + delete packageJson.scripts; + delete packageJson.bundlesize; + delete packageJson.devEngines; + delete packageJson.devDependencies; + delete packageJson.overrides; + + packageJson.exports = { + "./package.json": "./package.json", + "./*.js": "./legacyEntryPoints/*.js", + "./*.cjs": "./legacyEntryPoints/*.cjs", + "./*.d.ts": "./legacyEntryPoints/*.d.ts", + "./*.d.cts": "./legacyEntryPoints/*.d.cts", + }; + }, + (_key: any, value: any) => { + // The root package.json points to the CJS/ESM source in "dist", to support + // on-going package development (e.g. running tests, supporting npm link, etc.). + // When publishing from "dist" however, we need to update the package.json + // to point to the files within the same directory. + if (typeof value === "string" && value.startsWith("./dist/")) { + const parts = value.split("/"); + parts.splice(1, 1); // remove dist + return parts.join("/"); + } + return value; + } + ); + + // Copy supporting files into "dist" + await copyFile( + `${options.rootDir}/README.md`, + `${options.packageRoot}/README.md` + ); + await copyFile( + `${options.rootDir}/LICENSE`, + `${options.packageRoot}/LICENSE` + ); + await copyFile( + `${options.rootDir}/CHANGELOG.md`, + `${options.packageRoot}/CHANGELOG.md` + ); +}; diff --git a/config/prettier/format-jsdoc.js b/config/prettier/format-jsdoc.js new file mode 100644 index 00000000000..cd9af4b0066 --- /dev/null +++ b/config/prettier/format-jsdoc.js @@ -0,0 +1,88 @@ +/** @import { TSESTree as AST } from '@typescript-eslint/types' */ +/** @import { Plugin, Printer } from 'prettier' */ + +import * as prettier from "prettier"; +import estree from "prettier/plugins/estree.js"; +import { parsers as tsParsers } from "prettier/plugins/typescript"; + +/** @type {Plugin["languages"]} */ +export const languages = [ + { + name: "TypeScript", + parsers: ["typescript-with-jsdoc"], + }, +]; +/** @type {Plugin["parsers"]} */ +export const parsers = { + "typescript-with-jsdoc": { + ...tsParsers.typescript, + astFormat: "typescript-with-jsdoc", + }, +}; +/** @type {Printer} */ +const estreePrinter = estree.printers.estree; +/** @type {Plugin["printers"]} */ +export const printers = { + "typescript-with-jsdoc": { + ...estreePrinter, + print(path, options, print, args) { + return estreePrinter.print(path, options, print, args); + }, + embed(path, options) { + if (path.node.comments) { + return async (textToDocForEmbed, mainPrint, path, options) => { + const newComments = await Promise.all( + Object.entries(path.node.comments) + .filter( + (/* @type {[string, AST.Comment]} */ [, comment]) => + comment.type === "Block" && comment.value[0] === "*" + ) + .map( + async (/* @type {[string, AST.Comment]} */ [key, comment]) => { + const doc = await textToDocForEmbed( + comment.value + .split("\n") + .map((line) => line.replace(/^\s*\*/g, "")) + .join("\n"), + { + parser: "markdown", + } + ); + const string = prettier.doc.printer.printDocToString(doc, { + ...options, + proseWrap: "preserve", + trailingComma: "none", + }).formatted; + // keep it single-line if it originally was single-line + if ( + comment.value.trim().indexOf("\n") === -1 && + string.trim().indexOf("\n") === -1 + ) { + return [key, `* ${string} `]; + } + + return [ + key, + "*\n" + + string + .split("\n") + .map((line) => "* " + line) + .join("\n") + + "\n", + ]; + } + ) + ); + for (const [i, newCommment] of newComments) { + /* @type {AST.Comment} */ + const nodeComent = path.node.comments[i]; + nodeComent.value = newCommment; + } + + return mainPrint(path.node); + }; + } + return undefined; + }, + }, +}; diff --git a/config/prettier/format-mdx3.js b/config/prettier/format-mdx3.js new file mode 100644 index 00000000000..29a140bcba4 --- /dev/null +++ b/config/prettier/format-mdx3.js @@ -0,0 +1,132 @@ +/** @import { Plugin } from 'prettier' */ + +import * as prettier from "prettier"; +import markdown from "prettier/plugins/markdown.js"; + +/** @type {Plugin["languages"]} */ +export const languages = [ + { + name: "MDX", + parsers: ["mdx3"], + extensions: [".mdx"], + }, +]; +/** @type {Plugin["parsers"]} */ +export const parsers = { + mdx3: { + ...markdown.parsers.mdx, + astFormat: "mdx3", + }, +}; + +// matches e.g. "[!code ++]" "[!code highlight:3]" "[!code word:Cache]" or "[!code word:Cache:123]" +const codePattern = /\[!code ([a-z+-]+|word:((?:\\.|[^:\]])+))(:\d+)?\]/; +// matches repetitions with surrounding and in-between spaces, so e.g. "[!code ++] [!code highlight:3]" +const multiCodePattern = new RegExp(`(\\s*${codePattern.source})+\\s*`); +const patterns = [ + // "", "" + new RegExp(``, "g"), + // "{/* [!code ++] */", "/* [!code ++] [!code highlight:3] */}" + new RegExp(`[{]/[*]${multiCodePattern.source}[*]/[}]`, "g"), + // "/* [!code ++] */", "/* [!code ++] [!code highlight:3] */" + new RegExp(`/[*]${multiCodePattern.source}[*]/`, "g"), + // end-of line comments like "// [!code ++]", "# [!code highlight:3]", "-- [!code word:Cache] [!code --]"" + new RegExp(`(//|["'#]|;{1,2}|%{1,2}|--)${multiCodePattern.source}$`, "gm"), +]; +const specialCommentPattern = new RegExp( + `(${patterns.map((p) => `(${p.source})`).join("|")})`, + "gm" +); + +/** + * Applied to code blocks to preserve special comments like `// [!code ...]` on the same line. + */ +function handleCodeBlockWithSpecialComments(node, path, options) { + // Check if this code block has special comments + const commentMatches = [...node.value.matchAll(specialCommentPattern)]; + // Nothing to do. + if (commentMatches.length == 0) return null; + + /** `true` if comment should be inline, `false` if it should be on a new line. */ + const commentsInline = commentMatches.map((commentMatch) => { + for ( + let index = commentMatch.index - 1, char = node.value[index]; + index >= 0 && char !== "\n"; + char = node.value[--index] + ) { + const char = node.value[index]; + if (char !== " " && char !== "\t") { + return true; + } + } + return false; + }); + + // Use default formatting first + const defaultEmbed = markdown.printers.mdast.embed(path, options); + return async (textToDoc) => { + let stringResult = prettier.doc.printer.printDocToString( + await defaultEmbed(textToDoc), + options + ).formatted; + + const formattedCommentMatches = [ + ...stringResult.matchAll(specialCommentPattern), + ]; + + // Process each comment in reverse order to avoid index shifting + for (let i = formattedCommentMatches.length - 1; i >= 0; i--) { + const commentMatch = formattedCommentMatches[i]; + const shouldBeInline = commentsInline[i]; + if (!shouldBeInline) continue; + + // Find the preceding non-whitespace character, starting from the comment position + let insertPos = commentMatch.index - 1; + while (insertPos >= 0 && /\s/.test(stringResult[insertPos])) { + insertPos--; + } + + stringResult = + stringResult.substring(0, insertPos + 1) + + stringResult.substring(commentMatch.index); + } + + return stringResult; + }; +} + +/** @type {Plugin["printers"]} */ +export const printers = { + mdx3: { + ...markdown.printers.mdast, + embed(path, options) { + const node = path.node; + + if (node.type === "code" && node.lang !== null) { + const result = handleCodeBlockWithSpecialComments(node, path, options); + if (result) return result; + } + + if (node.type === "jsx") { + // If the node was parsed incorrectly because it followed the MDX3 format (no spacing around JSX tags), + // we will not try to format it as MDX, but instead return the original value. + + // We detect that by looking at `value` - if it's only a starting or closing tag, it was parsed correctly. + const correctlyParsedMatch = node.value.match(/^(<\/?[^>]*>)$/); + if (!correctlyParsedMatch) + return ( + node.value + .split("\n") + // But we need to restore the original indentation + .map((line, idx) => + idx === 0 ? line : ( + " ".repeat(node.position.indent[idx - 1] - 1) + line + ) + ) + .join("\n") + ); + } + return markdown.printers.mdast.embed(path, options); + }, + }, +}; diff --git a/config/prettier/test.ts b/config/prettier/test.ts new file mode 100644 index 00000000000..c3033f2e8d3 --- /dev/null +++ b/config/prettier/test.ts @@ -0,0 +1,17 @@ +import * as prettier from "prettier"; +const code = ` +\`\`\`ts +const client = new ApolloClient({ + link: new HttpLink({ // [!code ++] + uri: "https://example.com/graphql", + }), +}); +\`\`\` +`; + +const result = await prettier.format(code, { + parser: "mdx3", + plugins: ["./format-mdx3.js"], +}); + +console.log(result); diff --git a/config/processInvariants.ts b/config/processInvariants.ts index 13f8e275016..63ce19fff99 100644 --- a/config/processInvariants.ts +++ b/config/processInvariants.ts @@ -1,278 +1,387 @@ import * as fs from "fs"; -import { posix, join as osPathJoin } from "path"; -import { distDir, eachFile, reparse, reprint } from "./helpers.ts"; -import type { ExpressionKind } from "ast-types/lib/gen/kinds"; - -eachFile(distDir, (file, relPath) => { - const source = fs.readFileSync(file, "utf8"); - const output = transform(source, relPath); - if (source !== output) { - fs.writeFileSync(file, output, "utf8"); - } -}).then(() => { - fs.writeFileSync( - osPathJoin(distDir, "invariantErrorCodes.js"), - recast.print(program, { - tabWidth: 2, - }).code + "\n" - ); -}); +import { join as osPathJoin, posix } from "path"; +import type { ExpressionKind } from "ast-types/lib/gen/kinds"; import * as recast from "recast"; + +import type { BuildStepOptions } from "./build.ts"; +import { applyRecast, reprint } from "./helpers.ts"; const b = recast.types.builders; const n = recast.types.namedTypes; type Node = recast.types.namedTypes.Node; type CallExpression = recast.types.namedTypes.CallExpression; type NewExpression = recast.types.namedTypes.NewExpression; -let nextErrorCode = 1; - -const program = b.program([]); -const allExports = { - errorCodes: getExportObject("errorCodes"), - devDebug: getExportObject("devDebug"), - devLog: getExportObject("devLog"), - devWarn: getExportObject("devWarn"), - devError: getExportObject("devError"), -}; -type ExportName = keyof typeof allExports; - -allExports.errorCodes.comments = [ - b.commentLine( - " This file is used by the error message display website and the", - true - ), - b.commentLine(" @apollo/client/includeErrors entry point.", true), - b.commentLine(" This file is not meant to be imported manually.", true), -]; - -function getExportObject(exportName: string) { - const object = b.objectExpression([]); - program.body.push( - b.exportNamedDeclaration( - b.variableDeclaration("const", [ - b.variableDeclarator(b.identifier(exportName), object), - ]) - ) + +export async function processInvariants(options: BuildStepOptions) { + const program = b.program([]); + let nextErrorCode = 1; + + const allExports = { + errorCodes: getExportObject("errorCodes"), + devDebug: getExportObject("devDebug"), + devLog: getExportObject("devLog"), + devWarn: getExportObject("devWarn"), + devError: getExportObject("devError"), + }; + type ExportName = keyof typeof allExports; + + allExports.errorCodes.comments = [ + b.commentLine( + " This file is used by the error message display website and the", + true + ), + b.commentLine(" @apollo/client/includeErrors entry point.", true), + b.commentLine(" This file is not meant to be imported manually.", true), + ]; + + await applyRecast({ + cwd: options.targetDir, + glob: `**/*.${options.jsExt}`, + transformStep: transform, + }); + + fs.writeFileSync( + osPathJoin(options.targetDir, `invariantErrorCodes.${options.jsExt}`), + recast.print(program, { + tabWidth: 2, + }).code + "\n" ); - return object; -} -function getErrorCode( - file: string, - expr: CallExpression | NewExpression, - type: keyof typeof allExports -): ExpressionKind { - if (isIdWithName(expr.callee, "invariant")) { - return extractString( - file, - allExports[type].properties, - expr.arguments[1], - expr.arguments[0] + function getExportObject(exportName: string) { + const object = b.objectExpression([]); + program.body.push( + b.exportNamedDeclaration( + b.variableDeclaration("const", [ + b.variableDeclarator(b.identifier(exportName), object), + ]) + ) ); - } else { - return extractString(file, allExports[type].properties, expr.arguments[0]); + return object; } - function extractString( + function getErrorCode( file: string, - target: (typeof allExports)[ExportName]["properties"], - message: recast.types.namedTypes.SpreadElement | ExpressionKind, - condition?: recast.types.namedTypes.SpreadElement | ExpressionKind + expr: CallExpression | NewExpression, + type: keyof typeof allExports ): ExpressionKind { - if (message.type === "ConditionalExpression") { - return b.conditionalExpression( - message.test, - extractString(file, target, message.consequent, condition), - extractString(file, target, message.alternate, condition) + if (isIdWithName(expr.callee, "invariant")) { + return extractString( + file, + allExports[type].properties, + expr.arguments[1], + expr.arguments[0] ); - } else if (isStringOnly(message)) { - const messageText = reprint(message); - if (messageText.includes("Apollo DevTools")) { - return message; - } + } else { + return extractString( + file, + allExports[type].properties, + expr.arguments[0] + ); + } + + function extractString( + file: string, + target: (typeof allExports)[ExportName]["properties"], + message: recast.types.namedTypes.SpreadElement | ExpressionKind, + condition?: recast.types.namedTypes.SpreadElement | ExpressionKind + ): ExpressionKind { + if (message.type === "ConditionalExpression") { + return b.conditionalExpression( + message.test, + extractString(file, target, message.consequent, condition), + extractString(file, target, message.alternate, condition) + ); + } else if (isStringOnly(message)) { + const messageText = reprint(message); + if (messageText.includes("Apollo DevTools")) { + return message; + } - const obj = b.objectExpression([]); - const numLit = b.numericLiteral(nextErrorCode++); - target.push(b.property("init", numLit, obj)); + const obj = b.objectExpression([]); + const numLit = b.numericLiteral(nextErrorCode++); + target.push(b.property("init", numLit, obj)); - obj.properties.push( - b.property( - "init", - b.identifier("file"), - b.stringLiteral("@apollo/client/" + file) - ) - ); - if (condition) { obj.properties.push( b.property( "init", - b.identifier("condition"), - b.stringLiteral(reprint(expr.arguments[0])) + b.identifier("file"), + b.stringLiteral( + options.targetDir.replace(/^dist/, "@apollo/client") + "/" + file + ) ) ); - } - obj.properties.push(b.property("init", b.identifier("message"), message)); + if (condition) { + obj.properties.push( + b.property( + "init", + b.identifier("condition"), + b.stringLiteral(reprint(expr.arguments[0])) + ) + ); + } + obj.properties.push( + b.property("init", b.identifier("message"), message) + ); - return numLit; - } else { - throw new Error(`invariant minification error: node cannot have dynamical error argument! - file: ${posix.join(distDir, file)}:${expr.loc?.start.line} + return numLit; + } else { + throw new Error(`invariant minification error: node cannot have dynamical error argument! + file: ${posix.join(options.targetDir, file)}:${expr.loc?.start.line} code: ${reprint(message)} `); + } } } -} -function transform(code: string, relativeFilePath: string) { - const ast = reparse(code); + function transform({ + ast, + relativeSourcePath, + }: { + ast: recast.types.ASTNode; + relativeSourcePath: string; + }) { + let fileRequiresDevImport = false; + if ( + relativeSourcePath !== + osPathJoin(`utilities`, `invariant`, `index.${options.jsExt}`) + ) + recast.visit(ast, { + visitCallExpression(path) { + this.traverse(path); + const node = path.node; - recast.visit(ast, { - visitCallExpression(path) { - this.traverse(path); - const node = path.node; + if (isCallWithLength(node, "invariant", 1)) { + const newArgs = [...node.arguments]; + newArgs.splice( + 1, + 1, + getErrorCode(relativeSourcePath, node, "errorCodes") + ); - if (isCallWithLength(node, "invariant", 1)) { - const newArgs = [...node.arguments]; - newArgs.splice( - 1, - 1, - getErrorCode(relativeFilePath, node, "errorCodes") - ); + return b.callExpression.from({ + ...node, + arguments: newArgs, + }); + } - return b.callExpression.from({ - ...node, - arguments: newArgs, - }); - } + if (isCallWithLength(node, "newInvariantError", 0)) { + const newArgs = [...node.arguments]; + newArgs.splice( + 0, + 1, + getErrorCode(relativeSourcePath, node, "errorCodes") + ); + + return b.callExpression.from({ + ...node, + arguments: newArgs, + }); + } + + if ( + node.callee.type === "MemberExpression" && + isIdWithName(node.callee.object, "invariant") && + isIdWithName(node.callee.property, "debug", "log", "warn", "error") + ) { + let newNode = node; + if (node.arguments[0].type !== "Identifier") { + const prop = node.callee.property; + if (!n.Identifier.check(prop)) throw new Error("unexpected type"); + + const newArgs = [...node.arguments]; + newArgs.splice( + 0, + 1, + getErrorCode( + relativeSourcePath, + node, + ("dev" + capitalize(prop.name)) as ExportName + ) + ); + newNode = b.callExpression.from({ + ...node, + arguments: newArgs, + }); + } + + if ( + isDEVLogicalAnd(path.parent.node) || + isIdWithName(node.callee.property, "error") + ) { + return newNode; + } + fileRequiresDevImport = true; + return b.logicalExpression("&&", makeDEVExpr(), newNode); + } + }, + }); + + if (fileRequiresDevImport) addDevImport(ast, options.type); + + return { ast }; + } + + function _isIdWithName(node: Node | null | undefined, ...names: string[]) { + return ( + node && + n.Identifier.check(node) && + names.some((name) => name === node.name) + ); + } + + /** + * wrapper around \_isIdWithName that also checks for cjs-transpiled code-patterns: + * + * ``` + * invariant(condition) + * ^^^^^^^^^ + * in CJS: + * (0, index_js_1.invariant)(condition) + * ^^^^^^^^^ + * or index_js_2.invariant.warn + * ^^^^^^^^^ + * ``` + */ + function isIdWithName(node: Node | null | undefined, ...names: string[]) { + return ( + _isIdWithName(node, ...names) || + (n.SequenceExpression.check(node) && + n.MemberExpression.check(node.expressions[1]) && + _isIdWithName(node.expressions[1].property, ...names)) || + (n.MemberExpression.check(node) && _isIdWithName(node.property, ...names)) + ); + } + + function isCallWithLength( + node: CallExpression | NewExpression, + name: string, + length: number + ) { + return isIdWithName(node.callee, name) && node.arguments.length > length; + } + + function isDEVLogicalAnd(node: Node) { + return ( + n.LogicalExpression.check(node) && + node.operator === "&&" && + isDEVExpr(node.left) + ); + } + + function makeDEVExpr() { + return b.identifier("__DEV__"); + } + + function isDEVExpr(node: Node) { + return isIdWithName(node, "__DEV__"); + } - if (isCallWithLength(node, "newInvariantError", 0)) { - const newArgs = [...node.arguments]; - newArgs.splice( - 0, - 1, - getErrorCode(relativeFilePath, node, "errorCodes") + function isStringOnly( + node: recast.types.namedTypes.ASTNode + ): node is ExpressionKind { + switch (node.type) { + case "StringLiteral": + case "Literal": + return true; + case "TemplateLiteral": + return (node.expressions as recast.types.namedTypes.ASTNode[]).every( + isStringOnly ); + case "BinaryExpression": + return ( + node.operator == "+" && + isStringOnly(node.left) && + isStringOnly(node.right) + ); + } + return false; + } - return b.callExpression.from({ - ...node, - arguments: newArgs, - }); + function capitalize(str: string) { + return str[0].toUpperCase() + str.slice(1); + } +} +function addDevImport(ast: recast.types.ASTNode, type: "esm" | "cjs") { + let fileRequiresDevImport = true; + // check if a dev import is already present + recast.visit(ast, { + visitImportDeclaration(path) { + const node = path.node; + if (node.source.value === "@apollo/client/utilities/environment") { + if ( + node.specifiers.some( + (s) => s.type === "ImportSpecifier" && s.imported.name === "__DEV__" + ) + ) { + fileRequiresDevImport = false; + return this.abort(); + } } - + return this.traverse(path); + }, + visitProgram(path) { + const node = path.node; if ( - node.callee.type === "MemberExpression" && - isIdWithName(node.callee.object, "invariant") && - isIdWithName(node.callee.property, "debug", "log", "warn", "error") - ) { - let newNode = node; - if (node.arguments[0].type !== "Identifier") { - const prop = node.callee.property; - if (!n.Identifier.check(prop)) throw new Error("unexpected type"); - - const newArgs = [...node.arguments]; - newArgs.splice( - 0, - 1, - getErrorCode( - relativeFilePath, - node, - ("dev" + capitalize(prop.name)) as ExportName + node.body.some( + (expr) => + expr.type === "VariableDeclaration" && + expr.declarations.some( + (declaration) => + declaration.type === "VariableDeclarator" && + ((declaration.id.type === "ObjectPattern" && + declaration.id.properties.some( + (p) => + p.type === "Property" && + p.key.type === "Identifier" && + p.key.name === "__DEV__" + )) || + (declaration.id.type === "Identifier" && + declaration.id.name === "__DEV__")) ) - ); - newNode = b.callExpression.from({ - ...node, - arguments: newArgs, - }); - } - - if (isDEVLogicalAnd(path.parent.node)) { - return newNode; - } - return b.logicalExpression("&&", makeDEVExpr(), newNode); + ) + ) { + fileRequiresDevImport = false; + return this.abort(); } + return this.traverse(path); }, }); - if ( - ![ - osPathJoin("utilities", "globals", "index.js"), - osPathJoin("config", "jest", "setup.js"), - ].includes(relativeFilePath) - ) + if (fileRequiresDevImport) { recast.visit(ast, { - visitIdentifier(path) { - this.traverse(path); + visitProgram(path) { const node = path.node; - if (isDEVExpr(node)) { - return b.binaryExpression( - "!==", - b.memberExpression( - b.identifier("globalThis"), - b.identifier("__DEV__") - ), - b.literal(false) + if (type === "esm") { + node.body.unshift( + b.importDeclaration( + [b.importSpecifier(b.identifier("__DEV__"))], + b.literal("@apollo/client/utilities/environment") + ) + ); + } else { + const identifier = b.identifier("__DEV__"); + node.body.unshift( + b.variableDeclaration("const", [ + b.variableDeclarator( + b.objectPattern([ + b.property.from({ + kind: "init", + key: identifier, + value: identifier, + shorthand: true, + }), + ]), + b.callExpression(b.identifier("require"), [ + b.literal("@apollo/client/utilities/environment"), + ]) + ), + ]) ); } - return node; + return false; }, }); - - return reprint(ast); -} - -function isIdWithName(node: Node | null | undefined, ...names: string[]) { - return ( - node && n.Identifier.check(node) && names.some((name) => name === node.name) - ); -} - -function isCallWithLength( - node: CallExpression | NewExpression, - name: string, - length: number -) { - return isIdWithName(node.callee, name) && node.arguments.length > length; -} - -function isDEVLogicalAnd(node: Node) { - return ( - n.LogicalExpression.check(node) && - node.operator === "&&" && - isDEVExpr(node.left) - ); -} - -function makeDEVExpr() { - return b.identifier("__DEV__"); -} - -function isDEVExpr(node: Node) { - return isIdWithName(node, "__DEV__"); -} - -function isStringOnly( - node: recast.types.namedTypes.ASTNode -): node is ExpressionKind { - switch (node.type) { - case "StringLiteral": - case "Literal": - return true; - case "TemplateLiteral": - return (node.expressions as recast.types.namedTypes.ASTNode[]).every( - isStringOnly - ); - case "BinaryExpression": - return ( - node.operator == "+" && - isStringOnly(node.left) && - isStringOnly(node.right) - ); } - return false; -} - -function capitalize(str: string) { - return str[0].toUpperCase() + str.slice(1); } diff --git a/config/react-compiler.ts b/config/react-compiler.ts new file mode 100644 index 00000000000..31ca2d72f4b --- /dev/null +++ b/config/react-compiler.ts @@ -0,0 +1,135 @@ +import { cp, mkdir } from "node:fs/promises"; +import { format, join, parse } from "node:path"; + +import { transformFromAstAsync } from "@babel/core"; +import { visit } from "recast"; + +import type { BuildStep } from "./build.ts"; +import { applyRecast, updatePackageJson } from "./helpers.ts"; + +export const reactCompiler: BuildStep = async (options) => { + if (options.type !== "esm") { + return; + } + await cp( + join(options.targetDir, "react", "hooks"), + join(options.targetDir, "react", "hooks-compiled"), + { recursive: true } + ); + await applyRecast({ + glob: `**/*.${options.jsExt}`, + cwd: join(options.targetDir, "react", "hooks-compiled"), + async transformStep({ ast, sourceName }) { + const result = await transformFromAstAsync(ast as any, undefined, { + filename: sourceName, + sourceFileName: sourceName, + sourceMaps: true, + code: false, + ast: true, + cloneInputAst: false, + retainLines: true, + plugins: [ + [ + "babel-plugin-react-compiler", + { + target: "17", + }, + ], + { + visitor: { + ImportDeclaration(path) { + // Rewrite imports for the React Compiler Runtime to our own copy + // until the upstream package is stable + if (path.node.source.value === "react-compiler-runtime") { + path.node.source.value = + "@apollo/client/react/internal/compiler-runtime"; + } + }, + }, + }, + ], + }); + return { ast: result.ast!, map: result.map }; + }, + }); + + const compilerVersion = ( + await import("babel-plugin-react-compiler/package.json", { + with: { type: "json" }, + }) + ).default.version; + + await applyRecast({ + glob: "index.{js,d.ts}", + cwd: join(options.targetDir, "react"), + transformStep({ ast, sourceName }) { + return { + targetFileName: sourceName.replace("index.", "index.compiled."), + copy: true, + ast: visit(ast, { + visitExportNamedDeclaration(path) { + if (path.node.source) { + const source = path.node.source.value.toString(); + if (source.startsWith("./hooks/")) { + path.node.source.value = source.replace( + "./hooks/", + "./hooks-compiled/" + ); + } + } + this.traverse(path); + }, + visitVariableDeclarator(path) { + if ( + path.node.id.type === "Identifier" && + path.node.id.name === "reactCompilerVersion" + ) { + path.node.init = { + type: "StringLiteral", + value: compilerVersion, + }; + } + this.traverse(path); + }, + }), + }; + }, + }); + await updatePackageJson(options.packageRoot, (pkg) => { + pkg.exports["./react/compiled"] = "./react/index.compiled.js"; + }); + + // add `react/compiled/index.js` entry point for `node10` resolution + await mkdir(join(options.targetDir, "react", "compiled")); + await applyRecast({ + glob: "index.{js,d.ts}", + cwd: join(options.targetDir, "react"), + transformStep({ ast, sourceName }) { + const originalFileName = parse(sourceName); + const targetFileName = format({ + ...originalFileName, + dir: join(originalFileName.dir, "compiled"), + }); + return { + targetFileName, + copy: true, + ast: { + type: "File", + program: { + type: "Program", + sourceType: "module", + body: [ + { + type: "ExportAllDeclaration", + source: { + type: "StringLiteral", + value: "../index.compiled.js", + }, + }, + ], + }, + }, + }; + }, + }); +}; diff --git a/config/rewriteSourceMaps.ts b/config/rewriteSourceMaps.ts deleted file mode 100644 index 7aafafd8065..00000000000 --- a/config/rewriteSourceMaps.ts +++ /dev/null @@ -1,48 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import { distDir } from "./helpers.ts"; -import glob = require("glob"); - -glob(`${distDir.replace(/\\/g, "/")}/**/*.js.map`, (error, files) => { - if (error) throw error; - - const rootDir = path.dirname(distDir); - - const startTime = Date.now(); - let rewriteCount = 0; - - Promise.all( - files.map(async (file) => { - const content = await fs.promises.readFile(file, "utf8"); - const map = JSON.parse(content); - if (map.sourcesContent) return; - if (map.sources) { - map.sourcesContent = await Promise.all( - map.sources.map((relSourcePath: string) => { - const sourcePath = path.normalize( - path.join(path.dirname(file), relSourcePath) - ); - const relPath = path.relative(rootDir, sourcePath); - // Disallow reading paths outside rootDir. - if (relPath.startsWith("../")) { - throw new Error(`Bad path: ${sourcePath}`); - } - return fs.promises.readFile(sourcePath, "utf8"); - }) - ); - ++rewriteCount; - return fs.promises.writeFile(file, JSON.stringify(map)); - } - }) - ).then( - () => { - console.log( - `Rewrote ${rewriteCount} source maps in ${Date.now() - startTime}ms` - ); - }, - (error) => { - console.error(error); - process.exit(-1); - } - ); -}); diff --git a/config/rollup.config.js b/config/rollup.config.js deleted file mode 100644 index 5ed93b35165..00000000000 --- a/config/rollup.config.js +++ /dev/null @@ -1,166 +0,0 @@ -import path, { resolve, dirname } from "path"; -import { promises as fs } from "fs"; - -import nodeResolve from "@rollup/plugin-node-resolve"; -import { terser as minify } from "rollup-plugin-terser"; -import cleanup from "rollup-plugin-cleanup"; - -const entryPoints = require("./entryPoints"); -const distDir = "./dist"; - -const removeComments = cleanup({ - comments: ["some", /#__PURE__/, /#__NO_SIDE_EFFECTS__/], -}); - -function isExternal(id, parentId, entryPointsAreExternal = true) { - let posixId = toPosixPath(id); - const posixParentId = toPosixPath(parentId); - // Rollup v2.26.8 started passing absolute id strings to this function, thanks - // apparently to https://github.com/rollup/rollup/pull/3753, so we relativize - // the id again in those cases. - if (path.isAbsolute(id)) { - posixId = path.posix.relative(path.posix.dirname(posixParentId), posixId); - if (!posixId.startsWith(".")) { - posixId = "./" + posixId; - } - } - - const isRelative = posixId.startsWith("./") || posixId.startsWith("../"); - - if (!isRelative) { - return true; - } - - if (entryPointsAreExternal && entryPoints.check(posixId, posixParentId)) { - return true; - } - - return false; -} - -// Adapted from https://github.com/meteor/meteor/blob/devel/tools/static-assets/server/mini-files.ts -function toPosixPath(p) { - // Sometimes, you can have a path like \Users\IEUser on windows, and this - // actually means you want C:\Users\IEUser - if (p[0] === "\\") { - p = process.env.SystemDrive + p; - } - - p = p.replace(/\\/g, "/"); - if (p[1] === ":") { - // Transform "C:/bla/bla" to "/c/bla/bla" - p = "/" + p[0] + p.slice(2); - } - - return p; -} - -function prepareCJS(input, output) { - return { - input, - external(id, parentId) { - return isExternal(id, parentId, false); - }, - output: { - file: output, - format: "cjs", - sourcemap: true, - exports: "named", - externalLiveBindings: false, - }, - plugins: [nodeResolve(), removeComments], - }; -} - -function prepareCJSMinified(input) { - return { - input, - output: { - file: input.replace(".cjs", ".min.cjs"), - format: "cjs", - }, - plugins: [ - minify({ - mangle: { - toplevel: true, - }, - format: { - comments: "some", // keeps comments with a @license, @copyright or @preserve tag - }, - compress: { - toplevel: true, - global_defs: { - "@globalThis.__DEV__": "false", - }, - }, - }), - ], - }; -} - -function prepareBundle({ - dirs, - bundleName = dirs[dirs.length - 1], - extensions, -}) { - const dir = path.join(distDir, ...dirs); - const inputFile = `${dir}/index.js`; - const outputFile = `${dir}/${bundleName}.cjs`; - - return { - input: inputFile, - // the external check is done by the `'externalize-dependency'` plugin - // external(id, parentId) {} - output: { - file: outputFile, - format: "cjs", - sourcemap: true, - exports: "named", - externalLiveBindings: false, - }, - plugins: [ - removeComments, - { - name: "externalize-dependency", - resolveId(id, parentId) { - if (!parentId) { - return null; - } - function removeIndex(filename) { - if (filename.endsWith(`${path.sep}index.js`)) { - return filename.slice(0, -`${path.sep}index.js`.length); - } - return filename; - } - - const external = isExternal(id, parentId, true); - if (external) { - if (id.startsWith(".")) { - return { - id: removeIndex(resolve(dirname(parentId), id)), - external: true, - }; - } - return { id: removeIndex(id), external: true }; - } - return null; - }, - }, - extensions ? nodeResolve({ extensions }) : nodeResolve(), - { - name: "copy *.cjs to *.cjs.native.js", - async writeBundle({ file }) { - const buffer = await fs.readFile(file); - await fs.writeFile(file + ".native.js", buffer); - }, - }, - ], - }; -} - -export default [ - ...entryPoints.map(prepareBundle), - // Convert the ESM entry point to a single CJS bundle. - prepareCJS("./dist/index.js", "./dist/apollo-client.cjs"), - prepareCJSMinified("./dist/apollo-client.cjs"), -]; diff --git a/config/schema.package.json.ts b/config/schema.package.json.ts new file mode 100644 index 00000000000..f4bff2d7ec2 --- /dev/null +++ b/config/schema.package.json.ts @@ -0,0 +1,52473 @@ +/** + * This file was automatically generated by json-schema-to-typescript + * based on https://json.schemastore.org/package.json. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run json-schema-to-typescript to regenerate this file. + */ + +export type JSONSchemaForNPMPackageJsonFiles = { + [k: string]: unknown; +} & { + /** + * The name of the package. + */ + name?: string; + /** + * Version must be parseable by node-semver, which is bundled with npm as a dependency. + */ + version?: string; + /** + * This helps people discover your package, as it's listed in 'npm search'. + */ + description?: string; + /** + * This helps people discover your package as it's listed in 'npm search'. + */ + keywords?: string[]; + /** + * The url to the project homepage. + */ + homepage?: string; + /** + * The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package. + */ + bugs?: + | { + /** + * The url to your project's issue tracker. + */ + url?: string; + /** + * The email address to which issues should be reported. + */ + email?: string; + [k: string]: unknown; + } + | string; + /** + * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. + */ + license?: + | string + | ( + | "AGPL-3.0-only" + | "Apache-2.0" + | "BSD-2-Clause" + | "BSD-3-Clause" + | "BSL-1.0" + | "CC0-1.0" + | "CDDL-1.0" + | "CDDL-1.1" + | "EPL-1.0" + | "EPL-2.0" + | "GPL-2.0-only" + | "GPL-3.0-only" + | "ISC" + | "LGPL-2.0-only" + | "LGPL-2.1-only" + | "LGPL-2.1-or-later" + | "LGPL-3.0-only" + | "LGPL-3.0-or-later" + | "MIT" + | "MPL-2.0" + | "MS-PL" + | "UNLICENSED" + ); + /** + * DEPRECATED: Instead, use SPDX expressions, like this: { "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" } see: 'https://docs.npmjs.com/files/package.json#license'. + */ + licenses?: { + type?: License; + url?: string; + [k: string]: unknown; + }[]; + author?: Person; + /** + * A list of people who contributed to this package. + */ + contributors?: Person[]; + /** + * A list of people who maintains this package. + */ + maintainers?: Person[]; + /** + * The 'files' field is an array of files to include in your project. If you name a folder in the array, then it will also include the files inside that folder. + */ + files?: string[]; + /** + * The main field is a module ID that is the primary entry point to your program. + */ + main?: string; + /** + * The "exports" field is used to restrict external access to non-exported module files, also enables a module to import itself using "name". + */ + exports?: + | (string | null) + | { + /** + * The module path that is resolved when the module specifier matches "name", shadows the "main" field. + */ + "."?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path prefix that is resolved when the module specifier starts with "name/", set to "./\*" to allow external modules to import any subpath. + * + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^\./.+". + */ + [k: string]: PackageExportsEntry | PackageExportsFallback; + } + | PackageExportsEntryObject1 + | PackageExportsFallback1; + /** + * The "imports" field is used to create private mappings that only apply to import specifiers from within the package itself. + */ + imports?: { + /** + * The module path that is resolved when this environment matches the property name. + * + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^#.+$". + */ + [k: string]: PackageImportsEntry | PackageImportsFallback; + }; + bin?: + | string + | { + [k: string]: string; + }; + /** + * When set to "module", the type field allows a package to specify all .js files within are ES modules. If the "type" field is omitted or set to "commonjs", all .js files are treated as CommonJS. + */ + type?: "commonjs" | "module"; + /** + * Set the types property to point to your bundled declaration file. + */ + types?: string; + /** + * Note that the "typings" field is synonymous with "types", and could be used as well. + */ + typings?: string; + /** + * The "typesVersions" field is used since TypeScript 3.1 to support features that were only made available in newer TypeScript versions. + */ + typesVersions?: { + /** + * Contains overrides for the TypeScript version that matches the version range matching the property key. + */ + [k: string]: { + /** + * Maps all file paths to the file paths specified in the array. + */ + "*"?: string[]; + }; + }; + /** + * Specify either a single file or an array of filenames to put in place for the man program to find. + */ + man?: string[] | string; + directories?: { + /** + * If you specify a 'bin' directory, then all the files in that folder will be used as the 'bin' hash. + */ + bin?: string; + /** + * Put markdown files in here. Eventually, these will be displayed nicely, maybe, someday. + */ + doc?: string; + /** + * Put example scripts in here. Someday, it might be exposed in some clever way. + */ + example?: string; + /** + * Tell people where the bulk of your library is. Nothing special is done with the lib folder in any way, but it's useful meta info. + */ + lib?: string; + /** + * A folder that is full of man pages. Sugar to generate a 'man' array by walking the folder. + */ + man?: string; + test?: string; + [k: string]: unknown; + }; + /** + * Specify the place where your code lives. This is helpful for people who want to contribute. + */ + repository?: + | { + type?: string; + url?: string; + directory?: string; + [k: string]: unknown; + } + | string; + funding?: + | FundingUrl + | FundingWay + | [FundingUrl | FundingWay, ...(FundingUrl | FundingWay)[]]; + /** + * The 'scripts' member is an object hash of script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. + */ + scripts?: { + /** + * Run code quality tools, e.g. ESLint, TSLint, etc. + */ + lint?: string; + /** + * Run BEFORE the package is published (Also run on local npm install without any arguments). + */ + prepublish?: string; + /** + * Run both BEFORE the package is packed and published, and on local npm install without any arguments. This is run AFTER prepublish, but BEFORE prepublishOnly. + */ + prepare?: string; + /** + * Run BEFORE the package is prepared and packed, ONLY on npm publish. + */ + prepublishOnly?: string; + /** + * run BEFORE a tarball is packed (on npm pack, npm publish, and when installing git dependencies). + */ + prepack?: string; + /** + * Run AFTER the tarball has been generated and moved to its final destination. + */ + postpack?: string; + /** + * Publishes a package to the registry so that it can be installed by name. See https://docs.npmjs.com/cli/v8/commands/npm-publish + */ + publish?: string; + postpublish?: ScriptsPublishAfter; + /** + * Run BEFORE the package is installed. + */ + preinstall?: string; + install?: ScriptsInstallAfter; + postinstall?: ScriptsInstallAfter; + preuninstall?: ScriptsUninstallBefore; + uninstall?: ScriptsUninstallBefore; + /** + * Run AFTER the package is uninstalled. + */ + postuninstall?: string; + preversion?: ScriptsVersionBefore; + version?: ScriptsVersionBefore; + /** + * Run AFTER bump the package version. + */ + postversion?: string; + pretest?: ScriptsTest; + test?: ScriptsTest; + posttest?: ScriptsTest; + prestop?: ScriptsStop; + stop?: ScriptsStop; + poststop?: ScriptsStop; + prestart?: ScriptsStart; + start?: ScriptsStart; + poststart?: ScriptsStart; + prerestart?: ScriptsRestart; + restart?: ScriptsRestart; + postrestart?: ScriptsRestart; + /** + * Start dev server to serve application files + */ + serve?: string; + [k: string]: string | undefined; + }; + /** + * A 'config' hash can be used to set configuration parameters used in package scripts that persist across upgrades. + */ + config?: { + [k: string]: unknown; + }; + dependencies?: Dependency; + devDependencies?: Dependency; + optionalDependencies?: Dependency; + peerDependencies?: Dependency; + peerDependenciesMeta?: PeerDependencyMeta; + /** + * Array of package names that will be bundled when publishing the package. + */ + bundleDependencies?: string[] | boolean; + /** + * DEPRECATED: This field is honored, but "bundleDependencies" is the correct field name. + */ + bundledDependencies?: string[] | boolean; + /** + * Resolutions is used to support selective version resolutions using yarn, which lets you define custom package versions or ranges inside your dependencies. For npm, use overrides instead. See: https://classic.yarnpkg.com/en/docs/selective-version-resolutions + */ + resolutions?: { + [k: string]: unknown; + }; + /** + * Overrides is used to support selective version overrides using npm, which lets you define custom package versions or ranges inside your dependencies. For yarn, use resolutions instead. See: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides + */ + overrides?: { + [k: string]: unknown; + }; + /** + * Defines which package manager is expected to be used when working on the current project. This field is currently experimental and needs to be opted-in; see https://nodejs.org/api/corepack.html + */ + packageManager?: string; + engines?: { + node?: string; + [k: string]: string; + }; + /** + * Defines which tools and versions are expected to be used when Volta is installed. + */ + volta?: { + /** + * The value of that entry should be a path to another JSON file which also has a "volta" section + */ + extends?: string; + /** + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "(node|npm|pnpm|yarn)". + */ + [k: string]: string; + }; + engineStrict?: boolean; + /** + * Specify which operating systems your module will run on. + */ + os?: string[]; + /** + * Specify that your code only runs on certain cpu architectures. + */ + cpu?: string[]; + /** + * DEPRECATED: This option used to trigger an npm warning, but it will no longer warn. It is purely there for informational purposes. It is now recommended that you install any binaries as local devDependencies wherever possible. + */ + preferGlobal?: boolean; + /** + * If set to true, then npm will refuse to publish it. + */ + private?: boolean | ("false" | "true"); + publishConfig?: { + access?: "public" | "restricted"; + tag?: string; + registry?: string; + provenance?: boolean; + [k: string]: unknown; + }; + dist?: { + shasum?: string; + tarball?: string; + [k: string]: unknown; + }; + readme?: string; + /** + * An ECMAScript module ID that is the primary entry point to your program. + */ + module?: string; + /** + * A module ID with untranspiled code that is the primary entry point to your program. + */ + esnext?: + | string + | { + main?: string; + browser?: string; + [k: string]: string; + }; + /** + * Allows packages within a directory to depend on one another using direct linking of local files. Additionally, dependencies within a workspace are hoisted to the workspace root when possible to reduce duplication. Note: It's also a good idea to set "private" to true when using this feature. + */ + workspaces?: + | string[] + | { + /** + * Workspace package paths. Glob patterns are supported. + */ + packages?: string[]; + /** + * Packages to block from hoisting to the workspace root. Currently only supported in Yarn only. + */ + nohoist?: string[]; + [k: string]: unknown; + }; + jspm?: JSONSchemaForNPMPackageJsonFiles; + eslintConfig?: JSONSchemaForESLintConfigurationFiles; + prettier?: SchemaForPrettierrc; + stylelint?: JSONSchemaForTheStylelintConfigurationFiles; + ava?: AVAConfigSchema; + release?: SemanticReleaseSchema; + jscpd?: HttpsJsonSchemastoreOrgJscpdJson; + /** + * Defines pnpm specific configuration. + */ + pnpm?: { + /** + * Used to override any dependency in the dependency graph. + */ + overrides?: { + [k: string]: unknown; + }; + /** + * Used to extend the existing package definitions with additional information. + */ + packageExtensions?: { + /** + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^.+$". + */ + [k: string]: { + dependencies?: Dependency; + optionalDependencies?: Dependency; + peerDependencies?: Dependency; + peerDependenciesMeta?: PeerDependencyMeta; + }; + }; + peerDependencyRules?: { + /** + * pnpm will not print warnings about missing peer dependencies from this list. + */ + ignoreMissing?: string[]; + /** + * Unmet peer dependency warnings will not be printed for peer dependencies of the specified range. + */ + allowedVersions?: { + [k: string]: unknown; + }; + /** + * Any peer dependency matching the pattern will be resolved from any version, regardless of the range specified in "peerDependencies". + */ + allowAny?: string[]; + }; + /** + * A list of dependencies to skip the builds. + */ + neverBuiltDependencies?: string[]; + /** + * A list of dependencies to skip the builds. + */ + onlyBuiltDependencies?: string[]; + /** + * Specifies a JSON file that lists the only packages permitted to run installation scripts during the pnpm install process. + */ + onlyBuiltDependenciesFile?: string; + /** + * A list of deprecated versions that the warnings are suppressed. + */ + allowedDeprecatedVersions?: { + [k: string]: unknown; + }; + /** + * A list of dependencies that are patched. + */ + patchedDependencies?: { + [k: string]: unknown; + }; + /** + * When true, installation won't fail if some of the patches from the "patchedDependencies" field were not applied. + */ + allowNonAppliedPatches?: boolean; + updateConfig?: { + /** + * A list of packages that should be ignored when running "pnpm outdated" or "pnpm update --latest". + */ + ignoreDependencies?: string[]; + }; + auditConfig?: { + /** + * A list of CVE IDs that will be ignored by "pnpm audit". + */ + ignoreCves?: string[]; + /** + * A list of GHSA Codes that will be ignored by "pnpm audit". + */ + ignoreGhsas?: string[]; + }; + /** + * A list of scripts that must exist in each project. + */ + requiredScripts?: string[]; + /** + * Specifies architectures for which you'd like to install optional dependencies, even if they don't match the architecture of the system running the install. + */ + supportedArchitectures?: { + os?: string[]; + cpu?: string[]; + libc?: string[]; + }; + /** + * A list of optional dependencies that the install should be skipped. + */ + ignoredOptionalDependencies?: string[]; + executionEnv?: { + /** + * Specifies which exact Node.js version should be used for the project's runtime. + */ + nodeVersion?: string; + }; + }; + /** + * Any property starting with \_ is valid. + * + * This interface was referenced by `undefined`'s JSON-Schema definition + * via the `patternProperty` "^\_". + */ + [k: string]: any; +}; +export type License = + | string + | ( + | "AGPL-3.0-only" + | "Apache-2.0" + | "BSD-2-Clause" + | "BSD-3-Clause" + | "BSL-1.0" + | "CC0-1.0" + | "CDDL-1.0" + | "CDDL-1.1" + | "EPL-1.0" + | "EPL-2.0" + | "GPL-2.0-only" + | "GPL-3.0-only" + | "ISC" + | "LGPL-2.0-only" + | "LGPL-2.1-only" + | "LGPL-2.1-or-later" + | "LGPL-3.0-only" + | "LGPL-3.0-or-later" + | "MIT" + | "MPL-2.0" + | "MS-PL" + | "UNLICENSED" + ); +/** + * A person who has been involved in creating or maintaining this package. + */ +export type Person = { + name: string; + url?: string; + email?: string; + [k: string]: unknown; +} & Person1; +export type Person1 = + | { + name: string; + url?: string; + email?: string; + [k: string]: unknown; + } + | string; +export type PackageExportsEntry = + | PackageExportsEntryPath + | PackageExportsEntryObject; +/** + * The module path that is resolved when this specifier is imported. Set to `null` to disallow importing this module. + */ +export type PackageExportsEntryPath = string | null; +/** + * Used to allow fallbacks in case this environment doesn't support the preceding entries. + */ +export type PackageExportsFallback = PackageExportsEntry[]; +/** + * Used to allow fallbacks in case this environment doesn't support the preceding entries. + */ +export type PackageExportsFallback1 = PackageExportsEntry[]; +export type PackageImportsEntry = + | PackageImportsEntryPath + | PackageImportsEntryObject; +/** + * The module path that is resolved when this specifier is imported. Set to `null` to disallow importing this module. + */ +export type PackageImportsEntryPath = string | null; +/** + * Used to allow fallbacks in case this environment doesn't support the preceding entries. + */ +export type PackageImportsFallback = PackageImportsEntry[]; +/** + * URL to a website with details about how to fund the package. + */ +export type FundingUrl = string; +/** + * Run AFTER the package is published. + */ +export type ScriptsPublishAfter = string; +/** + * Run AFTER the package is installed. + */ +export type ScriptsInstallAfter = string; +/** + * Run BEFORE the package is uninstalled. + */ +export type ScriptsUninstallBefore = string; +/** + * Run BEFORE bump the package version. + */ +export type ScriptsVersionBefore = string; +/** + * Run by the 'npm test' command. + */ +export type ScriptsTest = string; +/** + * Run by the 'npm stop' command. + */ +export type ScriptsStop = string; +/** + * Run by the 'npm start' command. + */ +export type ScriptsStart = string; +/** + * Run by the 'npm restart' command. Note: 'npm restart' will run the stop and start scripts if no restart script is provided. + */ +export type ScriptsRestart = string; +/** + * ESLint supports the use of third-party plugins. Before using the plugin, you have to install it using npm. + */ +export type Plugins = string[]; +/** + * ESLint comes with a large number of rules. You can modify which rules your project uses either using configuration comments or configuration files. + */ +export type Rules = PossibleErrors & + BestPractices & + StrictMode & + Variables & + NodeAndCommonJs & + StylisticIssues & + EcmaScript6 & + Legacy & + HttpsJsonSchemastoreOrgPartialEslintPluginsJson; +/** + * Allows to override configuration for files and folders, specified by glob patterns + */ +export type Overrides = { + /** + * Glob pattern for files to apply 'overrides' configuration, relative to the directory of the config file + */ + files: string | [string, ...string[]]; + /** + * If you want to extend a specific configuration file, you can use the extends property and specify the path to the file. The path can be either relative or absolute. + */ + extends?: string | string[]; + /** + * If a file matches any of the 'excludedFiles' glob patterns, the 'overrides' configuration won't apply + */ + excludedFiles?: string | string[]; + ecmaFeatures?: EcmaFeatures; + env?: Env; + globals?: Globals; + parser?: string; + parserOptions?: ParserOptions; + plugins?: Plugins; + /** + * To specify a processor, specify the plugin name and processor name joined by a forward slash + */ + processor?: string; + rules?: Rules; + settings?: Settings; + overrides?: Overrides; +}[]; +export type SchemaForPrettierrc = + | (OptionsDefinition & OverridesDefinition) + | string; +/** + * Your configuration can extend an existing configuration(s) (whether your own or a third-party config) + */ +export type SimpleStringOrArrayStringRule = (string | SimpleArrayStringRule) & + ( + | ((string | SimpleArrayStringRule) & string) + | ((string | SimpleArrayStringRule) & unknown[]) + ); +export type SimpleArrayStringRule = string[]; +/** + * Plugins are rules or sets of rules built by the community that support methodologies, toolsets, non-standard CSS features, or very specific use cases + */ +export type SimpleArrayStringRule1 = string[]; +export type AllRules = AtRule & + Block & + Color & + Comment & + CustomMedia & + CustomProperty & + Declaration & + DeclarationBlock & + Font & + Function & + GeneralSheet & + KeyframeDeclaration & + Length & + Lightness & + MediaFeature & + MediaQuery & + MediaQueryList & + Number & + Property & + RootRule & + Rule & + Selector & + SelectorList & + ShorthandProperty & + String & + StylelintDisableComment & + Time & + Unit & + Value & + ValueList; +/** + * Specify a blacklist of disallowed at-rules + */ +export type ArrayStringRule = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for at-rules names + */ +export type LowerUpperRule = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline after at-rule names + */ +export type AlwaysMultiLineRule = ( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow vendor prefixes for at-rules + */ +export type BooleanRule = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed at-rules + */ +export type ArrayStringRule1 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the closing brace of blocks + */ +export type NewlineSpaceWithIgnoreRule = ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the closing brace of blocks + */ +export type NewlineRule = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the closing brace of blocks + */ +export type NewlineSpaceRule = ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the closing brace of blocks + */ +export type NewlineSpaceRule1 = ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow empty blocks + */ +export type BooleanRule1 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow single-line blocks + */ +export type BooleanRule2 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline after the opening brace of blocks + */ +export type NewlineRule1 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the opening brace of blocks + */ +export type NewlineSpaceRule2 = ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the opening brace of blocks + */ +export type NewlineSpaceWithIgnoreRule1 = ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | [] + ) + | [ + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-single-line" + | "never-single-line" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for hex colors + */ +export type LowerUpperRule1 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow hex colors + */ +export type BooleanRule3 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow invalid hex colors + */ +export type BooleanRule4 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow empty comments + */ +export type BooleanRule5 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require or disallow whitespace on the inside of comment markers + */ +export type AlwaysNeverRule = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a blacklist of disallowed words within comments + */ +export type ArrayStringRule2 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify a pattern for custom media query names + */ +export type StringRule = ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + )) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + string) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow custom properties outside of `:root` rules + */ +export type BooleanRule6 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a pattern for custom properties + */ +export type StringRule1 = ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + )) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + string) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the bang of declarations + */ +export type AlwaysNeverRule1 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the bang of declarations + */ +export type AlwaysNeverRule2 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the colon of declarations + */ +export type AlwaysMultiLineRule1 = ( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & + string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | []) + | [ + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ) & + (("always" | "always-multi-line" | {}) | CoreRule) & + ( + | ((("always" | "always-multi-line" | {}) | CoreRule) & string) + | (("always" | "always-multi-line" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the colon of declarations + */ +export type AlwaysNeverRule3 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow `!important` within declarations + */ +export type BooleanRule7 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +export type SimpleStringOrArrayStringRule1 = (string | SimpleArrayStringRule) & + ( + | ((string | SimpleArrayStringRule) & string) + | ((string | SimpleArrayStringRule) & unknown[]) + ); +/** + * Disallow property values that are ignored due to another property value in the same rule + */ +export type BooleanRule8 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow shorthand properties that override related longhand properties + */ +export type BooleanRule9 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the semicolons of declaration blocks + */ +export type NewlineRule2 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the semicolons of declaration blocks + */ +export type NewlineRule3 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the semicolons of declaration blocks + */ +export type SpaceRule = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the semicolons of declaration blocks + */ +export type SpaceRule1 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Limit the number of declaration within a single line declaration block + */ +export type IntegerRule = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require or disallow a trailing semicolon within declaration blocks + */ +export type AlwaysNeverRule4 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a blacklist of disallowed functions + */ +export type ArrayStringRule3 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Disallow an unspaced operator within `calc` functions + */ +export type BooleanRule10 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the commas of functions + */ +export type NewlineRule4 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the commas of functions + */ +export type NewlineRule5 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the commas of functions + */ +export type SpaceRule2 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the commas of functions + */ +export type SpaceRule3 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow direction values in `linear-gradient()` calls that are not valid according to the standard syntax + */ +export type BooleanRule11 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Limit the number of adjacent empty lines within functions + */ +export type IntegerRule1 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace on the inside of the parentheses of functions + */ +export type NewlineRule6 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace on the inside of the parentheses of functions + */ +export type SpaceRule4 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require or disallow data URIs for urls + */ +export type AlwaysNeverRule5 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow scheme-relative urls + */ +export type BooleanRule12 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require or disallow quotes for urls + */ +export type AlwaysNeverRule6 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed url schemes + */ +export type ArrayStringRule4 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed functions + */ +export type ArrayStringRule5 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Require or disallow whitespace after functions + */ +export type AlwaysNeverRule7 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Limit the number of adjacent empty lines + */ +export type IntegerRule2 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow selectors of lower specificity from coming after overriding selectors of higher specificity + */ +export type BooleanRule13 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow duplicate selectors within a stylesheet + */ +export type BooleanRule14 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow empty sources + */ +export type BooleanRule15 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow extra semicolons + */ +export type BooleanRule16 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow double-slash comments `(//...)` which are not supported by CSS and could lead to unexpected results + */ +export type BooleanRule17 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow missing end-of-source newlines + */ +export type BooleanRule18 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow animation names that do not correspond to a `@keyframes` declaration + */ +export type BooleanRule19 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require or disallow Unicode BOM + */ +export type AlwaysNeverRule8 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow !important within keyframe declarations + */ +export type BooleanRule20 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow units for zero lengths + */ +export type BooleanRule21 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the colon in media features + */ +export type AlwaysNeverRule9 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the colon in media features + */ +export type AlwaysNeverRule10 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for media feature names + */ +export type LowerUpperRule2 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow vendor prefixes for media feature names + */ +export type BooleanRule22 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow missing punctuation for non-boolean media features + */ +export type BooleanRule23 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace on the inside of the parentheses within media features + */ +export type AlwaysNeverRule11 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the range operator in media features + */ +export type AlwaysNeverRule12 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the range operator in media features + */ +export type AlwaysNeverRule13 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the commas of media query lists + */ +export type NewlineRule7 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the commas of media query lists + */ +export type NewlineRule8 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the commas of media query lists + */ +export type SpaceRule5 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the commas of media query lists + */ +export type SpaceRule6 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require or disallow a leading zero for fractional numbers less than 1 + */ +export type AlwaysNeverRule14 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Limit the number of decimal places allowed in numbers + */ +export type IntegerRule3 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow trailing zeros in numbers + */ +export type BooleanRule24 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a blacklist of disallowed properties + */ +export type ArrayStringRule6 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for properties + */ +export type LowerUpperRule3 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow vendor prefixes for properties + */ +export type BooleanRule25 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed properties + */ +export type ArrayStringRule7 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Disallow standard properties inside `:root` rules + */ +export type BooleanRule26 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace on the inside of the brackets within attribute selector + */ +export type AlwaysNeverRule15 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a blacklist of disallowed attribute operators + */ +export type ArrayStringRule8 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after operators within attribute selectors + */ +export type AlwaysNeverRule16 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before operators within attribute selectors + */ +export type AlwaysNeverRule17 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed attribute operators + */ +export type ArrayStringRule9 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Require or disallow quotes for attribute values + */ +export type AlwaysNeverRule18 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the combinators of selectors + */ +export type AlwaysNeverRule19 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the combinators of selectors + */ +export type AlwaysNeverRule20 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow non-space characters for descendant combinators of selectors + */ +export type BooleanRule27 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a pattern for id selectors + */ +export type StringRule2 = ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + )) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + string) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Limit the number of compound selectors in a selector + */ +export type IntegerRule4 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Limit the specificity of selectors + */ +export type StringRule3 = ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + )) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + string) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a pattern for the selectors of rules nested within rules + */ +export type StringRule4 = ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + )) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + string) + | (( + | (null | string) + | [ + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)) & + (string | CoreRule) & + (((string | CoreRule) & string) | (string | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow attribute selectors + */ +export type BooleanRule28 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow combinators in selectors + */ +export type BooleanRule29 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow id selectors + */ +export type BooleanRule30 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow the universal selector + */ +export type BooleanRule31 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow vendor prefixes for selectors + */ +export type BooleanRule32 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for pseudo-class selectors + */ +export type LowerUpperRule4 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectors + */ +export type AlwaysNeverRule21 = ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | []) + | [ + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ) & + (("always" | "never" | {}) | CoreRule) & + ( + | ((("always" | "never" | {}) | CoreRule) & string) + | (("always" | "never" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed pseudo-class selectors + */ +export type ArrayStringRule10 = ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] +) & + ( + | (null & + ( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + )) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + string) + | (( + | (null | string) + | [ + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ), + ...((([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ) & + (([] | {}) | SimpleArrayStringRule | CoreRule) & + ( + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & string) + | ((([] | {}) | SimpleArrayStringRule | CoreRule) & unknown[]) + | (([] | {}) | SimpleArrayStringRule | CoreRule) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for pseudo-element selectors + */ +export type LowerUpperRule5 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify single or double colon notation for applicable pseudo-elements + */ +export type SingleDoubleRule = ( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow the composition of :root in selectors + */ +export type BooleanRule33 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for type selectors + */ +export type LowerUpperRule6 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Limit the number of adjacent empty lines within selectors + */ +export type IntegerRule5 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the commas of selector lists + */ +export type NewlineRule9 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the commas of selector lists + */ +export type NewlineRule10 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the commas of selector lists + */ +export type SpaceRule7 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the commas of selector lists + */ +export type SpaceRule8 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow redundant values in shorthand properties + */ +export type BooleanRule34 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Disallow (unescaped) newlines in strings + */ +export type BooleanRule35 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify single or double quotes around strings + */ +export type SingleDoubleRule1 = ( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("single" | "double" | []) + | [ + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ) & + (("single" | "double" | {}) | CoreRule) & + ( + | ((("single" | "double" | {}) | CoreRule) & string) + | (("single" | "double" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Disallow `animation` and `transition` less than or equal to 100ms + */ +export type BooleanRule36 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Specify a blacklist of disallowed units + */ +export type UnitRule = ( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] +) & + ( + | (null & + ( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + )) + | (( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + ) & + string) + | (( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + ) & + unknown[]) + ); +/** + * Specify lowercase or uppercase for units + */ +export type LowerUpperRule7 = ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] +) & + ( + | (null & + ( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + )) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + string) + | (( + | null + | ("lower" | "upper" | []) + | [ + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ) & + (("lower" | "upper" | {}) | CoreRule) & + ( + | ((("lower" | "upper" | {}) | CoreRule) & string) + | (("lower" | "upper" | {}) | CoreRule) + ), + ] + ) & + unknown[]) + ); +/** + * Specify a whitelist of allowed units + */ +export type UnitRule1 = ( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] +) & + ( + | (null & + ( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + )) + | (( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + ) & + string) + | (( + | null + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + ) + | [ + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ), + ...(( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ) & + ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + ( + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + string) + | (( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) & + unknown[]) + | ( + | ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + | [] + | {} + ) + | [ + ( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + ), + ...( + | "em" + | "ex" + | "px" + | "%" + | "rem" + | "vw" + | "vh" + | "vm" + | "vmin" + | "vmax" + | "ch" + | "in" + | "cm" + | "mm" + | "q" + | "pt" + | "pc" + | "deg" + | "grad" + | "rad" + | "turn" + | "ms" + | "s" + | "Hz" + | "kHz" + | "dpi" + | "dpcm" + | "dppx" + | "fr" + )[], + ] + | CoreRule + ) + ))[], + ] + ) & + unknown[]) + ); +/** + * Disallow vendor prefixes for values + */ +export type BooleanRule37 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace after the commas of value lists + */ +export type NewlineRule11 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a newline or disallow whitespace before the commas of value lists + */ +export type NewlineRule12 = ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + (("always" | "always-multi-line" | "never-multi-line" | {}) | CoreRule) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "always-multi-line" + | "never-multi-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "always-multi-line" | "never-multi-line" | []) + | [ + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ) & + ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + ( + | (( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) & + string) + | ( + | ("always" | "always-multi-line" | "never-multi-line" | {}) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace after the commas of value lists + */ +export type SpaceRule9 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Require a single space or disallow whitespace before the commas of value lists + */ +export type SpaceRule10 = ( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ("always" | "never" | "always-single-line" | "never-single-line" | {}) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] +) & + ( + | (null & + ( + | null + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | [] + ) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + )) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + string) + | (( + | null + | ("always" | "never" | "always-single-line" | "never-single-line" | []) + | [ + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ) & + ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + ( + | (( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) & + string) + | ( + | ( + | "always" + | "never" + | "always-single-line" + | "never-single-line" + | {} + ) + | CoreRule + ) + ), + ] + ) & + unknown[]) + ); +/** + * Limit the number of adjacent empty lines within value lists + */ +export type IntegerRule6 = ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] +) & + ( + | (null & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (number & + ( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + )) + | (( + | (null | number) + | [ + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)) & + ({} | CoreRule) & + ((({} | CoreRule) & number) | ({} | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Provide a glob or array of globs to ignore specific files + */ +export type SimpleStringOrArrayStringRule2 = (string | SimpleArrayStringRule) & + ( + | ((string | SimpleArrayStringRule) & string) + | ((string | SimpleArrayStringRule) & unknown[]) + ); +/** + * Report stylelint-disable comments without a description. + */ +export type BooleanRule38 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Report stylelint-disable comments that don't match rules that are specified in the configuration object. + */ +export type BooleanRule39 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * Report stylelint-disable comments that don't actually match any lints that need to be disabled + */ +export type BooleanRule40 = ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] +) & + ( + | (null & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (boolean & + ( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + )) + | (( + | null + | boolean + | [ + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)) & + (boolean | CoreRule) & + (((boolean | CoreRule) & boolean) | (boolean | CoreRule)), + ] + ) & + unknown[]) + ); +/** + * An array of glob patterns to select test files. Files with an underscore prefix are ignored. By default only selects files with `cjs`, `mjs` & `js` extensions, even if the pattern matches other files. Specify `extensions` to allow other file extensions + */ +export type ArrayOfPaths = string[]; +/** + * An array of glob patterns to match files that, even if changed, are ignored by the watcher + */ +export type ArrayOfPaths1 = string[]; +/** + * Not typically useful in the `package.json` configuration, but equivalent to specifying `--match` on the CLI + */ +export type ArrayOfPaths2 = string[]; +export type ArrayOfStrings = string[]; +/** + * Extra modules to require before tests are run. Modules are required in the worker processes + */ +export type ArrayOfPaths3 = string[]; +/** + * Configure Node.js arguments used to launch worker processes + */ +export type ArrayOfStrings1 = string[]; +/** + * You can configure AVA to recognize additional file extensions as TypeScript (e.g., `["ts", "tsx"]` to add partial JSX support). Note that the preserve mode for JSX is not (yet) supported. See also AVA's `extensions` object + */ +export type ArrayOfPaths4 = string[]; + +/** + * Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. + */ +export interface PackageExportsEntryObject { + /** + * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. + */ + require?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. + */ + import?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this environment is Node.js. + */ + node?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when no other export type matches. + */ + default?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. + */ + types?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this environment matches the property name. + * + * This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition + * via the `patternProperty` "^[^.0-9]+$". + * + * This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition + * via the `patternProperty` "^[^.0-9]+$". + */ + [k: string]: PackageExportsEntry | PackageExportsFallback; +} +/** + * The module path that is resolved when the module specifier matches "name", shadows the "main" field. + */ +export interface PackageExportsEntryObject1 { + /** + * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. + */ + require?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. + */ + import?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this environment is Node.js. + */ + node?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when no other export type matches. + */ + default?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. + */ + types?: PackageExportsEntry | PackageExportsFallback; + /** + * The module path that is resolved when this environment matches the property name. + * + * This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition + * via the `patternProperty` "^[^.0-9]+$". + * + * This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition + * via the `patternProperty` "^[^.0-9]+$". + */ + [k: string]: PackageExportsEntry | PackageExportsFallback; +} +/** + * Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern. + */ +export interface PackageImportsEntryObject { + /** + * The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function. + */ + require?: PackageImportsEntry | PackageImportsFallback; + /** + * The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function. + */ + import?: PackageImportsEntry | PackageImportsFallback; + /** + * The module path that is resolved when this environment is Node.js. + */ + node?: PackageImportsEntry | PackageImportsFallback; + /** + * The module path that is resolved when no other export type matches. + */ + default?: PackageImportsEntry | PackageImportsFallback; + /** + * The module path that is resolved for TypeScript types when this specifier is imported. Should be listed before other conditions. + */ + types?: PackageImportsEntry | PackageImportsFallback; + /** + * The module path that is resolved when this environment matches the property name. + * + * This interface was referenced by `PackageImportsEntryObject`'s JSON-Schema definition + * via the `patternProperty` "^[^.0-9]+$". + */ + [k: string]: PackageImportsEntry | PackageImportsFallback; +} +/** + * Used to inform about ways to help fund development of the package. + */ +export interface FundingWay { + url: FundingUrl; + /** + * The type of funding or the platform through which funding can be provided, e.g. patreon, opencollective, tidelift or github. + */ + type?: string; +} +/** + * Dependencies are specified with a simple hash of package name to version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL. + */ +export interface Dependency { + [k: string]: string; +} +/** + * When a user installs your package, warnings are emitted if packages specified in "peerDependencies" are not already installed. The "peerDependenciesMeta" field serves to provide more information on how your peer dependencies are utilized. Most commonly, it allows peer dependencies to be marked as optional. Metadata for this field is specified with a simple hash of the package name to a metadata object. + */ +export interface PeerDependencyMeta { + [k: string]: { + /** + * Specifies that this peer dependency is optional and should not be installed automatically. + */ + optional?: boolean; + [k: string]: unknown; + }; +} +export interface JSONSchemaForESLintConfigurationFiles { + ecmaFeatures?: EcmaFeatures; + env?: Env; + /** + * If you want to extend a specific configuration file, you can use the extends property and specify the path to the file. The path can be either relative or absolute. + */ + extends?: string | string[]; + globals?: Globals; + /** + * Prevent comments from changing config or rules + */ + noInlineConfig?: boolean; + /** + * Report unused eslint-disable comments + */ + reportUnusedDisableDirectives?: boolean; + parser?: string; + parserOptions?: ParserOptions; + plugins?: Plugins; + /** + * By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, set this to `true` in a configuration in the root of your project. + */ + root?: boolean; + /** + * Tell ESLint to ignore specific files and directories. Each value uses the same pattern as the `.eslintignore` file. + */ + ignorePatterns?: string | string[]; + rules?: Rules; + settings?: Settings; + overrides?: Overrides; + [k: string]: unknown; +} +/** + * By default, ESLint supports only ECMAScript 5 syntax. You can override that setting to enable support for ECMAScript 6 as well as JSX by using configuration settings. + */ +export interface EcmaFeatures { + arrowFunctions?: boolean; + binaryLiterals?: boolean; + blockBindings?: boolean; + classes?: boolean; + defaultParams?: boolean; + destructuring?: boolean; + /** + * Enables support for the experimental object rest/spread properties (IMPORTANT: This is an experimental feature that may change significantly in the future. It's recommended that you do not write rules relying on this functionality unless you are willing to incur maintenance cost when it changes.) + */ + experimentalObjectRestSpread?: boolean; + forOf?: boolean; + generators?: boolean; + /** + * allow return statements in the global scope + */ + globalReturn?: boolean; + /** + * enable global strict mode (if ecmaVersion is 5 or greater) + */ + impliedStrict?: boolean; + /** + * enable JSX + */ + jsx?: boolean; + modules?: boolean; + objectLiteralComputedProperties?: boolean; + objectLiteralDuplicateProperties?: boolean; + objectLiteralShorthandMethods?: boolean; + objectLiteralShorthandProperties?: boolean; + octalLiterals?: boolean; + regexUFlag?: boolean; + regexYFlag?: boolean; + restParams?: boolean; + spread?: boolean; + superInFunctions?: boolean; + templateStrings?: boolean; + unicodeCodePointEscapes?: boolean; + [k: string]: unknown; +} +/** + * An environment defines global variables that are predefined. + */ +export interface Env { + /** + * defines require() and define() as global variables as per the amd spec + */ + amd?: boolean; + /** + * AppleScript global variables + */ + applescript?: boolean; + /** + * Atom test helper globals + */ + atomtest?: boolean; + /** + * browser global variables + */ + browser?: boolean; + /** + * CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack) + */ + commonjs?: boolean; + /** + * Globals common to both Node and Browser + */ + "shared-node-browser"?: boolean; + /** + * Ember test helper globals + */ + embertest?: boolean; + /** + * enable all ECMAScript 6 features except for modules + */ + es6?: boolean; + /** + * GreaseMonkey globals + */ + greasemonkey?: boolean; + /** + * adds all of the Jasmine testing global variables for version 1.3 and 2.0 + */ + jasmine?: boolean; + /** + * Jest global variables + */ + jest?: boolean; + /** + * jQuery global variables + */ + jquery?: boolean; + /** + * Meteor global variables + */ + meteor?: boolean; + /** + * adds all of the Mocha test global variables + */ + mocha?: boolean; + /** + * MongoDB global variables + */ + mongo?: boolean; + /** + * Java 8 Nashorn global variables + */ + nashorn?: boolean; + /** + * Node.js global variables and Node.js scoping + */ + node?: boolean; + /** + * PhantomJS global variables + */ + phantomjs?: boolean; + /** + * Prototype.js global variables + */ + prototypejs?: boolean; + /** + * Protractor global variables + */ + protractor?: boolean; + /** + * QUnit global variables + */ + qunit?: boolean; + /** + * Service Worker global variables + */ + serviceworker?: boolean; + /** + * ShellJS global variables + */ + shelljs?: boolean; + /** + * WebExtensions globals + */ + webextensions?: boolean; + /** + * web workers global variables + */ + worker?: boolean; + [k: string]: unknown; +} +/** + * Set each global variable name equal to true to allow the variable to be overwritten or false to disallow overwriting. + */ +export interface Globals { + [k: string]: ("readonly" | "writable" | "off") | boolean; +} +/** + * The JavaScript language options to be supported + */ +export interface ParserOptions { + ecmaFeatures?: EcmaFeatures; + /** + * Set to 3, 5 (default), 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15 to specify the version of ECMAScript syntax you want to use. You can also set it to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14), or 2024 (same as 15) to use the year-based naming. You can also set "latest" to use the most recently supported version. + */ + ecmaVersion?: + | 3 + | 5 + | 6 + | 2015 + | 7 + | 2016 + | 8 + | 2017 + | 9 + | 2018 + | 10 + | 2019 + | 11 + | 2020 + | 12 + | 2021 + | 13 + | 2022 + | 14 + | 2023 + | 15 + | 2024 + | "latest"; + /** + * set to "script" (default), "commonjs", or "module" if your code is in ECMAScript modules + */ + sourceType?: "script" | "module" | "commonjs"; + [k: string]: unknown; +} +export interface PossibleErrors { + /** + * Require or disallow trailing commas + */ + "comma-dangle"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce "for" loop update clause moving the counter in the right direction + */ + "for-direction"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce return statements in getters + */ + "getter-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow await inside of loops + */ + "no-await-in-loop"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow comparing against -0 + */ + "no-compare-neg-zero"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow assignment operators in conditional expressions + */ + "no-cond-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of console + */ + "no-console"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow constant expressions in conditions + */ + "no-constant-condition"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow control characters in regular expressions + */ + "no-control-regex"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of debugger + */ + "no-debugger"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow duplicate arguments in function definitions + */ + "no-dupe-args"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow duplicate keys in object literals + */ + "no-dupe-keys"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow duplicate case labels + */ + "no-duplicate-case"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow empty block statements + */ + "no-empty"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow empty character classes in regular expressions + */ + "no-empty-character-class"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow reassigning exceptions in catch clauses + */ + "no-ex-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary boolean casts + */ + "no-extra-boolean-cast"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary parentheses + */ + "no-extra-parens"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary semicolons + */ + "no-extra-semi"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow reassigning function declarations + */ + "no-func-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow function or var declarations in nested blocks + */ + "no-inner-declarations"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow invalid regular expression strings in RegExp constructors + */ + "no-invalid-regexp"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow irregular whitespace outside of strings and comments + */ + "no-irregular-whitespace"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow negating the left operand in in expressions (deprecated) + */ + "no-negated-in-lhs"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow calling global object properties as functions + */ + "no-obj-calls"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow calling some Object.prototype methods directly on objects + */ + "no-prototype-builtins"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow multiple spaces in regular expressions + */ + "no-regex-spaces"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow sparse arrays + */ + "no-sparse-arrays"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow template literal placeholder syntax in regular strings + */ + "no-template-curly-in-string"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Disallow confusing multiline expressions + */ + "no-unexpected-multiline"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unreachable code after return, throw, continue, and break statements + */ + "no-unreachable"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow control flow statements in finally blocks + */ + "no-unsafe-finally"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow negating the left operand of relational operators + */ + "no-unsafe-negation"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require calls to isNaN() when checking for NaN + */ + "use-isnan"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce valid JSDoc comments + */ + "valid-jsdoc"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce comparing typeof expressions against valid strings + */ + "valid-typeof"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface BestPractices { + /** + * Enforce getter and setter pairs in objects + */ + "accessor-pairs"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce return statements in callbacks of array methods + */ + "array-callback-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce the use of variables within the scope they are defined + */ + "block-scoped-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce that class methods utilize this + */ + "class-methods-use-this"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum cyclomatic complexity allowed in a program + */ + complexity?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require return statements to either always or never specify values + */ + "consistent-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent brace style for all control statements + */ + curly?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require default cases in switch statements + */ + "default-case"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent newlines before and after dots + */ + "dot-location"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce dot notation whenever possible + */ + "dot-notation"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require the use of === and !== + */ + eqeqeq?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require for-in loops to include an if statement + */ + "guard-for-in"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of alert, confirm, and prompt + */ + "no-alert"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of arguments.caller or arguments.callee + */ + "no-caller"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow lexical declarations in case clauses + */ + "no-case-declarations"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow division operators explicitly at the beginning of regular expressions + */ + "no-div-regex"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow else blocks after return statements in if statements + */ + "no-else-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow empty functions + */ + "no-empty-function"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow empty destructuring patterns + */ + "no-empty-pattern"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow null comparisons without type-checking operators + */ + "no-eq-null"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of eval() + */ + "no-eval"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow extending native types + */ + "no-extend-native"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary calls to .bind() + */ + "no-extra-bind"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary labels + */ + "no-extra-label"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow fallthrough of case statements + */ + "no-fallthrough"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow leading or trailing decimal points in numeric literals + */ + "no-floating-decimal"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow assignments to native objects or read-only global variables + */ + "no-global-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow shorthand type conversions + */ + "no-implicit-coercion"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow var and named function declarations in the global scope + */ + "no-implicit-globals"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of eval()-like methods + */ + "no-implied-eval"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow this keywords outside of classes or class-like objects + */ + "no-invalid-this"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of the **iterator** property + */ + "no-iterator"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow labeled statements + */ + "no-labels"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary nested blocks + */ + "no-lone-blocks"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow function declarations and expressions inside loop statements + */ + "no-loop-func"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow magic numbers + */ + "no-magic-numbers"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow multiple spaces + */ + "no-multi-spaces"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow multiline strings + */ + "no-multi-str"?: number | ("off" | "warn" | "error") | unknown[]; + "no-native-reassign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow new operators outside of assignments or comparisons + */ + "no-new"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow new operators with the Function object + */ + "no-new-func"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow new operators with the String, Number, and Boolean objects + */ + "no-new-wrappers"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow octal literals + */ + "no-octal"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow octal escape sequences in string literals + */ + "no-octal-escape"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow reassigning function parameters + */ + "no-param-reassign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of the **proto** property + */ + "no-proto"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow var redeclaration + */ + "no-redeclare"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow certain properties on certain objects + */ + "no-restricted-properties"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow assignment operators in return statements + */ + "no-return-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary return await + */ + "no-return-await"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow javascript: urls + */ + "no-script-url"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow assignments where both sides are exactly the same + */ + "no-self-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow comparisons where both sides are exactly the same + */ + "no-self-compare"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow comma operators + */ + "no-sequences"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow throwing literals as exceptions + */ + "no-throw-literal"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unmodified loop conditions + */ + "no-unmodified-loop-condition"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Disallow unused expressions + */ + "no-unused-expressions"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unused labels + */ + "no-unused-labels"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary calls to .call() and .apply() + */ + "no-useless-call"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary concatenation of literals or template literals + */ + "no-useless-concat"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary escape characters + */ + "no-useless-escape"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow redundant return statements + */ + "no-useless-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow void operators + */ + "no-void"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified warning terms in comments + */ + "no-warning-comments"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow with statements + */ + "no-with"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require using Error objects as Promise rejection reasons + */ + "prefer-promise-reject-errors"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce the consistent use of the radix argument when using parseInt() + */ + radix?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow async functions which have no await expression + */ + "require-await"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require var declarations be placed at the top of their containing scope + */ + "vars-on-top"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require parentheses around immediate function invocations + */ + "wrap-iife"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or Disallow "Yoda" conditions + */ + yoda?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface StrictMode { + /** + * require or disallow strict mode directives + */ + strict?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface Variables { + /** + * Require or disallow initialization in var declarations + */ + "init-declarations"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow catch clause parameters from shadowing variables in the outer scope + */ + "no-catch-shadow"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow deleting variables + */ + "no-delete-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow labels that share a name with a variable + */ + "no-label-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified global variables + */ + "no-restricted-globals"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow var declarations from shadowing variables in the outer scope + */ + "no-shadow"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow identifiers from shadowing restricted names + */ + "no-shadow-restricted-names"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Disallow the use of undeclared variables unless mentioned in /_global _ / comments + */ + "no-undef"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of undefined as an identifier + */ + "no-undefined"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow initializing variables to undefined + */ + "no-undef-init"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unused variables + */ + "no-unused-vars"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of variables before they are defined + */ + "no-use-before-define"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface NodeAndCommonJs { + /** + * Require return statements after callbacks + */ + "callback-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require require() calls to be placed at top-level module scope + */ + "global-require"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require error handling in callbacks + */ + "handle-callback-err"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow use of the Buffer() constructor + */ + "no-buffer-constructor"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow require calls to be mixed with regular var declarations + */ + "no-mixed-requires"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow new operators with calls to require + */ + "no-new-require"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow string concatenation with **dirname and **filename + */ + "no-path-concat"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of process.env + */ + "no-process-env"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the use of process.exit() + */ + "no-process-exit"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified modules when loaded by require + */ + "no-restricted-modules"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow synchronous methods + */ + "no-sync"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface StylisticIssues { + /** + * Enforce line breaks after opening and before closing array brackets + */ + "array-bracket-newline"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing inside array brackets + */ + "array-bracket-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce line breaks after each array element + */ + "array-element-newline"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing inside single-line blocks + */ + "block-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent brace style for blocks + */ + "brace-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce camelcase naming convention + */ + camelcase?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce or disallow capitalization of the first letter of a comment + */ + "capitalized-comments"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow trailing commas + */ + "comma-dangle"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before and after commas + */ + "comma-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent comma style + */ + "comma-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing inside computed property brackets + */ + "computed-property-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent naming when capturing the current execution context + */ + "consistent-this"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce at least one newline at the end of files + */ + "eol-last"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow spacing between function identifiers and their invocations + */ + "func-call-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require function names to match the name of the variable or property to which they are assigned + */ + "func-name-matching"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow named function expressions + */ + "func-names"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce the consistent use of either function declarations or expressions + */ + "func-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce line breaks between arguments of a function call + */ + "function-call-argument-newline"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce consistent line breaks inside function parentheses + */ + "function-paren-newline"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified identifiers + */ + "id-blacklist"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce minimum and maximum identifier lengths + */ + "id-length"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require identifiers to match a specified regular expression + */ + "id-match"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce the location of arrow function bodies + */ + "implicit-arrow-linebreak"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent indentation + */ + indent?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent indentation (legacy, deprecated) + */ + "indent-legacy"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce the consistent use of either double or single quotes in JSX attributes + */ + "jsx-quotes"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing between keys and values in object literal properties + */ + "key-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before and after keywords + */ + "keyword-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce position of line comments + */ + "line-comment-position"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow an empty line between class members + */ + "lines-between-class-members"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce consistent linebreak style + */ + "linebreak-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require empty lines around comments + */ + "lines-around-comment"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow newlines around directives + */ + "lines-around-directive"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum depth that blocks can be nested + */ + "max-depth"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum line length + */ + "max-len"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum number of lines per file + */ + "max-lines"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum depth that callbacks can be nested + */ + "max-nested-callbacks"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum number of parameters in function definitions + */ + "max-params"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum number of statements allowed in function blocks + */ + "max-statements"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a maximum number of statements allowed per line + */ + "max-statements-per-line"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce a particular style for multiline comments + */ + "multiline-comment-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce newlines between operands of ternary expressions + */ + "multiline-ternary"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require constructor function names to begin with a capital letter + */ + "new-cap"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow an empty line after var declarations + */ + "newline-after-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require an empty line before return statements + */ + "newline-before-return"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require a newline after each call in a method chain + */ + "newline-per-chained-call"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require parentheses when invoking a constructor with no arguments + */ + "new-parens"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow Array constructors + */ + "no-array-constructor"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow bitwise operators + */ + "no-bitwise"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow continue statements + */ + "no-continue"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow inline comments after code + */ + "no-inline-comments"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow if statements as the only statement in else blocks + */ + "no-lonely-if"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow mixed binary operators + */ + "no-mixed-operators"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow mixed spaces and tabs for indentation + */ + "no-mixed-spaces-and-tabs"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow use of chained assignment expressions + */ + "no-multi-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow multiple empty lines + */ + "no-multiple-empty-lines"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow negated conditions + */ + "no-negated-condition"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow nested ternary expressions + */ + "no-nested-ternary"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow Object constructors + */ + "no-new-object"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow the unary operators ++ and -- + */ + "no-plusplus"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified syntax + */ + "no-restricted-syntax"?: number | ("off" | "warn" | "error") | unknown[]; + "no-spaced-func"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow tabs in file + */ + "no-tabs"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow ternary operators + */ + "no-ternary"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow trailing whitespace at the end of lines + */ + "no-trailing-spaces"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow dangling underscores in identifiers + */ + "no-underscore-dangle"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow ternary operators when simpler alternatives exist + */ + "no-unneeded-ternary"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow whitespace before properties + */ + "no-whitespace-before-property"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce the location of single-line statements + */ + "nonblock-statement-body-position"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce consistent line breaks inside braces + */ + "object-curly-newline"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing inside braces + */ + "object-curly-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce placing object properties on separate lines + */ + "object-property-newline"?: number | ("off" | "warn" | "error") | unknown[]; + "object-shorthand"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce variables to be declared either together or separately in functions + */ + "one-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow newlines around var declarations + */ + "one-var-declaration-per-line"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Require or disallow assignment operator shorthand where possible + */ + "operator-assignment"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent linebreak style for operators + */ + "operator-linebreak"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow padding within blocks + */ + "padded-blocks"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow padding lines between statements + */ + "padding-line-between-statements"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Require quotes around object literal property names + */ + "quote-props"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce the consistent use of either backticks, double, or single quotes + */ + quotes?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require JSDoc comments + */ + "require-jsdoc"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow semicolons instead of ASI + */ + semi?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before and after semicolons + */ + "semi-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce location of semicolons + */ + "semi-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Requires object keys to be sorted + */ + "sort-keys"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require variables within the same declaration block to be sorted + */ + "sort-vars"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before blocks + */ + "space-before-blocks"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before function definition opening parenthesis + */ + "space-before-function-paren"?: + | number + | ("off" | "warn" | "error") + | unknown[]; + /** + * Enforce consistent spacing after the // or /\* in a comment + */ + "spaced-comment"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require spacing around operators + */ + "space-infix-ops"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing inside parentheses + */ + "space-in-parens"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before or after unary operators + */ + "space-unary-ops"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce spacing around colons of switch statements + */ + "switch-colon-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow spacing between template tags and their literals + */ + "template-tag-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow Unicode byte order mark (BOM) + */ + "unicode-bom"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require parenthesis around regex literals + */ + "wrap-regex"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface EcmaScript6 { + /** + * Require braces around arrow function bodies + */ + "arrow-body-style"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require parentheses around arrow function arguments + */ + "arrow-parens"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing before and after the arrow in arrow functions + */ + "arrow-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require super() calls in constructors + */ + "constructor-super"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce consistent spacing around \* operators in generator functions + */ + "generator-star-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow reassigning class members + */ + "no-class-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow arrow functions where they could be confused with comparisons + */ + "no-confusing-arrow"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow reassigning const variables + */ + "no-const-assign"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow duplicate class members + */ + "no-dupe-class-members"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow duplicate module imports + */ + "no-duplicate-imports"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow new operators with the Symbol object + */ + "no-new-symbol"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow specified modules when loaded by import + */ + "no-restricted-imports"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow this/super before calling super() in constructors + */ + "no-this-before-super"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary computed property keys in object literals + */ + "no-useless-computed-key"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow unnecessary constructors + */ + "no-useless-constructor"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow renaming import, export, and destructured assignments to the same name + */ + "no-useless-rename"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require let or const instead of var + */ + "no-var"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow method and property shorthand syntax for object literals + */ + "object-shorthand"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require arrow functions as callbacks + */ + "prefer-arrow-callback"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require const declarations for variables that are never reassigned after declared + */ + "prefer-const"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require destructuring from arrays and/or objects + */ + "prefer-destructuring"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Disallow parseInt() in favor of binary, octal, and hexadecimal literals + */ + "prefer-numeric-literals"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require Reflect methods where applicable + */ + "prefer-reflect"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require rest parameters instead of arguments + */ + "prefer-rest-params"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require spread operators instead of .apply() + */ + "prefer-spread"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require template literals instead of string concatenation + */ + "prefer-template"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require generator functions to contain yield + */ + "require-yield"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce spacing between rest and spread operators and their expressions + */ + "rest-spread-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Enforce sorted import declarations within modules + */ + "sort-imports"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require symbol descriptions + */ + "symbol-description"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow spacing around embedded expressions of template strings + */ + "template-curly-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + /** + * Require or disallow spacing around the _ in yield_ expressions + */ + "yield-star-spacing"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface Legacy { + "max-depth"?: number | ("off" | "warn" | "error") | unknown[]; + "max-len"?: number | ("off" | "warn" | "error") | unknown[]; + "max-params"?: number | ("off" | "warn" | "error") | unknown[]; + "max-statements"?: number | ("off" | "warn" | "error") | unknown[]; + "no-bitwise"?: number | ("off" | "warn" | "error") | unknown[]; + "no-plusplus"?: number | ("off" | "warn" | "error") | unknown[]; + [k: string]: unknown; +} +export interface HttpsJsonSchemastoreOrgPartialEslintPluginsJson { + /** + * Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md + */ + "@angular-eslint/component-class-suffix"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + suffixes?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.dev/style-guide#style-05-04 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md + */ + "@angular-eslint/component-max-inline-declarations"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + template?: number; + styles?: number; + animations?: number; + [k: string]: unknown; + }, + ]; + /** + * Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-07, https://angular.dev/style-guide#style-05-02 + * and https://angular.dev/style-guide#style-05-03. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md + */ + "@angular-eslint/component-selector"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + type?: string | ("element" | "attribute")[]; + prefix?: string | unknown[]; + style?: "camelCase" | "kebab-case"; + [k: string]: unknown; + }, + ]; + /** + * Ensures consistent usage of `styles`/`styleUrls`/`styleUrl` within Component metadata + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md + */ + "@angular-eslint/consistent-component-styles"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Ensures that classes use contextual decorators in its body + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md + */ + "@angular-eslint/contextual-decorator"?: { + [k: string]: unknown; + }; + /** + * Ensures that lifecycle methods are used in a correct context + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md + */ + "@angular-eslint/contextual-lifecycle"?: { + [k: string]: unknown; + }; + /** + * Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md + */ + "@angular-eslint/directive-class-suffix"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + suffixes?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md + */ + "@angular-eslint/directive-selector"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + type?: string | ("element" | "attribute")[]; + prefix?: string | unknown[]; + style?: "camelCase" | "kebab-case"; + [k: string]: unknown; + }, + ]; + /** + * Angular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md + */ + "@angular-eslint/no-async-lifecycle-method"?: { + [k: string]: unknown; + }; + /** + * The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use-case than getting a stream of values (using @Input), so often the @Attribute decorator is mistakenly used when @Input was what was intended. This rule disallows usage of @Attribute decorator altogether in order to prevent these mistakes. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md + */ + "@angular-eslint/no-attribute-decorator"?: { + [k: string]: unknown; + }; + /** + * Ensures that directives not implement conflicting lifecycle interfaces. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md + */ + "@angular-eslint/no-conflicting-lifecycle"?: { + [k: string]: unknown; + }; + /** + * Ensures that metadata arrays do not contain duplicate entries. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicates-in-metadata-arrays.md + */ + "@angular-eslint/no-duplicates-in-metadata-arrays"?: { + [k: string]: unknown; + }; + /** + * Disallows declaring empty lifecycle methods + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md + */ + "@angular-eslint/no-empty-lifecycle-method"?: { + [k: string]: unknown; + }; + /** + * Disallows usage of `forwardRef` references for DI + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-forward-ref.md + */ + "@angular-eslint/no-forward-ref"?: { + [k: string]: unknown; + }; + /** + * Disallows usage of the `host` metadata property. NOTE: This used to be recommended by the Angular Team, but now they recommend the exact opposite: https://github.com/angular/angular/issues/54284 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-host-metadata-property.md + */ + "@angular-eslint/no-host-metadata-property"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + allowStatic?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-prefix.md + */ + "@angular-eslint/no-input-prefix"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + prefixes?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Ensures that input bindings are not aliased + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md + */ + "@angular-eslint/no-input-rename"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * A list with allowed input names + */ + allowedNames?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Disallows usage of the `inputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md + */ + "@angular-eslint/no-inputs-metadata-property"?: { + [k: string]: unknown; + }; + /** + * Disallows explicit calls to lifecycle methods + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md + */ + "@angular-eslint/no-lifecycle-call"?: { + [k: string]: unknown; + }; + /** + * Ensures that output bindings, including aliases, are not named as standard DOM events + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md + */ + "@angular-eslint/no-output-native"?: { + [k: string]: unknown; + }; + /** + * Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/style-guide#style-05-16 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md + */ + "@angular-eslint/no-output-on-prefix"?: { + [k: string]: unknown; + }; + /** + * Ensures that output bindings are not aliased + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md + */ + "@angular-eslint/no-output-rename"?: { + [k: string]: unknown; + }; + /** + * Disallows usage of the `outputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md + */ + "@angular-eslint/no-outputs-metadata-property"?: { + [k: string]: unknown; + }; + /** + * Disallows the declaration of impure pipes + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md + */ + "@angular-eslint/no-pipe-impure"?: { + [k: string]: unknown; + }; + /** + * Disallows usage of the `queries` metadata property. See more at https://angular.dev/style-guide#style-05-12. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md + */ + "@angular-eslint/no-queries-metadata-property"?: { + [k: string]: unknown; + }; + /** + * Enforce consistent prefix for pipes. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md + */ + "@angular-eslint/pipe-prefix"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + prefixes?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Ensures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush` + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md + */ + "@angular-eslint/prefer-on-push-component-change-detection"?: { + [k: string]: unknown; + }; + /** + * Ensures component, directive and pipe `standalone` property is set to `true` in the component decorator + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md + */ + "@angular-eslint/prefer-standalone"?: { + [k: string]: unknown; + }; + /** + * Ensures component `standalone` property is set to `true` in the component decorator + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md + */ + "@angular-eslint/prefer-standalone-component"?: { + [k: string]: unknown; + }; + /** + * Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md + */ + "@angular-eslint/prefer-output-readonly"?: { + [k: string]: unknown; + }; + /** + * The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.dev/style-guide#style-05-04 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md + */ + "@angular-eslint/relative-url-prefix"?: { + [k: string]: unknown; + }; + /** + * Ensures that $localize tagged messages contain helpful metadata to aid with translations. + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-localize-metadata.md + */ + "@angular-eslint/require-localize-metadata"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + requireDescription?: boolean; + requireMeaning?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Ensures that lifecycle methods are declared in order of execution + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-lifecycle-methods.md + */ + "@angular-eslint/sort-lifecycle-methods"?: { + [k: string]: unknown; + }; + /** + * Ensures ASC alphabetical order for `NgModule` metadata arrays for easy visual scanning + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-ngmodule-metadata-arrays.md + */ + "@angular-eslint/sort-ngmodule-metadata-arrays"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * A string with a BCP 47 language tag. + */ + locale?: string; + [k: string]: unknown; + }, + ]; + /** + * Component selector must be declared + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-selector.md + */ + "@angular-eslint/use-component-selector"?: { + [k: string]: unknown; + }; + /** + * Disallows using `ViewEncapsulation.None` + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md + */ + "@angular-eslint/use-component-view-encapsulation"?: { + [k: string]: unknown; + }; + /** + * Using the `providedIn` property makes `Injectables` tree-shakable + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-injectable-provided-in.md + */ + "@angular-eslint/use-injectable-provided-in"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + ignoreClassNamePattern?: string; + [k: string]: unknown; + }, + ]; + /** + * Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#style-09-01 + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md + */ + "@angular-eslint/use-lifecycle-interface"?: { + [k: string]: unknown; + }; + /** + * Ensures that `Pipes` implement `PipeTransform` interface + * https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md + */ + "@angular-eslint/use-pipe-transform-interface"?: { + [k: string]: unknown; + }; + /** + * Ensure imports point to a file/module that can be resolved. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unresolved.md + */ + "eslint-plugin-import/no-unresolved"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + amd?: boolean; + esmodule?: boolean; + /** + * @minItems 1 + */ + ignore?: [string, ...string[]]; + caseSensitive?: boolean; + caseSensitiveStrict?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Ensure named imports correspond to a named export in the remote file. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/named.md + */ + "eslint-plugin-import/named"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Ensure a default export is present, given a default import. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/default.md + */ + "eslint-plugin-import/default"?: { + [k: string]: unknown; + }; + /** + * Ensure imported namespaces contain dereferenced properties as they are dereferenced. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/namespace.md + */ + "eslint-plugin-import/namespace"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * If `false`, will report computed (and thus, un-lintable) references to namespace members. + */ + allowComputed?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid namespace (a.k.a. "wildcard" `*`) imports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-namespace.md + */ + "eslint-plugin-import/no-namespace"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + ignore?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Forbid any invalid exports, i.e. re-export of the same name. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/export.md + */ + "eslint-plugin-import/export"?: { + [k: string]: unknown; + }; + /** + * Forbid the use of mutable exports with `var` or `let`. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-mutable-exports.md + */ + "eslint-plugin-import/no-mutable-exports"?: { + [k: string]: unknown; + }; + /** + * Ensure consistent use of file extension within the import path. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/extensions.md + */ + "eslint-plugin-import/extensions"?: { + [k: string]: unknown; + }; + /** + * Enforce which files can be imported in a given folder. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-restricted-paths.md + */ + "eslint-plugin-import/no-restricted-paths"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * @minItems 1 + */ + zones?: [ + { + target?: string | [string, ...string[]]; + from?: string | [string, ...string[]]; + except?: string[]; + message?: string; + }, + ...{ + target?: string | [string, ...string[]]; + from?: string | [string, ...string[]]; + except?: string[]; + message?: string; + }[], + ]; + basePath?: string; + [k: string]: unknown; + }, + ]; + /** + * Forbid importing the submodules of other modules. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-internal-modules.md + */ + "eslint-plugin-import/no-internal-modules"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Prefer named exports to be grouped together in a single export declaration + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/group-exports.md + */ + "eslint-plugin-import/group-exports"?: { + [k: string]: unknown; + }; + /** + * Forbid importing packages through relative paths. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-packages.md + */ + "eslint-plugin-import/no-relative-packages"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + amd?: boolean; + esmodule?: boolean; + /** + * @minItems 1 + */ + ignore?: [string, ...string[]]; + [k: string]: unknown; + }, + ]; + /** + * Forbid importing modules from parent directories. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-parent-imports.md + */ + "eslint-plugin-import/no-relative-parent-imports"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + amd?: boolean; + esmodule?: boolean; + /** + * @minItems 1 + */ + ignore?: [string, ...string[]]; + [k: string]: unknown; + }, + ]; + /** + * Enforce or ban the use of inline type-only markers for named imports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/consistent-type-specifier-style.md + */ + "eslint-plugin-import/consistent-type-specifier-style"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Forbid a module from importing itself. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-self-import.md + */ + "eslint-plugin-import/no-self-import"?: { + [k: string]: unknown; + }; + /** + * Forbid a module from importing a module with a dependency path back to itself. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-cycle.md + */ + "eslint-plugin-import/no-cycle"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + amd?: boolean; + esmodule?: boolean; + /** + * @minItems 1 + */ + ignore?: [string, ...string[]]; + maxDepth?: number | "∞"; + /** + * ignore external modules + */ + ignoreExternal?: boolean; + /** + * Allow cyclic dependency if there is at least one dynamic import in the chain + */ + allowUnsafeDynamicCyclicDependency?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid named default exports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-default.md + */ + "eslint-plugin-import/no-named-default"?: { + [k: string]: unknown; + }; + /** + * Forbid use of exported name as identifier of default export. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default.md + */ + "eslint-plugin-import/no-named-as-default"?: { + [k: string]: unknown; + }; + /** + * Forbid use of exported name as property of default export. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default-member.md + */ + "eslint-plugin-import/no-named-as-default-member"?: { + [k: string]: unknown; + }; + /** + * Forbid anonymous values as default exports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-anonymous-default-export.md + */ + "eslint-plugin-import/no-anonymous-default-export"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * If `false`, will report default export of an array + */ + allowArray?: boolean; + /** + * If `false`, will report default export of an arrow function + */ + allowArrowFunction?: boolean; + /** + * If `false`, will report default export of a function call + */ + allowCallExpression?: boolean; + /** + * If `false`, will report default export of an anonymous class + */ + allowAnonymousClass?: boolean; + /** + * If `false`, will report default export of an anonymous function + */ + allowAnonymousFunction?: boolean; + /** + * If `false`, will report default export of a literal + */ + allowLiteral?: boolean; + /** + * If `false`, will report default export of an object expression + */ + allowObject?: boolean; + /** + * If `false`, will report default export of a class instantiation + */ + allowNew?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid modules without exports, or exports without matching import in another module. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unused-modules.md + */ + "eslint-plugin-import/no-unused-modules"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * files/paths to be analyzed (only for unused exports) + */ + src?: string[]; + /** + * files/paths for which unused exports will not be reported (e.g module entry points) + */ + ignoreExports?: string[]; + /** + * report modules without any exports + */ + missingExports?: boolean; + /** + * report exports without any usage + */ + unusedExports?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid CommonJS `require` calls and `module.exports` or `exports.*`. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-commonjs.md + */ + "eslint-plugin-import/no-commonjs"?: { + [k: string]: unknown; + }; + /** + * Forbid AMD `require` and `define` calls. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-amd.md + */ + "eslint-plugin-import/no-amd"?: { + [k: string]: unknown; + }; + /** + * Forbid repeated import of the same module in multiple places. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-duplicates.md + */ + "eslint-plugin-import/no-duplicates"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + considerQueryString?: boolean; + "prefer-inline"?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Ensure all imports appear before other statements. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/first.md + */ + "eslint-plugin-import/first"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Enforce the maximum number of dependencies a module can have. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/max-dependencies.md + */ + "eslint-plugin-import/max-dependencies"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + max?: number; + ignoreTypeImports?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid the use of extraneous packages. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-extraneous-dependencies.md + */ + "eslint-plugin-import/no-extraneous-dependencies"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + devDependencies?: boolean | unknown[]; + optionalDependencies?: boolean | unknown[]; + peerDependencies?: boolean | unknown[]; + bundledDependencies?: boolean | unknown[]; + packageDir?: string | unknown[]; + includeInternal?: boolean; + includeTypes?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid import of modules using absolute paths. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-absolute-path.md + */ + "eslint-plugin-import/no-absolute-path"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + amd?: boolean; + esmodule?: boolean; + /** + * @minItems 1 + */ + ignore?: [string, ...string[]]; + [k: string]: unknown; + }, + ]; + /** + * Forbid Node.js builtin modules. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-nodejs-modules.md + */ + "eslint-plugin-import/no-nodejs-modules"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + allow?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Forbid webpack loader syntax in imports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-webpack-loader-syntax.md + */ + "eslint-plugin-import/no-webpack-loader-syntax"?: { + [k: string]: unknown; + }; + /** + * Enforce a convention in module import order. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/order.md + */ + "eslint-plugin-import/order"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + groups?: unknown[]; + pathGroupsExcludedImportTypes?: unknown[]; + distinctGroup?: boolean; + pathGroups?: { + pattern: string; + patternOptions?: { + [k: string]: unknown; + }; + group: + | "builtin" + | "external" + | "internal" + | "unknown" + | "parent" + | "sibling" + | "index" + | "object" + | "type"; + position?: "after" | "before"; + }[]; + "newlines-between"?: + | "ignore" + | "always" + | "always-and-inside-groups" + | "never"; + alphabetize?: { + caseInsensitive?: boolean; + order?: "ignore" | "asc" | "desc"; + orderImportKind?: "ignore" | "asc" | "desc"; + }; + warnOnUnassignedImports?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Enforce a newline after import statements. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/newline-after-import.md + */ + "eslint-plugin-import/newline-after-import"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + count?: number; + exactCount?: boolean; + considerComments?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer a default export if module exports a single name or multiple names. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/prefer-default-export.md + */ + "eslint-plugin-import/prefer-default-export"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + target?: "single" | "any"; + [k: string]: unknown; + }, + ]; + /** + * Forbid default exports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-default-export.md + */ + "eslint-plugin-import/no-default-export"?: { + [k: string]: unknown; + }; + /** + * Forbid named exports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-export.md + */ + "eslint-plugin-import/no-named-export"?: { + [k: string]: unknown; + }; + /** + * Forbid `require()` calls with expressions. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-dynamic-require.md + */ + "eslint-plugin-import/no-dynamic-require"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + esmodule?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Forbid potentially ambiguous parse goal (`script` vs. `module`). + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/unambiguous.md + */ + "eslint-plugin-import/unambiguous"?: { + [k: string]: unknown; + }; + /** + * Forbid unassigned imports + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unassigned-import.md + */ + "eslint-plugin-import/no-unassigned-import"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + devDependencies?: boolean | unknown[]; + optionalDependencies?: boolean | unknown[]; + peerDependencies?: boolean | unknown[]; + allow?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Forbid unnecessary path segments in import and require statements. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-useless-path-segments.md + */ + "eslint-plugin-import/no-useless-path-segments"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + commonjs?: boolean; + noUselessIndex?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Enforce a leading comment with the webpackChunkName for dynamic imports. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/dynamic-import-chunkname.md + */ + "eslint-plugin-import/dynamic-import-chunkname"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + importFunctions?: string[]; + webpackChunknameFormat?: string; + [k: string]: unknown; + }, + ]; + /** + * Forbid import statements with CommonJS module.exports. + */ + "eslint-plugin-import/no-import-module-exports"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + exceptions?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Forbid empty named import blocks. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-empty-named-blocks.md + */ + "eslint-plugin-import/no-empty-named-blocks"?: { + [k: string]: unknown; + }; + /** + * Ensure all exports appear after other statements. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/exports-last.md + */ + "eslint-plugin-import/exports-last"?: { + [k: string]: unknown; + }; + /** + * Forbid imported names marked with `@deprecated` documentation tag. + * https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-deprecated.md + */ + "eslint-plugin-import/no-deprecated"?: { + [k: string]: unknown; + }; + /** + * Replaced by `import/first`. + * https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md + */ + "eslint-plugin-import/imports-first"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Improve regexes by making them shorter, consistent, and safer. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md + */ + "eslint-plugin-unicorn/better-regex"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + sortCharacterClasses?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Enforce a specific parameter name in catch clauses. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md + */ + "eslint-plugin-unicorn/catch-error-name"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + name?: string; + ignore?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Use destructured variables over properties. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md + */ + "eslint-plugin-unicorn/consistent-destructuring"?: { + [k: string]: unknown; + }; + /** + * Prefer consistent types when spreading a ternary in an array literal. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md + */ + "eslint-plugin-unicorn/consistent-empty-array-spread"?: { + [k: string]: unknown; + }; + /** + * Move function definitions to the highest possible scope. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md + */ + "eslint-plugin-unicorn/consistent-function-scoping"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkArrowFunctions?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Enforce correct `Error` subclassing. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md + */ + "eslint-plugin-unicorn/custom-error-definition"?: { + [k: string]: unknown; + }; + /** + * Enforce no spaces between braces. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md + */ + "eslint-plugin-unicorn/empty-brace-spaces"?: { + [k: string]: unknown; + }; + /** + * Enforce passing a `message` value when creating a built-in error. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md + */ + "eslint-plugin-unicorn/error-message"?: { + [k: string]: unknown; + }; + /** + * Require escape sequences to use uppercase values. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md + */ + "eslint-plugin-unicorn/escape-case"?: { + [k: string]: unknown; + }; + /** + * Add expiration conditions to TODO comments. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md + */ + "eslint-plugin-unicorn/expiring-todo-comments"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + terms?: string[]; + ignore?: unknown[]; + ignoreDatesOnPullRequests?: boolean; + allowWarningComments?: boolean; + date?: string; + [k: string]: unknown; + }, + ]; + /** + * Enforce explicitly comparing the `length` or `size` property of a value. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md + */ + "eslint-plugin-unicorn/explicit-length-check"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + "non-zero"?: "greater-than" | "not-equal"; + [k: string]: unknown; + }, + ]; + /** + * Enforce a case style for filenames. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md + */ + "eslint-plugin-unicorn/filename-case"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Enforce specific import styles per module. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md + */ + "eslint-plugin-unicorn/import-style"?: { + [k: string]: unknown; + }; + /** + * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md + */ + "eslint-plugin-unicorn/new-for-builtins"?: { + [k: string]: unknown; + }; + /** + * Enforce specifying rules to disable in `eslint-disable` comments. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md + */ + "eslint-plugin-unicorn/no-abusive-eslint-disable"?: { + [k: string]: unknown; + }; + /** + * Disallow anonymous functions and classes as the default export. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md + */ + "eslint-plugin-unicorn/no-anonymous-default-export"?: { + [k: string]: unknown; + }; + /** + * Prevent passing a function reference directly to iterator methods. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md + */ + "eslint-plugin-unicorn/no-array-callback-reference"?: { + [k: string]: unknown; + }; + /** + * Prefer `for…of` over the `forEach` method. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md + */ + "eslint-plugin-unicorn/no-array-for-each"?: { + [k: string]: unknown; + }; + /** + * Disallow using the `this` argument in array methods. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md + */ + "eslint-plugin-unicorn/no-array-method-this-argument"?: { + [k: string]: unknown; + }; + /** + * Enforce combining multiple `Array#push()` into one call. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md + */ + "eslint-plugin-unicorn/no-array-push-push"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + ignore?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Disallow `Array#reduce()` and `Array#reduceRight()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md + */ + "eslint-plugin-unicorn/no-array-reduce"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + allowSimpleOperations?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Disallow member access from await expression. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md + */ + "eslint-plugin-unicorn/no-await-expression-member"?: { + [k: string]: unknown; + }; + /** + * Disallow using `await` in `Promise` method parameters. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md + */ + "eslint-plugin-unicorn/no-await-in-promise-methods"?: { + [k: string]: unknown; + }; + /** + * Do not use leading/trailing space between `console.log` parameters. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md + */ + "eslint-plugin-unicorn/no-console-spaces"?: { + [k: string]: unknown; + }; + /** + * Do not use `document.cookie` directly. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md + */ + "eslint-plugin-unicorn/no-document-cookie"?: { + [k: string]: unknown; + }; + /** + * Disallow empty files. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md + */ + "eslint-plugin-unicorn/no-empty-file"?: { + [k: string]: unknown; + }; + /** + * Do not use a `for` loop that can be replaced with a `for-of` loop. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md + */ + "eslint-plugin-unicorn/no-for-loop"?: { + [k: string]: unknown; + }; + /** + * Enforce the use of Unicode escapes instead of hexadecimal escapes. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md + */ + "eslint-plugin-unicorn/no-hex-escape"?: { + [k: string]: unknown; + }; + /** + * Require `Array.isArray()` instead of `instanceof Array`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md + */ + "eslint-plugin-unicorn/no-instanceof-array"?: { + [k: string]: unknown; + }; + /** + * Disallow invalid options in `fetch()` and `new Request()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md + */ + "eslint-plugin-unicorn/no-invalid-fetch-options"?: { + [k: string]: unknown; + }; + /** + * Prevent calling `EventTarget#removeEventListener()` with the result of an expression. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md + */ + "eslint-plugin-unicorn/no-invalid-remove-event-listener"?: { + [k: string]: unknown; + }; + /** + * Disallow identifiers starting with `new` or `class`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md + */ + "eslint-plugin-unicorn/no-keyword-prefix"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + /** + * @minItems 1 + * @maxItems 1 + */ + disallowedPrefixes?: [string]; + checkProperties?: boolean; + onlyCamelCase?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Disallow `if` statements as the only statement in `if` blocks without `else`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md + */ + "eslint-plugin-unicorn/no-lonely-if"?: { + [k: string]: unknown; + }; + /** + * Disallow a magic number as the `depth` argument in `Array#flat(…).` + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md + */ + "eslint-plugin-unicorn/no-magic-array-flat-depth"?: { + [k: string]: unknown; + }; + /** + * Disallow negated conditions. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md + */ + "eslint-plugin-unicorn/no-negated-condition"?: { + [k: string]: unknown; + }; + /** + * Disallow negated expression in equality check. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md + */ + "eslint-plugin-unicorn/no-negation-in-equality-check"?: { + [k: string]: unknown; + }; + /** + * Disallow nested ternary expressions. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md + */ + "eslint-plugin-unicorn/no-nested-ternary"?: { + [k: string]: unknown; + }; + /** + * Disallow `new Array()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md + */ + "eslint-plugin-unicorn/no-new-array"?: { + [k: string]: unknown; + }; + /** + * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md + */ + "eslint-plugin-unicorn/no-new-buffer"?: { + [k: string]: unknown; + }; + /** + * Disallow the use of the `null` literal. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md + */ + "eslint-plugin-unicorn/no-null"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkStrictEquality?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Disallow the use of objects as default parameters. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md + */ + "eslint-plugin-unicorn/no-object-as-default-parameter"?: { + [k: string]: unknown; + }; + /** + * Disallow `process.exit()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md + */ + "eslint-plugin-unicorn/no-process-exit"?: { + [k: string]: unknown; + }; + /** + * Disallow passing single-element arrays to `Promise` methods. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md + */ + "eslint-plugin-unicorn/no-single-promise-in-promise-methods"?: { + [k: string]: unknown; + }; + /** + * Disallow classes that only have static members. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md + */ + "eslint-plugin-unicorn/no-static-only-class"?: { + [k: string]: unknown; + }; + /** + * Disallow `then` property. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md + */ + "eslint-plugin-unicorn/no-thenable"?: { + [k: string]: unknown; + }; + /** + * Disallow assigning `this` to a variable. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md + */ + "eslint-plugin-unicorn/no-this-assignment"?: { + [k: string]: unknown; + }; + /** + * Disallow comparing `undefined` using `typeof`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md + */ + "eslint-plugin-unicorn/no-typeof-undefined"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkGlobalVariables?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Disallow awaiting non-promise values. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md + */ + "eslint-plugin-unicorn/no-unnecessary-await"?: { + [k: string]: unknown; + }; + /** + * Enforce the use of built-in methods instead of unnecessary polyfills. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md + */ + "eslint-plugin-unicorn/no-unnecessary-polyfills"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + targets?: + | string + | unknown[] + | { + [k: string]: unknown; + }; + [k: string]: unknown; + }, + ]; + /** + * Disallow unreadable array destructuring. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md + */ + "eslint-plugin-unicorn/no-unreadable-array-destructuring"?: { + [k: string]: unknown; + }; + /** + * Disallow unreadable IIFEs. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md + */ + "eslint-plugin-unicorn/no-unreadable-iife"?: { + [k: string]: unknown; + }; + /** + * Disallow unused object properties. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md + */ + "eslint-plugin-unicorn/no-unused-properties"?: { + [k: string]: unknown; + }; + /** + * Disallow useless fallback when spreading in object literals. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md + */ + "eslint-plugin-unicorn/no-useless-fallback-in-spread"?: { + [k: string]: unknown; + }; + /** + * Disallow useless array length check. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md + */ + "eslint-plugin-unicorn/no-useless-length-check"?: { + [k: string]: unknown; + }; + /** + * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md + */ + "eslint-plugin-unicorn/no-useless-promise-resolve-reject"?: { + [k: string]: unknown; + }; + /** + * Disallow unnecessary spread. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md + */ + "eslint-plugin-unicorn/no-useless-spread"?: { + [k: string]: unknown; + }; + /** + * Disallow useless case in switch statements. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md + */ + "eslint-plugin-unicorn/no-useless-switch-case"?: { + [k: string]: unknown; + }; + /** + * Disallow useless `undefined`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md + */ + "eslint-plugin-unicorn/no-useless-undefined"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkArguments?: boolean; + checkArrowFunctionBody?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Disallow number literals with zero fractions or dangling dots. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md + */ + "eslint-plugin-unicorn/no-zero-fractions"?: { + [k: string]: unknown; + }; + /** + * Enforce proper case for numeric literals. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md + */ + "eslint-plugin-unicorn/number-literal-case"?: { + [k: string]: unknown; + }; + /** + * Enforce the style of numeric separators by correctly grouping digits. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md + */ + "eslint-plugin-unicorn/numeric-separators-style"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + binary?: { + onlyIfContainsSeparator?: boolean; + minimumDigits?: number; + groupLength?: number; + }; + octal?: { + onlyIfContainsSeparator?: boolean; + minimumDigits?: number; + groupLength?: number; + }; + hexadecimal?: { + onlyIfContainsSeparator?: boolean; + minimumDigits?: number; + groupLength?: number; + }; + number?: { + onlyIfContainsSeparator?: boolean; + minimumDigits?: number; + groupLength?: number; + }; + onlyIfContainsSeparator?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md + */ + "eslint-plugin-unicorn/prefer-add-event-listener"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + excludedPackages?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md + */ + "eslint-plugin-unicorn/prefer-array-find"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkFromLast?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer `.flatMap(…)` over `.map(…).flat()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md + */ + "eslint-plugin-unicorn/prefer-array-flat-map"?: { + [k: string]: unknown; + }; + /** + * Prefer `Array#flat()` over legacy techniques to flatten arrays. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md + */ + "eslint-plugin-unicorn/prefer-array-flat"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + functions?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md + */ + "eslint-plugin-unicorn/prefer-array-index-of"?: { + [k: string]: unknown; + }; + /** + * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md + */ + "eslint-plugin-unicorn/prefer-array-some"?: { + [k: string]: unknown; + }; + /** + * Prefer `.at()` method for index access and `String#charAt()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md + */ + "eslint-plugin-unicorn/prefer-at"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + getLastElementFunctions?: unknown[]; + checkAllIndexAccess?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md + */ + "eslint-plugin-unicorn/prefer-blob-reading-methods"?: { + [k: string]: unknown; + }; + /** + * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md + */ + "eslint-plugin-unicorn/prefer-code-point"?: { + [k: string]: unknown; + }; + /** + * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md + */ + "eslint-plugin-unicorn/prefer-date-now"?: { + [k: string]: unknown; + }; + /** + * Prefer default parameters over reassignment. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md + */ + "eslint-plugin-unicorn/prefer-default-parameters"?: { + [k: string]: unknown; + }; + /** + * Prefer `Node#append()` over `Node#appendChild()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md + */ + "eslint-plugin-unicorn/prefer-dom-node-append"?: { + [k: string]: unknown; + }; + /** + * Prefer using `.dataset` on DOM elements over calling attribute methods. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md + */ + "eslint-plugin-unicorn/prefer-dom-node-dataset"?: { + [k: string]: unknown; + }; + /** + * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md + */ + "eslint-plugin-unicorn/prefer-dom-node-remove"?: { + [k: string]: unknown; + }; + /** + * Prefer `.textContent` over `.innerText`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md + */ + "eslint-plugin-unicorn/prefer-dom-node-text-content"?: { + [k: string]: unknown; + }; + /** + * Prefer `EventTarget` over `EventEmitter`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md + */ + "eslint-plugin-unicorn/prefer-event-target"?: { + [k: string]: unknown; + }; + /** + * Prefer `export…from` when re-exporting. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md + */ + "eslint-plugin-unicorn/prefer-export-from"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + ignoreUsedVariables?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md + */ + "eslint-plugin-unicorn/prefer-includes"?: { + [k: string]: unknown; + }; + /** + * Prefer reading a JSON file as a buffer. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md + */ + "eslint-plugin-unicorn/prefer-json-parse-buffer"?: { + [k: string]: unknown; + }; + /** + * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md + */ + "eslint-plugin-unicorn/prefer-keyboard-event-key"?: { + [k: string]: unknown; + }; + /** + * Prefer using a logical operator over a ternary. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md + */ + "eslint-plugin-unicorn/prefer-logical-operator-over-ternary"?: { + [k: string]: unknown; + }; + /** + * Enforce the use of `Math.trunc` instead of bitwise operators. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md + */ + "eslint-plugin-unicorn/prefer-math-trunc"?: { + [k: string]: unknown; + }; + /** + * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md + */ + "eslint-plugin-unicorn/prefer-modern-dom-apis"?: { + [k: string]: unknown; + }; + /** + * Prefer modern `Math` APIs over legacy patterns. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md + */ + "eslint-plugin-unicorn/prefer-modern-math-apis"?: { + [k: string]: unknown; + }; + /** + * Prefer JavaScript modules (ESM) over CommonJS. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md + */ + "eslint-plugin-unicorn/prefer-module"?: { + [k: string]: unknown; + }; + /** + * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md + */ + "eslint-plugin-unicorn/prefer-native-coercion-functions"?: { + [k: string]: unknown; + }; + /** + * Prefer negative index over `.length - index` when possible. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md + */ + "eslint-plugin-unicorn/prefer-negative-index"?: { + [k: string]: unknown; + }; + /** + * Prefer using the `node:` protocol when importing Node.js builtin modules. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md + */ + "eslint-plugin-unicorn/prefer-node-protocol"?: { + [k: string]: unknown; + }; + /** + * Prefer `Number` static properties over global ones. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md + */ + "eslint-plugin-unicorn/prefer-number-properties"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + checkInfinity?: boolean; + checkNaN?: boolean; + [k: string]: unknown; + }, + ]; + /** + * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md + */ + "eslint-plugin-unicorn/prefer-object-from-entries"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + functions?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Prefer omitting the `catch` binding parameter. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md + */ + "eslint-plugin-unicorn/prefer-optional-catch-binding"?: { + [k: string]: unknown; + }; + /** + * Prefer borrowing methods from the prototype instead of the instance. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md + */ + "eslint-plugin-unicorn/prefer-prototype-methods"?: { + [k: string]: unknown; + }; + /** + * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md + */ + "eslint-plugin-unicorn/prefer-query-selector"?: { + [k: string]: unknown; + }; + /** + * Prefer `Reflect.apply()` over `Function#apply()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md + */ + "eslint-plugin-unicorn/prefer-reflect-apply"?: { + [k: string]: unknown; + }; + /** + * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md + */ + "eslint-plugin-unicorn/prefer-regexp-test"?: { + [k: string]: unknown; + }; + /** + * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md + */ + "eslint-plugin-unicorn/prefer-set-has"?: { + [k: string]: unknown; + }; + /** + * Prefer using `Set#size` instead of `Array#length`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md + */ + "eslint-plugin-unicorn/prefer-set-size"?: { + [k: string]: unknown; + }; + /** + * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md + */ + "eslint-plugin-unicorn/prefer-spread"?: { + [k: string]: unknown; + }; + /** + * Prefer using the `String.raw` tag to avoid escaping `\`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md + */ + "eslint-plugin-unicorn/prefer-string-raw"?: { + [k: string]: unknown; + }; + /** + * Prefer `String#replaceAll()` over regex searches with the global flag. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md + */ + "eslint-plugin-unicorn/prefer-string-replace-all"?: { + [k: string]: unknown; + }; + /** + * Prefer `String#slice()` over `String#substr()` and `String#substring()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md + */ + "eslint-plugin-unicorn/prefer-string-slice"?: { + [k: string]: unknown; + }; + /** + * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md + */ + "eslint-plugin-unicorn/prefer-string-starts-ends-with"?: { + [k: string]: unknown; + }; + /** + * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md + */ + "eslint-plugin-unicorn/prefer-string-trim-start-end"?: { + [k: string]: unknown; + }; + /** + * Prefer using `structuredClone` to create a deep clone. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md + */ + "eslint-plugin-unicorn/prefer-structured-clone"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + functions?: unknown[]; + [k: string]: unknown; + }, + ]; + /** + * Prefer `switch` over multiple `else-if`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md + */ + "eslint-plugin-unicorn/prefer-switch"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + minimumCases?: number; + emptyDefaultCase?: + | "no-default-comment" + | "do-nothing-comment" + | "no-default-case"; + [k: string]: unknown; + }, + ]; + /** + * Prefer ternary expressions over simple `if-else` statements. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md + */ + "eslint-plugin-unicorn/prefer-ternary"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Prefer top-level await over top-level promises and async function calls. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md + */ + "eslint-plugin-unicorn/prefer-top-level-await"?: { + [k: string]: unknown; + }; + /** + * Enforce throwing `TypeError` in type checking conditions. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md + */ + "eslint-plugin-unicorn/prefer-type-error"?: { + [k: string]: unknown; + }; + /** + * Prevent abbreviations. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md + */ + "eslint-plugin-unicorn/prevent-abbreviations"?: { + [k: string]: unknown; + }; + /** + * Enforce consistent relative URL style. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md + */ + "eslint-plugin-unicorn/relative-url-style"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Enforce using the separator argument with `Array#join()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md + */ + "eslint-plugin-unicorn/require-array-join-separator"?: { + [k: string]: unknown; + }; + /** + * Enforce using the digits argument with `Number#toFixed()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md + */ + "eslint-plugin-unicorn/require-number-to-fixed-digits-argument"?: { + [k: string]: unknown; + }; + /** + * Enforce using the `targetOrigin` argument with `window.postMessage()`. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md + */ + "eslint-plugin-unicorn/require-post-message-target-origin"?: { + [k: string]: unknown; + }; + /** + * Enforce better string content. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md + */ + "eslint-plugin-unicorn/string-content"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + patterns?: { + [k: string]: + | string + | { + suggest: string; + fix?: boolean; + message?: string; + }; + }; + [k: string]: unknown; + }, + ]; + /** + * Enforce consistent brace style for `case` clauses. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md + */ + "eslint-plugin-unicorn/switch-case-braces"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + [k: string]: unknown; + }, + ]; + /** + * Fix whitespace-insensitive template indentation. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md + */ + "eslint-plugin-unicorn/template-indent"?: + | number + | ("off" | "warn" | "error") + | [ + number | ("off" | "warn" | "error"), + { + indent?: string | number; + tags?: string[]; + functions?: string[]; + selectors?: string[]; + comments?: string[]; + [k: string]: unknown; + }, + ]; + /** + * Enforce consistent case for text encoding identifiers. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md + */ + "eslint-plugin-unicorn/text-encoding-identifier-case"?: { + [k: string]: unknown; + }; + /** + * Require `new` when creating an error. + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md + */ + "eslint-plugin-unicorn/throw-new-error"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index + */ + "eslint-plugin-unicorn/import-index"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof + */ + "eslint-plugin-unicorn/no-array-instanceof"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator + */ + "eslint-plugin-unicorn/no-fn-reference-in-iterator"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce + */ + "eslint-plugin-unicorn/no-reduce"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex + */ + "eslint-plugin-unicorn/no-unsafe-regex"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset + */ + "eslint-plugin-unicorn/prefer-dataset"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key + */ + "eslint-plugin-unicorn/prefer-event-key"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator + */ + "eslint-plugin-unicorn/prefer-exponentiation-operator"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map + */ + "eslint-plugin-unicorn/prefer-flat-map"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append + */ + "eslint-plugin-unicorn/prefer-node-append"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove + */ + "eslint-plugin-unicorn/prefer-node-remove"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own + */ + "eslint-plugin-unicorn/prefer-object-has-own"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all + */ + "eslint-plugin-unicorn/prefer-replace-all"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with + */ + "eslint-plugin-unicorn/prefer-starts-ends-with"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content + */ + "eslint-plugin-unicorn/prefer-text-content"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end + */ + "eslint-plugin-unicorn/prefer-trim-start-end"?: { + [k: string]: unknown; + }; + /** + * https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand + */ + "eslint-plugin-unicorn/regex-shorthand"?: { + [k: string]: unknown; + }; + /** + * Enforce linebreaks after opening and before closing array brackets in `