Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SincereCSL/Playgrounds
/ pro
Method
pro
TypeScript/StudyTypeScript/src/class_01.ts:11–11 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
9
name: string
10
run() {}
11
protected pro() {}
//受保护成员,只能在类和子类中访问,不能在类的实例中访问
12
readonly legs: number = 4
13
static food: string =
'bones'
// 类的静态成员,只能通过类名调用,不能通过实例调用
14
}
Callers
1
constructor
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected