@atomist/sdm-pack-spring
Version:
Atomist software delivery machine extension pack for Spring and Spring Boot applications
28 lines (27 loc) • 737 B
TypeScript
import { Project } from "@atomist/automation-client";
import { CodeTransform } from "@atomist/sdm";
export interface Import {
fqn: string;
/**
* Offset within the file of the whole import declaration
*/
offset: number;
}
/**
* Return the imports already in this project
* @param {Project} p
* @param {string} path
* @return {Promise<Import[]>}
*/
export declare function existingImports(p: Project, path: string): Promise<Import[]>;
/**
* Add the given import if necessary
* @return {CodeTransform}
*/
export declare function addImport(opts: {
sourceFilePath: string;
fqn: string;
}): CodeTransform;
export declare function removeUnusedImports(opts: {
sourceFilePath: string;
}): CodeTransform;