MCPcopy
hub / github.com/CodebuffAI/codebuff / Greeting

Class Greeting

packages/code-map/__tests__/test-langs/test.ts:7–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6// Class implementation
7class Greeting implements Greeter {
8 private prefix: string
9
10 constructor(prefix: string) {
11 this.prefix = prefix
12 }
13
14 greet(name: string): string {
15 return `${this.prefix}, ${name}!`
16 }
17
18 // Static method
19 static printGreeting(greeter: Greeter, name: string): void {
20 console.log(greeter.greet(name))
21 }
22}
23
24// Function
25function createGreeter(prefix: string): Greeter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected