Cadenza JS
    Preparing search index...

    Type Alias OpaqueString<T>

    OpaqueString: string & { __type: T }

    A specific string type that is not assignable from another string

    The idea is to have a specific type e.g. for the EmbeddingTargetId instead of a plain string. You don't need to actually add that __type property. In TS code, just use a type assertion (e.g. cadenzaClient.show('<embeddingTargetId>' as EmbeddingTargetId)).

    Type Parameters

    • T extends string