Files
SnowLuma/.pnpm-store/v11/files/e9/34ecb3ad49053e44e22fc22ea5604093ad8d06116761800b4f25701574bd0cd5a9b5a6bc0534b43d785afcb5c75481858c87b44ba51b3809ebb541ca32da0c
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

10 lines
634 B
Plaintext

import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
/**
* Uses type inference to fetch the Options type from the given RuleModule
*/
export type InferOptionsTypeFromRule<T> = T extends RuleModule<infer _MessageIds, infer Options> ? Options : T extends RuleCreateFunction<infer _MessageIds, infer Options> ? Options : unknown;
/**
* Uses type inference to fetch the MessageIds type from the given RuleModule
*/
export type InferMessageIdsTypeFromRule<T> = T extends RuleModule<infer MessageIds, infer _TOptions> ? MessageIds : T extends RuleCreateFunction<infer MessageIds, infer _TOptions> ? MessageIds : unknown;