@evefrontier/dapp-kit - v0.0.1
    Preparing search index...

    Function assertAssemblyType

    • Type guard to check if an assembly is of a specific type.

      Use this to narrow the type of an assembly for type-safe property access.

      Parameters

      Returns assembly is AssemblyType<Assemblies>

      True if assembly matches the specified type

      const { assembly } = useSmartObject();

      if (assertAssemblyType(assembly, Assemblies.SmartStorageUnit)) {
      // TypeScript knows assembly is SmartStorageUnit here
      console.log(assembly.storage.mainInventory);
      }