import { Int8, Int16, Int32, Float32 } from "./primitive.js"; export type Tag = ByteTag | BooleanTag | ShortTag | IntTag | LongTag | FloatTag | DoubleTag | ByteArrayTag | StringTag | ListTag | CompoundTag | IntArrayTag | LongArrayTag; export type RootTag = CompoundTag | ListTag; export type RootTagLike = CompoundTagLike | ListTagLike; export type ByteTag = Int8>; export type BooleanTag = FalseTag | TrueTag; export type FalseTag = false | ByteTag<0>; export type TrueTag = true | ByteTag<1>; export type ShortTag = Int16>; export type IntTag = Int32>; export type LongTag = T; export type FloatTag = Float32>; export type DoubleTag = NumberLike; export type ByteArrayTag = Int8Array | Uint8Array; export type StringTag = StringLike; export interface ListTag extends Array { [TAG_TYPE]?: TAG; } export type ListTagLike = any[]; export interface CompoundTag { [name: string]: Tag | undefined; } export type CompoundTagLike = object; export type IntArrayTag = Int32Array | Uint32Array; export type LongArrayTag = BigInt64Array | BigUint64Array; export type NumberLike = `${T}` extends `${infer N extends number}` ? N : never; export type StringLike = `${T}`; export declare enum TAG { END = 0, BYTE = 1, SHORT = 2, INT = 3, LONG = 4, FLOAT = 5, DOUBLE = 6, BYTE_ARRAY = 7, STRING = 8, LIST = 9, COMPOUND = 10, INT_ARRAY = 11, LONG_ARRAY = 12 } export declare const TAG_TYPE: unique symbol; export declare function isTag(value: unknown): value is T; export declare function isTagType(type: unknown): type is TAG; export declare function getTagType(value: Tag): TAG; export declare function getTagType(value: unknown): TAG | null;