摘要: 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(38) 评论(0) 推荐(0)
摘要: { "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ // TS编译器在第一次编译之后会生成一个存储编译信息的文件,第二次编译会在第一次的基础上进行 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(76) 评论(0) 推荐(0)
摘要: /// <reference path="./namespaceTest2.ts" /> // const a: User.IName = { // uname: "万茜" // } // console.log(a); const a: User.UserInfo.IName = { uage: 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(38) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(22) 评论(0) 推荐(0)
摘要: npx create xxx 项目名 依赖按照 yarn start 进行项目运行 yarn start 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(37) 评论(0) 推荐(0)
摘要: useSearchParams 顾名思义,可以直接获取url中的query参数,而不需要引入外部库来解析路径中的query参数 import { useSearchParams} from 'react-router-dom'; // 比如 url是 /demo?name=1 function De 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(43) 评论(0) 推荐(0)
摘要: 在Typescript中,表示断言有两种方式。一种是扩号表示法: let someValue: any = "this is a string"; let strLength: number = (someValue).length; 另一种使用as关键字: let someValue: any = 阅读全文
posted @ 2022-10-07 18:45 前端导师歌谣 阅读(37) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(28) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(28) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-10-07 18:44 前端导师歌谣 阅读(21) 评论(0) 推荐(0)