emitAll() function
Emit every generated file for a contract.
Signature:
export declare function emitAll(input: EmitAllOptions): Promise<string[]>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
input |
Returns:
Promise<string[]>
The paths written.
Remarks
The three emitters and the barrel that ties them together, in one call, because writing them out separately is the same handful of lines in every consumer — and a consumer that forgets the barrel gets a build error rather than a hint.
Deliberately takes an outDir and no opinion about where a project keeps its contract or its generated code: those are the consumer's conventions, not this package's.
Example
await emitAll({
contract,
outDir: new URL('../src/generated/', import.meta.url),
imports: parseImportMap('zod=@my-org/runtime'),
});
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.