A trigger an edge carries in its metadata (a template binding), when it has one.
(meta: Record<string, unknown>)
| 397 | |
| 398 | /** A trigger an edge carries in its metadata (a template binding), when it has one. */ |
| 399 | function siteTriggerOf(meta: Record<string, unknown>): SiteTrigger | null { |
| 400 | const t = meta.trigger as Partial<SiteTrigger> | undefined; |
| 401 | if (!t || typeof t !== 'object' || t.kind !== 'prop' || typeof t.name !== 'string') return null; |
| 402 | return { kind: 'prop', name: t.name, of: typeof t.of === 'string' ? t.of : null }; |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * The string a Java / Kotlin return expression builds, when it starts with a |