Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,392 changes: 142 additions & 1,250 deletions types/chrome/test/index.ts

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions types/gorilla-engine/components/MappingEditor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ declare namespace GorillaEngine.UI {
}
interface MappingEditorProps extends Common, Bounds, Background, Clickable {
zones?: Zone[];
verticalZoom?: number;
horizontalZoom?: number;
refreshView(index?: number): void;
selectAllZones(): void;
deselectAllZones(): void;
Expand Down
2 changes: 1 addition & 1 deletion types/gorilla-engine/gorilla-engine-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ const label = new GorillaEngine.UI.Label({ margin: 5 });

const slider = new GorillaEngine.UI.Slider({ id: "slider", x: 0 });

const mappingEditor = new GorillaEngine.UI.MappingEditor({ id: "myNewMappingEditor", x: 0, y: 0 });
const mappingEditor = new GorillaEngine.UI.MappingEditor({ id: "myNewMappingEditor", x: 0, y: 2 });
5 changes: 5 additions & 0 deletions types/react-dom/canary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ import React = require("react");
import ReactDOM = require(".");

export {};

declare module "react" {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface CacheSignal extends AbortSignal {}
}
13 changes: 13 additions & 0 deletions types/react-dom/test/canary-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@
import React = require("react");
import ReactDOM = require("react-dom");
import ReactDOMClient = require("react-dom/client");

function cacheSignalTest() {
const cacheSignal = React.cacheSignal;

const signal = cacheSignal();
if (signal !== null) {
// $ExpectType CacheSignal
signal;
if (signal.aborted) {
console.error(signal.reason);
}
}
}
3 changes: 3 additions & 0 deletions types/react/canary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };

declare module "." {
export function unstable_useCacheRefresh(): () => void;

export interface CacheSignal {}
export function cacheSignal(): null | CacheSignal;
}
12 changes: 12 additions & 0 deletions types/react/test/canary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ function useCacheTest() {
refresh(() => "refresh");
}
}

function cacheSignalTest() {
const cacheSignal = React.cacheSignal;

const signal = cacheSignal();
if (signal !== null) {
// $ExpectType CacheSignal
signal;
// @ts-expect-error -- implemented by renderer
signal.aborted;
}
}
3 changes: 3 additions & 0 deletions types/react/ts5.0/canary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };

declare module "." {
export function unstable_useCacheRefresh(): () => void;

export interface CacheSignal {}
export function cacheSignal(): null | CacheSignal;
}
12 changes: 12 additions & 0 deletions types/react/ts5.0/test/canary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ function useCacheTest() {
refresh(() => "refresh");
}
}

function cacheSignalTest() {
const cacheSignal = React.cacheSignal;

const signal = cacheSignal();
if (signal !== null) {
// $ExpectType CacheSignal
signal;
// @ts-expect-error -- implemented by renderer
signal.aborted;
}
}