import { DecoratorExpression, IDecoratorService } from "./i-decorator-service"; import { Decorator, Node } from "typescript"; import { IFormatter } from "../../formatter/i-formatter-getter"; import { IPrinter } from "@wessberg/typescript-ast-util"; import { IDecoratorCtor } from "../../light-ast/ctor/decorator/i-decorator-ctor"; /** * A service for working with Decorators */ export declare class DecoratorService implements IDecoratorService { private readonly formatter; private readonly printer; constructor(formatter: IFormatter, printer: IPrinter); /** * Creates a decorator from the provided options * @param {IDecoratorCtor} decorator * @returns {Decorator} */ createDecorator(decorator: IDecoratorCtor): Decorator; /** * Returns true if the provided Node is decorated with an expression that matches the provided one * @param {DecoratorExpression} expression * @param {Node} node * @returns {boolean} */ hasDecoratorWithExpression(expression: DecoratorExpression, node: Node): boolean; /** * Returns the decorator that matches the provided expression on the provided Node * @param {DecoratorExpression} expression * @param {Node} node * @returns {Decorator?} */ getDecoratorWithExpression(expression: DecoratorExpression, node: Node): Decorator | undefined; /** * Returns all the decorators that matches the provided expression on the provided Node * @param {DecoratorExpression} expression * @param {Node} node * @returns {Decorator[]} */ getDecoratorsWithExpression(expression: DecoratorExpression, node: Node): Decorator[]; /** * Takes the stringified expression of the provided decorator * @param {Node} node * @returns {string} */ takeDecoratorExpression(node: Decorator): string; /** * Takes the name of the provided decorator * @param {Node} node * @returns {string} */ takeDecoratorName(node: Decorator): string; }