import { type ParsedSource, type Splice } from './source-file.js'; /** * Makes the classes a helper expression references (`Frequency`, * `RetryStrategyBuilder`, an assertion builder — all exports of * `checkly/constructs`) available in a construct file: under the local name * an existing import or `require` of a checkly package already binds them * to, or by adding them to the file's top-level * `import { … } from 'checkly/constructs'` (or * `const { … } = require('checkly/constructs')`). A name the file already * uses for something else is refused, and so is every name when the file * has no such declaration to extend: no statement is ever added, which * would mean guessing the file's module style. */ export interface ImportResolution { /** Names that cannot be made available, with the reason. */ refused: Map; /** Names the file binds nowhere yet, which `appendImports` can add. */ missing: string[]; } /** Which of `names` the file lacks, and which it cannot take. Independent of which of them end up written. */ export declare function resolveImports(source: ParsedSource, names: readonly string[]): ImportResolution; /** * The edit that adds `names` (each one `resolveImports` reported missing) to * the file's `checkly/constructs` declaration, after its last specifier: on * the same line when the list is one line, otherwise one per line at the * last specifier's indentation, after the line the last specifier (or its * comma, or a comment behind it) ends on, keeping the trailing comma when * the list has one. */ export declare function appendImports(source: ParsedSource, names: readonly string[]): Splice | undefined;