Wrong Typescript type specified in Data Bindings SDK
Background:
The class `ViewModelInstance` offers a getter for “properties” which is defined as returning `rc.ViewModelProperty[]`. The `ViewModelProperty` interface is declared with a `type` field of type `DataType`. The `DataType` is an UNexported enum (numeric).
Problem:
The actual runtime value for a property’s `type` field is not numeric, but rather a `string`. This string representation is in fact quite useful, but when writing a Typescript application the mismatch causes a headache when the runtime value does not conform to the declared interface.
Feature Request:
I would like to see a string literal type exported from the runtime SDK, such as:
// CHANGE #1, NEW EXPORT
export type ViewModelInstancePropertyType = ‘string’ | ‘number’ | ‘boolean’ | ‘list’ | ‘viewModel’ | ‘color’ | 'whatever_I_am_forgetting'
export declare type ViewModelProperty = {
name: string;
type: ViewModelInstancePropertyType; // CHANGE #2, FIX, was DataType.
}