@scml/addon-modded-feats

TypeScript type definitions for Modded feats addon, for adding and merging modded feats data.

Installation

npm
yarn
pnpm
bun
deno
npm install -D @scml/addon-modded-feats

Quick Start

Add type reference

/// <reference types="@scml/addon-modded-feats" />

Use global instance

addonModdedFeatsAddon is mounted on window.

Import types on demand

import type { ModdedFeatsAddon } from '@scml/addon-modded-feats/ModdedFeatsAddon';
import type { ModdedClothesFeatsParams } from '@scml/addon-modded-feats/ModdedFeatsAddonParams';

Global Types global

PropertyTypeDescription
addonModdedFeatsAddonModdedFeatsAddonAddon instance, manages feats data
Main entry
Subpath import
/// <reference types="@scml/addon-modded-feats" />

Subpath Exports

SubpathDescription
.Main entry, augments Window/global
./ModdedFeatsAddonMain class and utility functions
./ModdedFeatsAddonParamsConfig params and type guards

API Reference

./ModdedFeatsAddon

ModdedFeatsAddon class

PropertyTypeDescription
featsDataMap<string, FeatsObject>Feats data by key
registerMod()(addonName, mod, modZip) => Promise<void>Register mod
exportDataZip()(zip: JSZip) => Promise<JSZip>Export data
init()() => voidInitialize

mergeFeatsObject() / appendFeatsObject() method

./ModdedFeatsAddonParams

ModdedClothesFeatsParams interface

PropertyTypeDescription
featsstring[]Feats file path list

checkParams() / checkFeatsItem() type guard

Type Definition Source

INFO