@ibyar/cli
Version:
The Ibyar/Aurora CLI tool
99 lines • 4.04 kB
TypeScript
import ts from 'typescript/lib/tsserverlibrary.js';
import { DecoratorInfo, SignalMetadata, SignalInfo } from './modules.js';
import { SignalDetails } from './signals.js';
/**
* check if a decorator is a `@Component` decorator;
* @param decorator
* @param expressionName
* @returns
*/
export declare function isComponentDecorator(decorator: ts.Decorator, componentName?: string): boolean;
/**
* check if a decorator is a `@Directive` decorator;
* @param decorator
* @param directiveName
* @returns
*/
export declare function isDirectiveDecorator(decorator: ts.Decorator, directiveName?: string): boolean;
export declare function isComponentOrDirectiveDecorator(decorator: ts.Decorator, componentName?: string, directiveName?: string): boolean;
/**
* check if a decorator is a `@Pipe` decorator;
* @param decorator
* @param pipeName
* @returns
*/
export declare function isPipeDecorator(decorator: ts.Decorator, pipeName?: string): boolean;
/**
* check if a decorator is a `@Injectable` decorator;
* @param decorator
* @param injectableName
* @returns
*/
export declare function isInjectableDecorator(decorator: ts.Decorator, injectableName?: string): boolean;
/**
* check if Decorator is `@Input` or `@FormValue`
* @param decorator
* @returns
*/
export declare function isInputDecorator(decorator: ts.Decorator): boolean;
/**
* check if Decorator is `@Output`
* @param decorator
* @returns
*/
export declare function isOutputDecorator(decorator: ts.Decorator): boolean;
export declare function getMapByDecoratorForPropertyDeclaration(member: ts.PropertyDeclaration, checker: ts.TypeChecker, decoratorFilter: ((decorator: ts.Decorator) => boolean)): DecoratorInfo[];
export declare function getMapByDecoratorForSetAccessorDeclaration(member: ts.SetAccessorDeclaration, checker: ts.TypeChecker, decoratorFilter: ((decorator: ts.Decorator) => boolean)): DecoratorInfo[];
export declare function getMapByDecorator(classNode: ts.ClassDeclaration, checker: ts.TypeChecker, decoratorFilter: ((decorator: ts.Decorator) => boolean)): DecoratorInfo[];
/**
* get a component or directive inputs that is annotated by `@Input` or `@FormValue`.
* @param classNode
* @param checker
* @returns
*/
export declare function getInputs(classNode: ts.ClassDeclaration, checker: ts.TypeChecker): DecoratorInfo[];
/**
* get a component or directive input names that is annotated by `@Input` or `@FormValue`.
* @param classNode
* @param checker
* @returns
*/
export declare function getInputNames(classNode: ts.ClassDeclaration, checker: ts.TypeChecker): string[];
/**
* get a component or directive outputs that is annotated by `@Output`.
* @param classNode
* @param checker
* @returns
*/
export declare function getOutputs(classNode: ts.ClassDeclaration, checker: ts.TypeChecker): DecoratorInfo[];
/**
* get a component or directive output names that is annotated by `@Output`.
* @param classNode
* @param checker
* @returns
*/
export declare function getOutputNames(classNode: ts.ClassDeclaration, checker: ts.TypeChecker): string[];
/**
* get text value for a property in ObjectLiteralExpression
* @param option
* @param property
* @returns
*/
export declare function getTextValueFormLiteralProperty(option: ts.ObjectLiteralExpression, property: string): string | undefined;
/**
* get text value for a property in ObjectLiteralExpression
* @param option
* @param property
* @returns
*/
export declare function getTextValueFormArrayLiteralProperty(option: ts.ObjectLiteralExpression, property: string): string[];
export declare function scanAliasName(call: ts.CallExpression): string | void;
export declare function scanSignalCall(call: ts.CallExpression, signalKey: string, name: string): SignalInfo | false;
/**
* get component and directive signals that is evaluated with `input`, `output`, ... etc.
* @param classNode
* @param signals
* @returns
*/
export declare function scanSignals(classNode: ts.ClassDeclaration, signals: SignalDetails): SignalMetadata;
//# sourceMappingURL=helpers.d.ts.map