Skip to content

registerAPI

Jason Godesky edited this page Jul 19, 2026 · 1 revision

registerAPI is a wrapper to make it a little bit easier to instantiate your module’s API.

Parameters

moduleId: string

Your module’s unique ID.

api: Record<string, Function>

A dictionary of the API methods you’d like to register.

Examples

import { registerAPI } from '@revolutionarygamesco/common-foundryvtt'
import { coolMethodA, coolMethodB, coolMethodC } from './my-cool-methods.ts'

registerAPI('my-module', { coolMethodA, coolMethodB, coolMethodC })

Clone this wiki locally