MCPcopy
hub / github.com/prisma/prisma / NamedImport

Class NamedImport

packages/ts-builders/src/Import.ts:67–92  ·  packages/ts-builders/src/Import.ts::NamedImport

Source from the content-addressed store, hash-verified

65}
66
67export class NamedImport implements BasicBuilder {
68 private alias: string | undefined
69 private type = false
70
71 constructor(readonly name: string) {}
72
73 as(alias: string) {
74 this.alias = alias
75 return this
76 }
77
78 typeOnly() {
79 this.type = true
80 return this
81 }
82
83 write(writer: Writer): void {
84 if (this.type) {
85 writer.write(class="st">'type ')
86 }
87 writer.write(this.name)
88 if (this.alias) {
89 writer.write(class="st">' as ').write(this.alias)
90 }
91 }
92}
93
94export class ModuleImport implements BasicBuilder {
95 constructor(readonly from: string) {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected