Files
NapCatQQ/.pnpm-store/v3/files/42/8ef7b483bbb863239cb3143d249965daf790d6226d5ae48747c7df288e4f4331abdb5f20ce991477a58ea1c8093120b8cb6a4e3f267fdee2411f5021ab731b
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

40 lines
1.3 KiB
Plaintext

import type { TSESTree } from '@typescript-eslint/utils';
import { SyntaxKind } from 'typescript';
import type { ValueOf } from './types';
export declare enum OperatorPrecedence {
Comma = 0,
Spread = 1,
Yield = 2,
Assignment = 3,
Conditional = 4,
Coalesce = 4,// NOTE: This is wrong
LogicalOR = 5,
LogicalAND = 6,
BitwiseOR = 7,
BitwiseXOR = 8,
BitwiseAND = 9,
Equality = 10,
Relational = 11,
Shift = 12,
Additive = 13,
Multiplicative = 14,
Exponentiation = 15,
Unary = 16,
Update = 17,
LeftHandSide = 18,
Member = 19,
Primary = 20,
Highest = 20,
Lowest = 0,
Invalid = -1
}
/**
* Note that this does not take into account parenthesization. You should check
* for parenthesization separately if it's relevant to your usage.
*/
export declare function getOperatorPrecedenceForNode(node: TSESTree.Node): OperatorPrecedence;
type TSESTreeOperatorKind = ValueOf<TSESTree.BinaryOperatorToText> | ValueOf<TSESTree.PunctuatorTokenToText>;
export declare function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind, hasArguments?: boolean): OperatorPrecedence;
export declare function getBinaryOperatorPrecedence(kind: SyntaxKind | TSESTreeOperatorKind): OperatorPrecedence;
export {};