MCPcopy Create free account
hub / github.com/SincereCSL/Playgrounds / Dog3

Class Dog3

TypeScript/StudyTypeScript/src/class_01.ts:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43// private 只能类本身调用,不能被类的实例调用,也不能被类的子类调用
44class Dog3 {
45 constructor(name: string) {
46 this.name = name
47 }
48 public name: string
49 run() {}
50 private pri(){}
51}
52let dog3 = new Dog3('test')
53// dog3.pri() // 不能被类的实例调用
54

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected