Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions panorama/src/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ import {
routeAttribute,
} from './data.js'

/**
* $ is the part of Panorama's script API this library calls. Declaring it here
* keeps the library self-contained, so a consumer that compiles this file from
* a vendored copy needs no global declarations of its own.
*/
declare const $: {
Msg(...values: unknown[]): void
GetContextPanel(): {
GetAttributeString(name: string, fallback: string): string
}
RegisterForUnhandledEvent(
event: string,
handler: (...args: never[]) => boolean | void,
): number
}

/** Handler receives a value the mod sent, or undefined for none. */
export type Handler = (value: unknown) => void

Expand Down
Loading