export type ResourceLocation = { namespace: string; path: string; }; export interface ResourcePack { readonly name: string; exists(location: ResourceLocation): Promise; readJson(location: ResourceLocation): Promise; readBinary(location: ResourceLocation): Promise; readText(location: ResourceLocation): Promise; list(prefix: ResourceLocation): Promise; } export interface ResourceManager { addPack(pack: ResourcePack): void; removePack(pack: ResourcePack): void; getPacks(): readonly ResourcePack[]; getResource(location: ResourceLocation): Promise; getResourceOrThrow(location: ResourceLocation): Promise; readText(location: ResourceLocation): Promise; readBinary(location: ResourceLocation): Promise; }