@codama/renderers-js
Version:
JavaScript renderer compatible with the Solana Kit library
24 lines • 1.56 kB
TypeScript
import { Docs } from '@codama/nodes';
import { BaseFragment } from '@codama/renderers-core';
import { ImportMap } from './importMap';
import { RenderScope } from './options';
export type FragmentFeature = 'instruction:resolverScopeVariable';
export type Fragment = BaseFragment & Readonly<{
features: ReadonlySet<FragmentFeature>;
imports: ImportMap;
}>;
export declare function fragment(template: TemplateStringsArray, ...items: unknown[]): Fragment;
export declare function mergeFragments(fragments: (Fragment | undefined)[], mergeContent: (contents: string[]) => string): Readonly<{
content: string;
features: Set<"instruction:resolverScopeVariable">;
imports: ImportMap;
}>;
export declare function use(importInput: string, module: string): Fragment;
export declare function mergeFragmentImports(fragment: Fragment, importMaps: ImportMap[]): Fragment;
export declare function addFragmentImports(fragment: Fragment, module: string, importInputs: string[]): Fragment;
export declare function removeFragmentImports(fragment: Fragment, module: string, usedIdentifiers: string[]): Fragment;
export declare function addFragmentFeatures(fragment: Fragment, features: FragmentFeature[]): Fragment;
export declare function getExportAllFragment(module: string): Fragment;
export declare function getDocblockFragment(lines: Docs, withLineJump?: boolean): Fragment | undefined;
export declare function getPageFragment(page: Fragment, scope: Pick<RenderScope, 'dependencyMap' | 'useGranularImports'>): Fragment;
//# sourceMappingURL=fragment.d.ts.map