UNPKG

@autorest/go

Version:
53 lines 1.64 kB
import * as go from '../../../codemodel.go/src/index.js'; export declare class ImportManager { private readonly imports; private readonly pkg; /** * creates a new instance of ImportManager for the specified package * * @param pkg the package that contains the import statements to emit */ constructor(pkg: go.FakePackage | go.PackageContent | go.TestPackage); /** * adds a package for importing if not already in the list * accepts an optional package alias. * * @param imp the package name to import * @param alias optional alias for the import */ add(imp: string, alias?: string): void; /** * adds the specified package for importing if not already in the list. * * @param pkg the package to import * @param alias optional package alias */ addForPkg(pkg: go.PackageContent, alias?: string): void; /** * returns the number of packages in the list * * @returns the import count */ length(): number; /** * returns the import list as Go source code * * @returns the text for the import statement */ text(): string; /** * adds an import statement for the specified type * as required if not already in the list. * * @param type the type for which to add the import */ addForType(type: go.Client | go.Type): void; /** * returns the import alias or the empty string * * @param entry the entry to check for an alias * @returns the import alias or the empty string */ private alias; } //# sourceMappingURL=imports.d.ts.map