Skip to content

Commit

Permalink
Update to TypeScript 5.6, see phetsims/perennial#397
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 8, 2024
1 parent cc1252c commit 77598b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion js/display/Display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2029,11 +2029,12 @@ export default class Display {
replacedImages++;
hasReplacedImages = true;

( () => { // eslint-disable-line @typescript-eslint/no-loop-func
( () => {
// Closure variables need to be stored for each individual SVG image.
const refImage = new window.Image();
const svgImage = displaySVGImage;

// eslint-disable-next-line @typescript-eslint/no-loop-func
refImage.onload = () => {
// Get a Canvas
const refCanvas = document.createElement( 'canvas' );
Expand All @@ -2054,6 +2055,7 @@ export default class Display {

assert && assert( replacedImages >= 0 );
};
// eslint-disable-next-line @typescript-eslint/no-loop-func
refImage.onerror = () => {
// NOTE: not much we can do, leave this element alone.

Expand Down
4 changes: 1 addition & 3 deletions js/input/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ const domEventPropertiesSetInConstructor: SerializedPropertiesForDeserialization

type SerializedDOMEvent = {
constructorName: string; // used to get the constructor from the window object, see Input.deserializeDOMEvent
} & {
[key in SerializedPropertiesForDeserialization]?: unknown;
};
} & Partial<Record<SerializedPropertiesForDeserialization, unknown>>;

// A list of keys on events that need to be serialized into HTMLElements
const EVENT_KEY_VALUES_AS_ELEMENTS: SerializedPropertiesForDeserialization[] = [ 'target', 'relatedTarget' ];
Expand Down

0 comments on commit 77598b3

Please sign in to comment.