misode / brigadier-ts

TypeScript port of Mojang/brigadier
MIT License
18 stars 5 forks source link

Dynamic command exception types lack safety for the number of arguments #19

Open haykam821 opened 8 months ago

haykam821 commented 8 months ago

While dynamic command exception types already lack type safety (using Object/any as arguments instead of using type parameters), this library differs from Brigadier by not having multiple classes for the number of arguments needed. As a result, making a mistake in supplying the wrong number of arguments is easy, as there is no guarantee that the error will be caught by the TypeScript compiler.