sandstone-mc / sandstone

Sandstone | Next Generation Framework for Minecraft
https://sandstone.dev/
MIT License
174 stars 15 forks source link

NBT.stringify does not accept arrays #132

Closed TheMrZZ closed 2 years ago

TheMrZZ commented 2 years ago

NBT.stringify is not typed to accept arrays, but it works at runtime.

/**
 * Argument of type 'string[]' is not assignable to parameter of type 'RootNBT'.
 * Index signature for type 'string' is missing in type 'string[]' 
 * ts(2345)
*/
NBT.stringify([ "hi" ])
GrantGryczan commented 2 years ago

Why would you want it to accept arrays?

Edit: Never mind, I forgot that you can put non-root NBT data in the data command.