astro-ghostcms/.pnpm-store/v3/files/72/1b5b44e31575231089b8cc22aa2...

11 lines
746 B
Plaintext

import type { RuleCreateFunction, RuleModule } from '../ts-eslint';
/**
* Uses type inference to fetch the TOptions type from the given RuleModule
*/
type InferOptionsTypeFromRule<T> = T extends RuleModule<infer _TMessageIds, infer TOptions> ? TOptions : T extends RuleCreateFunction<infer _TMessageIds, infer TOptions> ? TOptions : unknown;
/**
* Uses type inference to fetch the TMessageIds type from the given RuleModule
*/
type InferMessageIdsTypeFromRule<T> = T extends RuleModule<infer TMessageIds, infer _TOptions> ? TMessageIds : T extends RuleCreateFunction<infer TMessageIds, infer _TOptions> ? TMessageIds : unknown;
export { InferOptionsTypeFromRule, InferMessageIdsTypeFromRule };
//# sourceMappingURL=InferTypesFromRule.d.ts.map