Files
memecoin-botV2/.pnpm-store/v10/files/fd/fef276682a7f9c6010cd99908d3d0a99dd3de070f6f000ef2d7e24fdc18b8020f443df27d1efc293741317a093bf5420026f0ff50f25ad8d2a18b4a783c11f

62 lines
2.1 KiB
Plaintext

import type { ParserServicesWithTypeInformation, TSESTree } from '@typescript-eslint/utils';
import type { SourceCode } from '@typescript-eslint/utils/ts-eslint';
import type { PreferOptionalChainOptions } from './PreferOptionalChainOptions';
export declare const enum Yoda {
Yes = 0,
No = 1,
Unknown = 2
}
export declare const enum OperandValidity {
Valid = "Valid",
Last = "Last",
Invalid = "Invalid"
}
export declare const enum NullishComparisonType {
/** `x != null`, `x != undefined` */
NotEqualNullOrUndefined = "NotEqualNullOrUndefined",
/** `x == null`, `x == undefined` */
EqualNullOrUndefined = "EqualNullOrUndefined",
/** `x !== null` */
NotStrictEqualNull = "NotStrictEqualNull",
/** `x === null` */
StrictEqualNull = "StrictEqualNull",
/** `x !== undefined`, `typeof x !== 'undefined'` */
NotStrictEqualUndefined = "NotStrictEqualUndefined",
/** `x === undefined`, `typeof x === 'undefined'` */
StrictEqualUndefined = "StrictEqualUndefined",
/** `!x` */
NotBoolean = "NotBoolean",
/** `x` */
Boolean = "Boolean"
}
export declare const enum ComparisonType {
NotEqual = "NotEqual",
Equal = "Equal",
NotStrictEqual = "NotStrictEqual",
StrictEqual = "StrictEqual"
}
export interface ValidOperand {
comparedName: TSESTree.Node;
comparisonType: NullishComparisonType;
isYoda: boolean;
node: TSESTree.Expression;
type: OperandValidity.Valid;
}
export interface LastChainOperand {
comparedName: TSESTree.Node;
comparisonType: ComparisonType;
comparisonValue: TSESTree.Node;
yoda: Yoda;
node: TSESTree.BinaryExpression;
type: OperandValidity.Last;
}
export interface InvalidOperand {
type: OperandValidity.Invalid;
}
type Operand = InvalidOperand | LastChainOperand | ValidOperand;
export declare function gatherLogicalOperands(node: TSESTree.LogicalExpression, parserServices: ParserServicesWithTypeInformation, sourceCode: Readonly<SourceCode>, options: PreferOptionalChainOptions): {
newlySeenLogicals: Set<TSESTree.LogicalExpression>;
operands: Operand[];
};
export {};