// Generated by scripts/generate.mjs from bindings/api.mjs. Do not edit.

///|
#external
pub type TextureDictionary

///|
#module("@mizchi/three-mbt/loaders")
pub extern "js" fn TextureDictionary::TextureDictionary() -> TextureDictionary = "textureDictionary"

///|
pub extern "js" fn TextureDictionary::set(
  self : TextureDictionary,
  key : String,
  value : Texture,
) -> Unit =
  #| (self, key, value) => { Object.defineProperty(self, key, { value, enumerable: true, writable: true, configurable: true }); }

///|
extern "js" fn TextureDictionary::ffi_get(
  self : TextureDictionary,
  key : String,
) -> Nullable[Texture] =
  #| (self, key) => Object.hasOwn(self, key) ? self[key] : null

///|
pub fn TextureDictionary::get(
  self : TextureDictionary,
  key : String,
) -> Texture? {
  self.ffi_get(key).to_option()
}

///|
pub extern "js" fn TextureDictionary::keys(
  self : TextureDictionary,
) -> FixedArray[String] =
  #| (self) => Object.keys(self)

///|
pub extern "js" fn TextureDictionary::remove(
  self : TextureDictionary,
  key : String,
) -> Unit =
  #| (self, key) => { delete self[key]; }