Skip to content

✨ Improve API typing#3364

Draft
SnaveSutit wants to merge 18 commits intoJannisX11:nextfrom
SnaveSutit:fix/api
Draft

✨ Improve API typing#3364
SnaveSutit wants to merge 18 commits intoJannisX11:nextfrom
SnaveSutit:fix/api

Conversation

@SnaveSutit
Copy link
Contributor

@SnaveSutit SnaveSutit commented Mar 4, 2026

This PR requires #3367 to be merged first!

🚧 WIP

@netlify
Copy link

netlify bot commented Mar 4, 2026

Deploy Preview for blockbench-dev ready!

Name Link
🔨 Latest commit a6e2f14
🔍 Latest deploy log https://app.netlify.com/projects/blockbench-dev/deploys/69a9a8b7a92dfd0008ef3185
😎 Deploy Preview https://deploy-preview-3364--blockbench-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SnaveSutit SnaveSutit force-pushed the fix/api branch 3 times, most recently from b4ba48e to f8aded0 Compare March 5, 2026 02:05
@SnaveSutit SnaveSutit marked this pull request as draft March 5, 2026 02:06
@SnaveSutit
Copy link
Contributor Author

This has a little more work needed before it's ready. I will probably remove a few more classes from the global scope.

@SnaveSutit
Copy link
Contributor Author

SnaveSutit commented Mar 5, 2026

This PR requires #3367 to be merged first!

- Renamed `convert_types.js` -> `generate_types.js`.
- Converted `generate_types.js` to TypeScript.
- Added `--watch` argument to `generate-types`.
- Added support for Regex to the `excluded` list in `type_config.json`.
A list of files to keep, but not transform.
…ockbench`

This doesn't change any functionality, but it fixes all of the type merging issues we were having with the global `Blockbench` object without causing order of operation issues with the `global.ts` module.
Any modules that couldn't directly import `ModelProject` instead reference `Blockbench.ModelProject`.
Users making custom `format_pages` now get the correct typing 🎉
@SnaveSutit SnaveSutit changed the title 🐛 Fix API typing by using a static class instead of an Object for Blockbench ✨ Improve API typing Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant