Files
NapCatQQ/.pnpm-store/v3/files/38/9ca65e9f45d25b23c5c642ee865fb6f60a8a662a8d3fe283c607f64c4c9885e12dde783fe006cd9fee62d811cfa80018613c903ac6339e1a5d93c584104104
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

57 lines
2.0 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 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;
isYoda: boolean;
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 {};