@scml/addon-mod-i18n-twee-list

TypeScript type definitions for I18n Twee List addon, for loading different twee file lists by language.

Installation

npm
yarn
pnpm
bun
deno
npm install -D @scml/addon-mod-i18n-twee-list

Quick Start

Add type reference

/// <reference types="@scml/addon-mod-i18n-twee-list" />

Use global instance

modI18nTweeList is mounted on window.

Import types on demand

import type { I18nTweeList, I18nTweeListParams } from '@scml/addon-mod-i18n-twee-list/I18nTweeList';

Global Types global

PropertyTypeDescription
modI18nTweeListI18nTweeListAddon instance
Main entry
Subpath import
/// <reference types="@scml/addon-mod-i18n-twee-list" />

Subpath Exports

SubpathDescription
.Main entry, augments Window/global
./I18nTweeListMain class, interfaces, utilities

API Reference

./I18nTweeList

I18nTweeList class

PropertyTypeDescription
infoModRecord[]Mod record list
registerMod()(addonName, mod, modZip) => Promise<void>Register mod
beforePatchModToGame()() => Promise<void>Before-patch hook
init()() => voidInitialize

I18nTweeListParams interface

PropertyTypeDescription
mainLanguagestringMain language
languageFileLanguageFileItem[]Language to twee file mapping

LanguageFileItem interface

PropertyTypeDescription
languagestringLanguage code
tweeFileListstring[]Twee file path list

ModLanguageState class

Property/MethodDescription
modNameMod name
languageCurrent language
fallbackLanguageFallback language
updateModTweeList()Update mod twee list

Type Definition Source

INFO
  • Upstream: Bundled with scml-types
  • Build: pnpm run download && pnpm run build