- Introduced a new script to check TypeScript lesson files for errors. - Created a main TypeScript file to render lessons and their details. - Added lesson definitions with starter and answer codes. - Implemented a user interface for navigating and running lessons. - Styled the application with CSS for a better user experience. - Updated README to reflect the new TypeScript section and usage instructions.
531 B
531 B
练习 7:类型安全渲染
目标
把接口、数组和函数类型组合起来,处理一组结构化数据。
你要练什么
interface- 数组类型
- 函数返回值类型
任务
- 定义课程接口
- 创建课程数组
- 写一个渲染函数,返回字符串数组