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

Class Monkey

TypeScript/StudyTypeScript/src/class_02.ts:28–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26/// 多态
27
28class Monkey extends Animal {
29 sleep() {
30 console.log('Monkey sleep')
31 }
32}
33let monkey = new Monkey()
34let animals: Animal[] = [cat,monkey]
35animals.forEach(item=>{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected