define type for object field typescript code example
Example 1: typescript type object
type Dictionary = {
[key: string]: any
}
Example 2: typescript type of object values
const data = {
value: 123,
text: 'text'
};
type Data = typeof data;