Skip to content

Commit 529047e

Browse files
authored
Merge pull request #307 from greggman/remove-any
remove `any` from samples
2 parents 20a26d2 + 19c5ebf commit 529047e

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/sample/animometer/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
283283
const renderPassDescriptor = {
284284
colorAttachments: [
285285
{
286-
view: undefined as any, // Assigned later
286+
view: undefined as GPUTextureView, // Assigned later
287287
clearValue: { r: 0.0, g: 0.0, b: 0.0, a: 1.0 },
288288
loadOp: 'clear' as const,
289289
storeOp: 'store' as const,

src/sample/bitonicSort/utils.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export const createBindGroupDescriptor = (
3838
): BindGroupsObjectsAndLayout => {
3939
const layoutEntries: GPUBindGroupLayoutEntry[] = [];
4040
for (let i = 0; i < bindings.length; i++) {
41-
const layoutEntry: any = {};
42-
layoutEntry.binding = bindings[i];
43-
layoutEntry.visibility = visibilities[i % visibilities.length];
44-
layoutEntry[resourceTypes[i]] = resourceLayouts[i];
45-
layoutEntries.push(layoutEntry);
41+
layoutEntries.push({
42+
binding: bindings[i],
43+
visibility: visibilities[i % visibilities.length],
44+
[resourceTypes[i]]: resourceLayouts[i],
45+
});
4646
}
4747

4848
const bindGroupLayout = device.createBindGroupLayout({
@@ -58,10 +58,10 @@ export const createBindGroupDescriptor = (
5858
for (let i = 0; i < resources.length; i++) {
5959
const groupEntries: GPUBindGroupEntry[] = [];
6060
for (let j = 0; j < resources[0].length; j++) {
61-
const groupEntry: any = {};
62-
groupEntry.binding = j;
63-
groupEntry.resource = resources[i][j];
64-
groupEntries.push(groupEntry);
61+
groupEntries.push({
62+
binding: j,
63+
resource: resources[i][j],
64+
});
6565
}
6666
const newBindGroup = device.createBindGroup({
6767
label: `${label}.bindGroup${i}`,

src/sample/computeBoids/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
8989
const renderPassDescriptor = {
9090
colorAttachments: [
9191
{
92-
view: undefined as any, // Assigned later
92+
view: undefined as GPUTextureView, // Assigned later
9393
clearValue: { r: 0.0, g: 0.0, b: 0.0, a: 1.0 },
9494
loadOp: 'clear' as const,
9595
storeOp: 'store' as const,

0 commit comments

Comments
 (0)