software-mansion / software-mansion/TypeGPU

feat: Destructuring objects in 'use gpu' functions

Open
#2,318 0 comments 0 reactions 1 assignee View on GitHub

@vende11s is already working on this.

Since Aug 17, 2026.

enhancement good first human issue
Dominant language
TypeScript
Stars
3.2k
Forks
122
Avg merge
3d 5h
Merged PRs (30d)
34

Description

Currently we have to do this:

const padWLog2 = filterLayout.$.params.padWLog2;
const padWMask = filterLayout.$.params.padWMask;
const padHLog2 = filterLayout.$.params.padHLog2;
const padHMask = filterLayout.$.params.padHMask;

We want to be able to do this:

const { padWLog2, padWMask, padHLog2, padHMask } = filterLayout.$.params;

Which should generate:

let padWLog2 = &params.padWLog2;
let padWMask = &params.padWMask;
let padHLog2 = &params.padHLog2;
let padHMask = &params.padHMask;

let support

We want to be able to do this:

let { padWLog2, padWMask, padHLog2, padHMask } = filterLayout.$.params;

Which should verify that all spread properties are ephemeral, and generate:

var padWLog2 = params.padWLog2;
var padWMask = params.padWMask;
var padHLog2 = params.padHLog2;
var padHMask = params.padHMask;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.