Skip to content

Commit 87a41ba

Browse files
committed
refactor: remove TypeScript error suppression for canvas dimensions in multiple components
1 parent b57143f commit 87a41ba

File tree

7 files changed

+0
-14
lines changed

7 files changed

+0
-14
lines changed

src/components/CalicoSwirl/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ export default function CalicoSwirl({
6767
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
6868
});
6969

70-
// @ts-expect-error - canvas is a HTMLCanvasElement
7170
const width = context.canvas.width ?? 1;
72-
// @ts-expect-error - canvas is a HTMLCanvasElement
7371
const height = context.canvas.height ?? 1;
7472
const aspect = width / height;
7573

src/components/Campfire/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ export default function Campfire({
8787
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
8888
});
8989

90-
// @ts-expect-error - canvas is a HTMLCanvasElement
9190
const width = context.canvas.width ?? 1;
92-
// @ts-expect-error - canvas is a HTMLCanvasElement
9391
const height = context.canvas.height ?? 1;
9492
const aspect = width / height;
9593

src/components/Desert/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ export default function Desert({
9090
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
9191
});
9292

93-
// @ts-expect-error - canvas is a HTMLCanvasElement
9493
const width = context.canvas.width ?? 1;
95-
// @ts-expect-error - canvas is a HTMLCanvasElement
9694
const height = context.canvas.height ?? 1;
9795
const aspect = width / height;
9896

src/components/Iridescence/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ export default function Iridescence({
5959
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
6060
});
6161

62-
// @ts-expect-error - canvas is a HTMLCanvasElement
6362
const width = context.canvas.width ?? 1;
64-
// @ts-expect-error - canvas is a HTMLCanvasElement
6563
const height = context.canvas.height ?? 1;
6664
const aspect = width / height;
6765

src/components/LinearGradient/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ export default function LinearGradient({
7171
const startColorRGBA = colorToVec4(animatedStartColor.get());
7272
const endColorRGBA = colorToVec4(animatedEndColor.get());
7373

74-
// @ts-expect-error - canvas is a HTMLCanvasElement
7574
const width = context.canvas.width ?? 1;
76-
// @ts-expect-error - canvas is a HTMLCanvasElement
7775
const height = context.canvas.height ?? 1;
7876
const aspect = width / height;
7977

src/components/LiquidChrome/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ export default function LiquidChrome({
8989
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
9090
});
9191

92-
// @ts-expect-error - canvas is a HTMLCanvasElement
9392
const width = context.canvas.width ?? 1;
94-
// @ts-expect-error - canvas is a HTMLCanvasElement
9593
const height = context.canvas.height ?? 1;
9694
const aspect = width / height;
9795

src/components/Silk/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ export default function Silk({
8787
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
8888
});
8989

90-
// @ts-expect-error - canvas is a HTMLCanvasElement
9190
const width = context.canvas.width ?? 1;
92-
// @ts-expect-error - canvas is a HTMLCanvasElement
9391
const height = context.canvas.height ?? 1;
9492
const aspect = width / height;
9593

0 commit comments

Comments
 (0)