UNPKG

eslint-plugin-complete

Version:

An ESLint plugin that contains useful rules.

28 lines 1.38 kB
import ts from "typescript"; export declare function getTypeName(type: ts.Type): string | undefined; /** * @param symbol The symbol to check. * @param flagsToCheck The composition of one or more `ts.SymbolFlags`. */ export declare function isSymbolFlagSet(symbol: ts.Symbol, flagsToCheck: number | ts.SymbolFlags): boolean; /** * Checks if the given type is either an array/tuple type, or a union made up solely of array/tuple * types. * * Based on the `isTypeArrayTypeOrUnionOfArrayTypes` from `typescript-eslint`, but modified to also * match tuples. */ export declare function isTypeArrayTupleTypeOrUnionOfArrayTupleTypes(type: ts.Type, checker: ts.TypeChecker): boolean; export declare function isAny(type: ts.Type): boolean; /** Returns all types of a union type or an array containing `type` itself if it's no union type. */ export declare function unionTypeParts(type: ts.Type): readonly ts.Type[]; /** * Note that if the type is a union, this function will decompose it into the parts and get the * flags of every union constituent. * * @param type The type to check. * @param flagsToCheck The composition of one or more `ts.TypeFlags`. */ export declare function isTypeFlagSet(type: ts.Type, flagsToCheck: number | ts.TypeFlags): boolean; export declare function isFlagSet(flags: number, flag: number): boolean; //# sourceMappingURL=typeUtils.d.ts.map