import type { ParserServices } from "@typescript-eslint/parser"; import type { TSESLint } from "@typescript-eslint/utils"; import { TSESTree } from "@typescript-eslint/utils"; import ts from "typescript"; export declare const typedTokenHelpers: { /** * Checks whether a decorator is a class validator decorator * @param program The root program node * @param decorator The decorator node */ decoratorIsClassValidatorDecorator(program: null | TSESTree.Program, decorator: TSESTree.Decorator): boolean; /** * Checks if decorator is in imports of a node * @param imports * @param decorator */ decoratorIsImportedFromClassValidator(imports: Array, decorator: TSESTree.Decorator): boolean; /** * Checks if the decorator is the IsEnum decorator * @param decorator */ decoratorIsIsEnum(decorator: TSESTree.Decorator): boolean; /** Checks if the decorator is the IsObject decorator * @param decorator */ decoratorIsIsObject(decorator: TSESTree.Decorator): boolean; decoratorsThatCouldMeanTheDevIsValidatingAnArray: string[]; expressionNodeIsArrayType(node: TSESTree.Expression, parserService: ParserServices, checker: ts.TypeChecker): boolean; getConstrainedTypeAtLocation(checker: ts.TypeChecker, node: ts.Node): ts.Type; /** * Gets the name of a decorator * Returns null if no name is found * @param decorator */ getDecoratorName(decorator: TSESTree.Decorator): null | string; getDecoratorsNamed(n: TSESTree.ClassDeclaration | TSESTree.MethodDefinition | TSESTree.PropertyDefinition, decoratorNames: Array): Array; getNodeType(node: TSESTree.Node, parserService: ParserServices, checker: ts.TypeChecker): ts.Type; getPropertyValueEqualsExpected(firstArgument: TSESTree.ObjectExpression, propertyName: string, expectedValue: bigint | boolean | null | number | RegExp | string): boolean; /** * Gets the root program of a node * @param node */ getRootProgram(node: TSESTree.BaseNode): null | TSESTree.Program; /** * Gets all the decorators actually imported from class-validator lib or decorators that were included in the additionalCustomValidatorDecorators options * @param node PropertyDefinition node */ getValidationDecorators(node: TSESTree.PropertyDefinition, additionalCustomValidatorDecorators?: Array): Array; /** * Checks if an import is an import of the given decorator name * @param imp * @param decoratorName */ importIsDecorator(imp: TSESTree.ImportDeclaration, decoratorName: string): boolean; isEnumType(type: ts.Type): boolean; isOptionalPropertyValue(node: TSESTree.PropertyDefinition): boolean; isTypeArrayTypeOrUnionOfArrayTypes(node: TSESTree.Node, parserService: ParserServices, checker: ts.TypeChecker): boolean; nodeHasDecoratorsNamed(n: TSESTree.ClassDeclaration | TSESTree.MethodDefinition | TSESTree.PropertyDefinition, decoratorNames: Array): boolean; parseStringToAst(code: string, path: string, context: Readonly>>): TSESTree.Program; };