I'm attempting to create a custom data type using the code below, but it's not working:
type CustomDataType {
[key: string]: CustomDataType;
isValid: boolean;
errors?: string[];
}
My goal is to have a CustomDataType with an isValid property as a boolean, an errors property as an array of strings, and any additional properties that are also CustomDataTypes.
Does anyone know the correct syntax for achieving this?