Files
front-end-example/06-typescript/07-type-safe-renderer
charlie f3bdaa4e88 feat: add TypeScript lessons and learning panel
- 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.
2026-03-19 10:06:11 +08:00
..

练习 7类型安全渲染

目标

把接口、数组和函数类型组合起来,处理一组结构化数据。

你要练什么

  • interface
  • 数组类型
  • 函数返回值类型

任务

  • 定义课程接口
  • 创建课程数组
  • 写一个渲染函数,返回字符串数组

文件