Skip to content

Commit 9f1e87e

Browse files
committed
docs: Update website types
1 parent e2fff91 commit 9f1e87e

File tree

7 files changed

+74
-15
lines changed

7 files changed

+74
-15
lines changed

website/src/components/Playground/editor-types/@data-client/core.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ interface INormalizeDelegate {
110110
/** Invalidates an entity, potentially triggering suspense */
111111
invalidate(schema: {
112112
key: string;
113-
indexes?: any;
114113
}, pk: string): void;
115114
/** Returns true when we're in a cycle, so we should not continue recursing */
116115
checkLoop(key: string, pk: string, input: object): boolean;

website/src/components/Playground/editor-types/@data-client/endpoint.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ interface INormalizeDelegate {
317317
/** Invalidates an entity, potentially triggering suspense */
318318
invalidate(schema: {
319319
key: string;
320-
indexes?: any;
321320
}, pk: string): void;
322321
/** Returns true when we're in a cycle, so we should not continue recursing */
323322
checkLoop(key: string, pk: string, input: object): boolean;
@@ -745,6 +744,10 @@ interface CollectionInterface<S extends PolymorphicInterface = any, Args extends
745744
* @see https://dataclient.io/rest/api/Collection#unshift
746745
*/
747746
unshift: CollectionArrayAdder<S>;
747+
/** Schema to remove (by value) from a Collection
748+
* @see https://dataclient.io/rest/api/Collection#remove
749+
*/
750+
remove: CollectionArrayAdder<S>;
748751
/** Schema to merge with a Values Collection
749752
* @see https://dataclient.io/rest/api/Collection#assign
750753
*/
@@ -958,7 +961,7 @@ interface UnionConstructor {
958961
schemaAttribute: SchemaAttribute,
959962
): UnionInstance<
960963
Choices,
961-
UnionSchemaToArgs<Choices, SchemaAttribute> &
964+
Partial<UnionSchemaToArgs<Choices, SchemaAttribute>> &
962965
Partial<AbstractInstanceType<Choices[keyof Choices]>>
963966
>;
964967

website/src/components/Playground/editor-types/@data-client/graphql.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ interface INormalizeDelegate {
317317
/** Invalidates an entity, potentially triggering suspense */
318318
invalidate(schema: {
319319
key: string;
320-
indexes?: any;
321320
}, pk: string): void;
322321
/** Returns true when we're in a cycle, so we should not continue recursing */
323322
checkLoop(key: string, pk: string, input: object): boolean;
@@ -745,6 +744,10 @@ interface CollectionInterface<S extends PolymorphicInterface = any, Args extends
745744
* @see https://dataclient.io/rest/api/Collection#unshift
746745
*/
747746
unshift: CollectionArrayAdder<S>;
747+
/** Schema to remove (by value) from a Collection
748+
* @see https://dataclient.io/rest/api/Collection#remove
749+
*/
750+
remove: CollectionArrayAdder<S>;
748751
/** Schema to merge with a Values Collection
749752
* @see https://dataclient.io/rest/api/Collection#assign
750753
*/
@@ -958,7 +961,7 @@ interface UnionConstructor {
958961
schemaAttribute: SchemaAttribute,
959962
): UnionInstance<
960963
Choices,
961-
UnionSchemaToArgs<Choices, SchemaAttribute> &
964+
Partial<UnionSchemaToArgs<Choices, SchemaAttribute>> &
962965
Partial<AbstractInstanceType<Choices[keyof Choices]>>
963966
>;
964967

website/src/components/Playground/editor-types/@data-client/normalizr.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ interface INormalizeDelegate {
123123
/** Invalidates an entity, potentially triggering suspense */
124124
invalidate(schema: {
125125
key: string;
126-
indexes?: any;
127126
}, pk: string): void;
128127
/** Returns true when we're in a cycle, so we should not continue recursing */
129128
checkLoop(key: string, pk: string, input: object): boolean;

website/src/components/Playground/editor-types/@data-client/rest.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ interface INormalizeDelegate {
319319
/** Invalidates an entity, potentially triggering suspense */
320320
invalidate(schema: {
321321
key: string;
322-
indexes?: any;
323322
}, pk: string): void;
324323
/** Returns true when we're in a cycle, so we should not continue recursing */
325324
checkLoop(key: string, pk: string, input: object): boolean;
@@ -743,6 +742,10 @@ interface CollectionInterface<S extends PolymorphicInterface = any, Args extends
743742
* @see https://dataclient.io/rest/api/Collection#unshift
744743
*/
745744
unshift: CollectionArrayAdder<S>;
745+
/** Schema to remove (by value) from a Collection
746+
* @see https://dataclient.io/rest/api/Collection#remove
747+
*/
748+
remove: CollectionArrayAdder<S>;
746749
/** Schema to merge with a Values Collection
747750
* @see https://dataclient.io/rest/api/Collection#assign
748751
*/
@@ -956,7 +959,7 @@ interface UnionConstructor {
956959
schemaAttribute: SchemaAttribute,
957960
): UnionInstance<
958961
Choices,
959-
UnionSchemaToArgs<Choices, SchemaAttribute> &
962+
Partial<UnionSchemaToArgs<Choices, SchemaAttribute>> &
960963
Partial<AbstractInstanceType<Choices[keyof Choices]>>
961964
>;
962965

website/src/components/Playground/editor-types/globals.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ interface INormalizeDelegate {
323323
/** Invalidates an entity, potentially triggering suspense */
324324
invalidate(schema: {
325325
key: string;
326-
indexes?: any;
327326
}, pk: string): void;
328327
/** Returns true when we're in a cycle, so we should not continue recursing */
329328
checkLoop(key: string, pk: string, input: object): boolean;
@@ -747,6 +746,10 @@ interface CollectionInterface<S extends PolymorphicInterface = any, Args extends
747746
* @see https://dataclient.io/rest/api/Collection#unshift
748747
*/
749748
unshift: CollectionArrayAdder<S>;
749+
/** Schema to remove (by value) from a Collection
750+
* @see https://dataclient.io/rest/api/Collection#remove
751+
*/
752+
remove: CollectionArrayAdder<S>;
750753
/** Schema to merge with a Values Collection
751754
* @see https://dataclient.io/rest/api/Collection#assign
752755
*/
@@ -960,7 +963,7 @@ interface UnionConstructor {
960963
schemaAttribute: SchemaAttribute,
961964
): UnionInstance<
962965
Choices,
963-
UnionSchemaToArgs<Choices, SchemaAttribute> &
966+
Partial<UnionSchemaToArgs<Choices, SchemaAttribute>> &
964967
Partial<AbstractInstanceType<Choices[keyof Choices]>>
965968
>;
966969

website/src/components/Playground/editor-types/react.d.ts

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,13 +1774,17 @@ declare namespace React {
17741774
* @see {@link https://react.dev/reference/react/useEffect}
17751775
*/
17761776
function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1777+
/**
1778+
* @see {@link https://react.dev/reference/react/useEffectEvent `useEffectEvent()` documentation}
1779+
* @version 19.2.0
1780+
*/
1781+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
1782+
export function useEffectEvent<T extends Function>(callback: T): T;
17771783
// NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
17781784
/**
17791785
* `useImperativeHandle` customizes the instance value that is exposed to parent components when using
17801786
* `ref`. As always, imperative code using refs should be avoided in most cases.
17811787
*
1782-
* `useImperativeHandle` should be used with `React.forwardRef`.
1783-
*
17841788
* @version 16.8.0
17851789
* @see {@link https://react.dev/reference/react/useImperativeHandle}
17861790
*/
@@ -1940,10 +1944,39 @@ declare namespace React {
19401944
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
19411945
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
19421946

1947+
export interface CacheSignal {}
1948+
/**
1949+
* @version 19.2.0
1950+
*/
1951+
export function cacheSignal(): null | CacheSignal;
1952+
1953+
export interface ActivityProps {
1954+
/**
1955+
* @default "visible"
1956+
*/
1957+
mode?:
1958+
| "hidden"
1959+
| "visible"
1960+
| undefined;
1961+
/**
1962+
* A name for this Activity boundary for instrumentation purposes.
1963+
* The name will help identify this boundary in React DevTools.
1964+
*/
1965+
name?: string | undefined;
1966+
children: ReactNode;
1967+
}
1968+
1969+
/**
1970+
* @see {@link https://react.dev/reference/react/Activity `<Activity>` documentation}
1971+
* @version 19.2.0
1972+
*/
1973+
export const Activity: ExoticComponent<ActivityProps>;
1974+
19431975
/**
19441976
* Warning: Only available in development builds.
19451977
*
19461978
* @see {@link https://react.dev/reference/react/captureOwnerStack Reference docs}
1979+
* @version 19.1.0
19471980
*/
19481981
function captureOwnerStack(): string | null;
19491982

@@ -2749,7 +2782,7 @@ declare namespace React {
27492782
unselectable?: "on" | "off" | undefined;
27502783

27512784
// Popover API
2752-
popover?: "" | "auto" | "manual" | undefined;
2785+
popover?: "" | "auto" | "manual" | "hint" | undefined;
27532786
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
27542787
popoverTarget?: string | undefined;
27552788

@@ -3003,6 +3036,7 @@ declare namespace React {
30033036
}
30043037

30053038
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
3039+
closedby?: "any" | "closerequest" | "none" | undefined;
30063040
onCancel?: ReactEventHandler<T> | undefined;
30073041
onClose?: ReactEventHandler<T> | undefined;
30083042
open?: boolean | undefined;
@@ -3365,6 +3399,7 @@ declare namespace React {
33653399
charSet?: string | undefined;
33663400
crossOrigin?: CrossOrigin;
33673401
defer?: boolean | undefined;
3402+
fetchPriority?: "high" | "low" | "auto" | undefined;
33683403
integrity?: string | undefined;
33693404
noModule?: boolean | undefined;
33703405
referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
@@ -3572,7 +3607,21 @@ declare namespace React {
35723607
direction?: number | string | undefined;
35733608
display?: number | string | undefined;
35743609
divisor?: number | string | undefined;
3575-
dominantBaseline?: number | string | undefined;
3610+
dominantBaseline?:
3611+
| "auto"
3612+
| "use-script"
3613+
| "no-change"
3614+
| "reset-size"
3615+
| "ideographic"
3616+
| "alphabetic"
3617+
| "hanging"
3618+
| "mathematical"
3619+
| "central"
3620+
| "middle"
3621+
| "text-after-edge"
3622+
| "text-before-edge"
3623+
| "inherit"
3624+
| undefined;
35763625
dur?: number | string | undefined;
35773626
dx?: number | string | undefined;
35783627
dy?: number | string | undefined;
@@ -3719,7 +3768,7 @@ declare namespace React {
37193768
tableValues?: number | string | undefined;
37203769
targetX?: number | string | undefined;
37213770
targetY?: number | string | undefined;
3722-
textAnchor?: string | undefined;
3771+
textAnchor?: "start" | "middle" | "end" | "inherit" | undefined;
37233772
textDecoration?: number | string | undefined;
37243773
textLength?: number | string | undefined;
37253774
textRendering?: number | string | undefined;

0 commit comments

Comments
 (0)