Variable idPropConst

idProp: ModelIdProp<string> & {
    typedAs<T>(): ModelIdProp<T>;
} = ...

A property that will be used as model id, accessible through $modelId. Can only be used in models and there can be only one per model.

Type declaration

  • typedAs:function
    • Same as idProp, except that it might have an specific TypeScript string template as type. E.g. typedIdProp<custom-${string}>()

      Type Parameters

      • T extends string

      Returns ModelIdProp<T>