//@jsx: preserve declare module JSX { interface Element { } interface IntrinsicElements { [s: string]: any; } } declare var React: any; interface TodoProp { id: number; todo: string; } interface TodoListProps { todos: TodoProp[]; } function Todo(prop: { key: number, todo: string }) { return
{prop.key.toString() + prop.todo}
; } function TodoList({ todos }: TodoListProps) { return
{...todos.map(todo => )}
; } let x: TodoListProps;