mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-09 13:24:38 -05:00
25 lines
No EOL
668 B
TypeScript
Executable file
25 lines
No EOL
668 B
TypeScript
Executable file
// This returns the flags passed into your Elm application
|
|
export const flags = async ({ env } : ElmLand.FlagsArgs) => {
|
|
return {}
|
|
}
|
|
|
|
// This function is called after your Elm app starts
|
|
export const onReady = ({ app, env } : ElmLand.OnReadyArgs) => {
|
|
console.log('Elm is ready', app)
|
|
}
|
|
|
|
|
|
// Type definitions for Elm Land
|
|
namespace ElmLand {
|
|
export type FlagsArgs = {
|
|
env: Record<string, string>
|
|
}
|
|
export type OnReadyArgs = {
|
|
env: Record<string, string>
|
|
app: { ports?: Record<string, Port> }
|
|
}
|
|
export type Port = {
|
|
send?: (data: unknown) => void
|
|
subscribe?: (callback: (data: unknown) => unknown) => void
|
|
}
|
|
} |