This website requires JavaScript.
Explore
Help
Register
Sign In
rou
/
front-end-example
Watch
1
Star
0
Fork
0
You've already forked front-end-example
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
acb14455758bdd48f901c9d564e8741acc4b9913
front-end-example
/
06-typescript
/
07-type-safe-renderer
History
rou
d5ff59ac76
update
2026-03-23 16:33:09 +08:00
..
answer.ts
feat: add TypeScript lessons and learning panel
2026-03-19 10:06:11 +08:00
README.md
feat: add TypeScript lessons and learning panel
2026-03-19 10:06:11 +08:00
starter.ts
update
2026-03-23 16:33:09 +08:00
README.md
Unescape
Escape
练习 7
:
类型安全渲染
目标
把接口、数组和函数类型组合起来,处理一组结构化数据。
你要练什么
interface
数组类型
函数返回值类型
任务
定义课程接口
创建课程数组
写一个渲染函数,返回字符串数组
文件
starter.ts
answer.ts