MCPcopy
hub / github.com/prisma/prisma / write

Method write

packages/ts-builders/src/Method.ts:36–55  ·  view source on GitHub ↗
(writer: Writer)

Source from the content-addressed store, hash-verified

34 }
35
36 write(writer: Writer): void {
37 if (this.docComment) {
38 writer.write(this.docComment)
39 }
40
41 writer.write(this.name)
42 if (this.genericParameters.length > 0) {
43 writer.write('<').writeJoined(', ', this.genericParameters).write('>')
44 }
45
46 writer.write('(')
47 if (this.parameters.length > 0) {
48 writer.writeJoined(', ', this.parameters)
49 }
50 writer.write(')')
51
52 if (this.name !== 'constructor') {
53 writer.write(': ').write(this.returnType)
54 }
55 }
56}
57
58export function method(name: string): Method {

Callers

nothing calls this directly

Calls 2

writeJoinedMethod · 0.80
writeMethod · 0.65

Tested by

no test coverage detected