MCPcopy
hub / github.com/prisma/prisma / ModuleImport

Class ModuleImport

packages/ts-builders/src/Import.ts:94–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94export class ModuleImport implements BasicBuilder {
95 constructor(readonly from: string) {}
96
97 asNamespace(alias: string): NamespaceImport {
98 return new NamespaceImport(alias, this.from)
99 }
100
101 default(alias: string): BindingsImport {
102 return new BindingsImport(this.from).default(alias)
103 }
104
105 named(namedImport: string | NamedImport) {
106 return new BindingsImport(this.from).named(namedImport)
107 }
108
109 write(writer: Writer): void {
110 writer.write('import ').write(`"${this.from}"`)
111 }
112}
113
114export function moduleImport(from: string) {
115 return new ModuleImport(from)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected