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

Method constructor

TypeScript/StudyTypeScript/src/class_01.ts:3–5  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

1/// 类 :继承和成员修饰符
2class Dog {
3 constructor(name: string) {
4 this.name = name
5 }
6 // protected constructor(name: string) { //这个类不能被实例化,只能被继承
7 // this.name = name
8 // }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected