摘要: 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(19) 评论(0) 推荐(0)
摘要: export default {} // interface IPerson { // name: string; // age: number; // } // let p: IPerson = { // name: "于文文", // age: 18 // } // interface IPer 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(29) 评论(0) 推荐(0)
摘要: export default {} // 不使用泛型 // let getArray = (value: number, items: number): number[] => { // return new Array(items).fill(value); // } // // let arr 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(29) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(33) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: export default {} // 演示可能会出现的问题 // function getLength<T>(arr: T): T { // console.log(arr.length); // return arr; // } // getLength<string>("孟子义"); // 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(19) 评论(0) 推荐(0)
摘要: export default {} interface IPersonInfo { name: string; age: number; sex?: string; show(): void; } interface IMusic { music: string } class Person imp 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(34) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(121) 评论(0) 推荐(0)
摘要: export default {} abstract class Person { abstract name: string; abstract show(): string; showName() { console.log(this.show()); } } class Student ext 阅读全文
posted @ 2022-09-30 20:41 前端导师歌谣 阅读(12) 评论(0) 推荐(0)