TurboWarp / types

Type definitions for the Scratch VM and editor
https://turbowarp.github.io/types/
Apache License 2.0
8 stars 15 forks source link

SB3 Types #18

Open Tacodiva opened 1 year ago

Tacodiva commented 1 year ago

I'm not sure if these types belong in this or not, because while it's not technically a library, it is used by library in methods like this, but it would be helpful if this library contained types for the project.json object in SB3 files.

If you're happy to add these types, I just wrote some simple ones for my project here that shouldn't be difficult to copy and paste over to here. I will eventually be adding types for each opcode individually to get rid of the records in ProjectSB3BlockBase, but that could be a while.

GarboMuffin commented 1 year ago

I don't see any reason why they shouldn't be added

I do wonder if it is possible to convert Scratch's official schemas without too much pain: https://github.com/scratchfoundation/scratch-parser/tree/master/lib

CrossScarDev commented 2 months ago

When will this be added.

Tacodiva commented 2 months ago

Uhmm, I mean with some review from garbo the types I linked in the original issue should be good, they just don't have explicit types for every block. If we wanna wait a few weeks though I can probably provide types for all the vanilla blocks too.

CrossScarDev commented 2 months ago

Oh thank you. I'm working on a project where these would be very helpful.