Skip to main content

PublicHookActionReference

type

Rejects an already prefixed command id where an author is meant to write the plain one. Resolves to `never` for `command:foo`, which turns the mistake into a compile error at the call site instead of a silent `command:command:foo`.

type PublicHookActionReference<TAction extends string> = TAction extends `command:${string}` ? never : TAction

Import

import { PublicHookActionReference } from '@modular/sdk/view';

Notes

category
Context