/** A candidate for inlining. */ export type Inlinable = (ctx: InlinableContext) => V; /** Inlining utilities. */ export interface InlinableContext { readonly enclosing: (fp: string, opts?: EnclosingOptions) => EnclosingPackage; readonly readTextFile: (fp: string) => string; readonly readJsonFile: (fp: string, opts?: ReadJsonFileOptions) => V; } /** * Returns the deepest root containing the first argument, if any. A root is * defined as a parent folder of one of the folders passed in as second argument * (defaulting to `defaultRootFolders`). */ export declare function enclosingRoot(args: { readonly path: string; readonly separator: string; readonly rootFolders?: ReadonlyArray; }): string | undefined; export interface EnclosingOptions { /** Defaults to `defaultRootFolders`. */ readonly rootFolders?: ReadonlyArray; /** Defaults to `defaultResourceFolder`. */ readonly resourceFolder?: string; } export declare const defaultRootFolders: ReadonlyArray; export declare const defaultResourceFolder = "resources"; export interface ReadJsonFileOptions { readonly fields?: ReadonlyArray; } export interface EnclosingPackage { metadataPath(): string; resourcePath(...comps: string[]): string; metadata(): { readonly name: string; readonly version?: string; }; }