import { NodeService } from "../node/node-service"; import { ParameterDeclaration, SyntaxKind } from "typescript"; import { IParameterService } from "./i-parameter-service"; import { IPrinter, ITypescriptASTUtil } from "@wessberg/typescript-ast-util"; import { IRemover } from "../../remover/i-remover-base"; import { IDecoratorService } from "../decorator/i-decorator-service"; import { ITypescriptLanguageService } from "@wessberg/typescript-language-service"; import { ITypeNodeService } from "../type-node/i-type-node-service"; import { IBindingNameService } from "../binding-name/i-binding-name-service"; import { IJoiner } from "../../joiner/i-joiner-getter"; import { IUpdater } from "../../updater/i-updater-getter"; /** * A service for working with ParameterDeclarations */ export declare class ParameterService extends NodeService implements IParameterService { private readonly printer; private readonly typeNodeService; private readonly bindingNameService; /** * The allowed SyntaxKinds when parsing a SourceFile for relevant Expressions * @type {Iterable} */ protected readonly ALLOWED_KINDS: Iterable; constructor(printer: IPrinter, typeNodeService: ITypeNodeService, bindingNameService: IBindingNameService, joiner: IJoiner, updater: IUpdater, astUtil: ITypescriptASTUtil, remover: IRemover, languageService: ITypescriptLanguageService, decoratorService: IDecoratorService); /** * Returns true if the ParameterDeclaration has a questionToken * @param {ParameterDeclaration} parameter * @returns {boolean} */ isReadonly(parameter: ParameterDeclaration): boolean; /** * Returns true if the parameter is optional * @param {ParameterDeclaration} parameter * @returns {boolean} */ isOptional(parameter: ParameterDeclaration): boolean; /** * Returns the stringified name of the parameter * @param {ParameterDeclaration} parameter * @returns {string} */ getName(parameter: ParameterDeclaration): string; /** * Returns true if the parameter has an initializer * @param {ParameterDeclaration} parameter * @returns {boolean} */ hasInitializer(parameter: ParameterDeclaration): boolean; /** * Returns true if the parameter is a rest argument (like ...args) * @param {ParameterDeclaration} parameter * @returns {boolean} */ isRestSpread(parameter: ParameterDeclaration): boolean; /** * Gets the type of the ParameterDeclaration * @param {ParameterDeclaration} parameter * @returns {string} */ getTypeName(parameter: ParameterDeclaration): string | undefined; /** * Gets the initializer expression of the ParameterDeclaration * @param {ParameterDeclaration} parameter * @returns {string} */ getInitializer(parameter: ParameterDeclaration): string | undefined; }