Which of the following defines a recursive type for a nested object structure?
type NestedObject = {
value: string;
children?: NestedObject[];
};
A type with a string value and optional array of NestedObject children.
A type that prevents nested arrays.
A type that enforces all properties to be strings.
A mapped type for optional properties.
This question is part of this quiz :
Advanced Types in TypeScript Quiz