• Assert a certain type for a literal. This can be used to correctly type parts of an object in TypeScript.

    {
    [ActionId.MyAction]: literal<CompanionActionDefinition>({
    name: 'My Action',
    // ...
    })
    }

    instead of this

    {
    [ActionId.MyAction]: {
    name: 'My Action',
    // ...
    }
    }

    Type Parameters

    • T

    Parameters

    Returns T