Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/SincereCSL/Playgrounds
/ Human
Interface
Human
TypeScript/StudyTypeScript/src/class_interface.ts:2–7 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
/// 类与接口的关系
2
interface
Human {
3
//接口也不能约束类的构造函数
4
// new (name: string): void;
5
name: string;
6
eat(): void;
7
}
8
9
class
Asian implements Human{
10
constructor(name: string) {
Callers
2
class_02.ts
File · 0.65
getPet
Function · 0.65
Implementers
3
Asian
TypeScript/StudyTypeScript/src/class_i
DogA
TypeScript/StudyTypeScript/src/advance
CatA
TypeScript/StudyTypeScript/src/advance
Calls
no outgoing calls
Tested by
no test coverage detected