MCPcopy
hub / github.com/prisma/prisma / NamespaceImport

Class NamespaceImport

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

Source from the content-addressed store, hash-verified

4export type Import = NamespaceImport | BindingsImport | ModuleImport
5
6export class NamespaceImport implements BasicBuilder {
7 private type = false
8
9 constructor(
10 readonly alias: string,
11 readonly from: string,
12 ) {}
13
14 typeOnly() {
15 this.type = true
16 return this
17 }
18
19 write(writer: Writer<undefined>): void {
20 writer.write('import ')
21 if (this.type) {
22 writer.write('type ')
23 }
24 writer.write('* as ').write(this.alias).write(` from "${this.from}"`)
25 }
26}
27
28export class BindingsImport implements BasicBuilder {
29 private defaultImport: string | undefined

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected