npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@woc-addons/types

v1.12.0

Published

TypeScript definitions for the World of ClaudeCraft addon API

Downloads

774

Readme

@woc-addons/types

TypeScript definitions for the World of ClaudeCraft addon API: the woc global your addon is handed.

You do not need this to write an addon. Addons are plain JavaScript with no build step, and the loader neither reads nor cares about types. This package exists so your editor can tell you what woc.world.player is before the game does.

Install

npm install --save-dev @woc-addons/types

Then one line at the top of your addon:

/// <reference types="@woc-addons/types" />

That is the whole setup. woc is declared as a global, so nothing is imported and your file stays a plain script the loader can evaluate.

What you get

/// <reference types="@woc-addons/types" />

woc.net.onEvent('damage', (event) => {
  // event is the game's damage event
});

woc.world.on('cooldowns', (cooldowns) => {
  // cooldowns is a ReadonlyMap<string, number>, typed from the key
});

const player = woc.world.player; // Entity | null, null before world entry

One of these is worth knowing about before you go looking for it. net.onEvent('castStart') fires for a PLAYER cast, a pet's cast and the timed activities the game runs through the same machinery, and never for a mob: a mob's mechanic sets its cast state directly, so a boss mod built on that event receives silence and cannot tell it from a boss that never casts. world.casts and world.on('casts', ...) are what to read instead, and the declaration says so where autocomplete will show you.

The world types describe a repository this package does not depend on and cannot compile against, so they are a careful claim rather than a derivation. The loader checks them against the running game once per session and reports anything that has moved. What is declared is deliberately narrower than what the game carries: an entity has hundreds of mostly server-internal fields, and promising those would be promising state a client does not have. Anything left out is still reachable through world.raw, which is unknown because the game promises nothing about it.

Sound cues are generated from the deployed game's own pack, so woc.sound.play autocompletes the real names. The union stays open: a game release adds cues before these types catch up, and a published type should not be able to break a working addon.

Versioning

The major tracks the loader's apiVersion, which is the compatibility contract the loader actually enforces: an addon declaring "apiVersion": 1 runs on any loader that speaks API 1, and @woc-addons/[email protected] is what describes it. A breaking change to the addon API is an apiVersion bump and a major here, together.

Minors add surface. Patches fix a declaration that was wrong about the loader.

Links