Talos docs

StringTable

Since 0.6
Plain text

Signature

export class StringTable implements Strings {
  readonly missing: string[] = []
  constructor(strings: Record<string, string> = {}, opts: StringTableOptions = {})
  has(key: string): boolean
  get(key: string, where?: string): string
  add(strings: Record<string, string>): this
  keys(): string[]
}

Import: import { StringTable } from "@argus/gameplay"

Members

MemberSignatureDescription
missingreadonly missing: string[] = []Every key that was asked for and not found, in the order they were first asked for.
constructorconstructor(strings: Record<string, string> = {}, opts: StringTableOptions = {})
hashas(key: string): boolean
getget(key: string, where?: string): stringThe string for key, or [[key]]. A missing key is reported once, however often it is asked for.
addadd(strings: Record<string, string>): thisAdd or overwrite entries (a localisation pass, a scene reload).
keyskeys(): string[]The keys the table defines.