MCPcopy Create free account
hub / github.com/d1ll0n/stack-packer / buildImportStatement

Function buildImportStatement

src/code-gen/codegen-helpers.ts:109–119  ·  view source on GitHub ↗
(file: string, imports: string[])

Source from the content-addressed store, hash-verified

107};
108
109export function buildImportStatement(file: string, imports: string[]) {
110 if (imports.length == 0) return [`import "./${file}";`];
111 return [
112 'import {',
113 [
114 ...imports.slice(0, imports.length - 1).map(_import => `${_import},`),
115 imports[imports.length-1],
116 ],
117 `} from "./${file}";`
118 ]
119}
120
121export function buildNestedAssemblyOr(
122 fields: { positioned: ProcessedField["positioned"] }[]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected