-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Node Typings Dependency * Tag Type Enum Flattening Tried to write an object to a buffer with `writeUncompressed()`, but it wasn't being allowed as a valid object, because the types of the tag key types are typed as enum members, rather than plain strings. This allows you to use both, you can either pass in the enum to the built object, or a plain object with string keys itself can now be valid as well. https://stackoverflow.com/questions/67863114/is-there-a-way-to-have-a-switch-statement-for-an-object-with-cases-that-validate ```ts import * as P from "prismarine-nbt"; const nbt = { /*...*/ } satisfies P.NBT; console.log(nbt); P.writeUncompressed(nbt); // ^? This was erroring ``` * Add to Compiler/Interpreter Function Types I wanted to figure out what the shape of `compiler` and `interpreter` are, but they don't have type definitions for the source library, from the looks of it. * Standalone Tag Types
- Loading branch information
1 parent
945973c
commit 70323d8
Showing
2 changed files
with
59 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters