摘要: class Song { constructor(public title: string, public duration: number) { } } class Playlist { constructor(public name: string, public songs: Song[]) 阅读全文
posted @ 2020-10-04 01:22 Zhentiw 阅读(128) 评论(0) 推荐(0)
摘要: class Foo { bar() {} } const bar = new Foo() console.log(bar instanceof Foo) // true console.log(Object.getPrototypeOf(bar) Foo.prototype) // true cla 阅读全文
posted @ 2020-10-04 01:16 Zhentiw 阅读(113) 评论(0) 推荐(0)