Skip to content

refactor(web): load the wgsl module types from tsconfig - #67

Merged
PunGrumpy merged 1 commit into
mainfrom
refactor/web-wgsl-types
Oct 23, 2026
Merged

PunGrumpy merged 1 commit into
mainfrom
refactor/web-wgsl-types

Conversation

@PunGrumpy

Copy link
Copy Markdown
Owner

Background

apps/web/wgsl-env.d.ts held a single line, /// <reference types="@vgpu/wgsl/wgsl-types" />. That directive is written as a comment but changes behavior: it gives TypeScript the declare module "*.wgsl" types that the landing page's three shader imports need. The repository keeps no comments in code. The @vgpu/wgsl README documents a second setup, a compilerOptions.types entry in tsconfig.json.

Summary

  • Adds "types": ["@vgpu/wgsl/wgsl-types"] to apps/web/tsconfig.json.
  • Deletes apps/web/wgsl-env.d.ts.

Verification

  • bun run typecheck in apps/web (next typegen && tsc --noEmit) passes.
  • Control run: with neither the entry nor the file, typecheck fails with exactly three TS2307 errors, for ./bloom.wgsl, ./glow.wgsl, and ./scene.wgsl in components/landing/store/canvas.tsx. So the new entry is what supplies the types.
  • bun run build in apps/web passes. Next leaves tsconfig.json unchanged.
  • bun run check passes.

Setting types means only the listed packages load as globals. Typecheck passes with just this entry, because the app reaches React and Node types through imports and next-env.d.ts. If a global type package is needed later, add it to the list.

Checklist

  • Tests have been added or updated (no behavior change; typecheck and the control run are the check)
  • Documentation has been added or updated (nothing user-facing changes)
  • A changeset has been added for vecstore-sdk (site only)
  • I have reviewed this pull request myself

@PunGrumpy PunGrumpy added the refactor Changes structure or removes dead code without changing behavior label Oct 22, 2026
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vecstore-sdk Ready Ready Preview Oct 23, 2026 2:25am UTC

@changeset-bot

changeset-bot Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2ef8bab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92197a8c-62d7-451a-93db-6522c5cc12ce
📥 Commits

Reviewing files that changed from the base of the PR and between 54821b7 and 2ef8bab.

📒 Files selected for processing: 2
  • apps/web/tsconfig.json
  • apps/web/wgsl-env.d.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vecstore-sdk@67

commit: 2ef8bab

wgsl-env.d.ts held a single triple-slash directive, which is comment
syntax carrying real behavior: it gave TypeScript the module
declarations for the shader imports. @vgpu/wgsl documents a
compilerOptions.types entry as the equivalent setup, so list the
package types in tsconfig.json and delete the file.

Without the entry, typecheck fails with TS2307 on the three shader
imports in the landing store canvas, so the entry is what supplies the
types.
@PunGrumpy
PunGrumpy force-pushed the refactor/web-wgsl-types branch from 09895aa to 2ef8bab Compare October 23, 2026 02:24
@PunGrumpy
PunGrumpy merged commit d139a00 into main Oct 23, 2026
12 of 13 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2ef8babb Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Changes structure or removes dead code without changing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant