Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = /w3ts/

We suggest trying baseUrl =

W3TS

Create Warcraft III maps with TypeScript

function onAbilityCast() {
const caster = Unit.fromEvent();
const g = new Group();
g.enumUnitsInRange(caster.x, caster.y, 500);
const enemies = g.getUnits().filter((u) => u.isEnemy(caster.owner));
for (const unit of enemies) {
caster.damageTarget(unit, 50);
}
g.destroy();
}
function tsMain() {
const BUILD_DATE = compiletime(() => new Date().toUTCString());
print(`Build: ${BUILD_DATE}`);
const unit = new Unit(Players[0], FourCC("hfoo"), 0, 0, 270);
unit.name = "TypeScript";
new Timer().start(1.00, true, () => {
new Effect("Meteor.mdx", unit.x, unit.y).destroy();
});
}
addScriptHook(W3TS_HOOK.MAIN_AFTER, tsMain);

Warcraft III API

Access to all natives, functions, and globals as well as wrapper classes for most handle types. Extra functionality such as IO, data synchronization, host detection, and more is provided out of the box.

Powered by TypeScriptToLua

Get all of the benefits of Lua scripting with strong typing and a better development experience.