MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / register

Method register

src/lib/FancyError.ts:80–82  ·  view source on GitHub ↗

* Register an error template by ID. * IDs follow the convention: type:identifier:error_id (snake_case) * Examples: * - action:jump:label_not_found * - component:language_selection_screen:metadata_not_found * - engine:translation:key_not_found

(id: string, template: ErrorTemplate)

Source from the content-addressed store, hash-verified

78 * - engine:translation:key_not_found
79 */
80 static register (id: string, template: ErrorTemplate): void {
81 FancyError.registry.set(id, template);
82 }
83
84 /**
85 * Interpolate placeholders in a string with context values.

Callers 3

registerErrorsFunction · 0.80
registerComponentMethod · 0.80
setupMethod · 0.80

Calls 1

setMethod · 0.65

Tested by

no test coverage detected