software-mansion / software-mansion/TypeGPU
impr: More descriptive errors when defining variable of unknown type
Open
@cieplypolar is already working on this.
Since Dec 18, 2025.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
Currently:
const getArr = tgpu['~unstable'].comptime(() => d.arrayOf(d.f32, 2)([1, 2]));
cosnt f = () => {
'use gpu';
const arr = getArr();
};
It will throw error "Tried to define variable 'arr' of unknown type".
The same will happen for d.struct.
We can throw more descriptive error with suggestion what to change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.