import { IConstructorService } from "./i-constructor-service"; import { ConstructorDeclaration, SyntaxKind } from "typescript"; import { IFormatter } from "../../formatter/i-formatter-getter"; import { IJoiner } from "../../joiner/i-joiner-getter"; import { IUpdater } from "../../updater/i-updater-getter"; import { NodeService } from "../node/node-service"; import { ITypescriptASTUtil } from "@wessberg/typescript-ast-util"; import { IRemover } from "../../remover/i-remover-base"; import { IDecoratorService } from "../decorator/i-decorator-service"; import { IParameterService } from "../parameter/i-parameter-service"; import { ITypescriptLanguageService } from "@wessberg/typescript-language-service"; import { IParameterCtor } from "../../light-ast/ctor/parameter/i-parameter-ctor"; import { IPlacement } from "../../placement/i-placement"; /** * A class that helps with working with ConstructorDeclarations */ export declare class ConstructorService extends NodeService implements IConstructorService { private readonly formatter; private readonly parameterService; /** * The allowed SyntaxKinds when parsing a SourceFile for relevant Expressions * @type {Iterable} */ protected readonly ALLOWED_KINDS: Iterable; constructor(formatter: IFormatter, parameterService: IParameterService, updater: IUpdater, joiner: IJoiner, astUtil: ITypescriptASTUtil, remover: IRemover, languageService: ITypescriptLanguageService, decoratorService: IDecoratorService); /** * Gets the names of the types of all parameters, respecting original index positions * @param {ConstructorDeclaration} constructor * @returns {string[]} */ getParameterTypeNames(constructor: ConstructorDeclaration): (string | undefined)[]; /** * Gets the names of the types of all parameters, respecting original index positions. * If a parameter has an initializer, it forces the type to 'undefined. * @param {ConstructorDeclaration} constructor * @returns {string[]} */ getNonInitializedTypeNames(constructor: ConstructorDeclaration): (string | undefined)[]; /** * Appends some instructions to a ConstructorDeclaration * @param {string} instructions * @param {ConstructorDeclaration} constructor * @returns {ConstructorDeclaration} */ appendInstructions(instructions: string, constructor: ConstructorDeclaration): ConstructorDeclaration; /** * Prepends some instructions to a ConstructorDeclaration. If it contains a 'super()' call, it will place * the instructions immediately after that one. * @param {string} instructions * @param {ConstructorDeclaration} constructor * @returns {ConstructorDeclaration} */ prependInstructions(instructions: string, constructor: ConstructorDeclaration): ConstructorDeclaration; /** * Adds a Parameter to the provided ConstructorDeclaration * @param {IParameterCtor} parameter * @param {ConstructorDeclaration} constructor * @param {IPlacement} [placement] * @returns {ConstructorDeclaration} */ addParameter(parameter: IParameterCtor, constructor: ConstructorDeclaration, placement?: IPlacement): ConstructorDeclaration; }