{
  "version": 3,
  "sources": ["../src/plugin.ts", "../package.json", "../src/_internal/rule-docs-metadata.ts", "../src/_internal/rule-docs-url.ts", "../src/_internal/typefest-config-references.ts", "../src/_internal/array-like-expression.ts", "../src/_internal/ast-node.ts", "../src/_internal/cycle-safe-linked-search.ts", "../src/_internal/constrained-type-at-location.ts", "../src/_internal/safe-type-operation.ts", "../src/_internal/type-checker-compat.ts", "../src/_internal/typed-path-telemetry.ts", "../src/_internal/set-membership.ts", "../src/_internal/imported-value-symbols.ts", "../src/_internal/import-analysis.ts", "../src/_internal/import-aware-fixes.ts", "../src/_internal/import-fix-coordinator.ts", "../src/_internal/plugin-settings.ts", "../src/_internal/import-insertion.ts", "../src/_internal/bounded-cache.ts", "../src/_internal/text-character.ts", "../src/_internal/scope-resolution.ts", "../src/_internal/scope-variable.ts", "../src/_internal/member-call.ts", "../src/_internal/module-source.ts", "../src/_internal/report-adapter.ts", "../src/_internal/rule-reporting.ts", "../src/_internal/array-method-call-rule.ts", "../src/_internal/typed-rule.ts", "../src/_internal/rule-catalog.ts", "../src/rules/prefer-ts-extras-array-at.ts", "../src/rules/prefer-ts-extras-array-concat.ts", "../src/rules/prefer-ts-extras-array-first.ts", "../src/_internal/value-rewrite-autofix-safety.ts", "../src/_internal/type-predicate-autofix-safety.ts", "../src/rules/prefer-ts-extras-array-includes.ts", "../src/rules/prefer-ts-extras-array-join.ts", "../src/rules/prefer-ts-extras-array-last.ts", "../src/_internal/normalize-expression-text.ts", "../src/rules/prefer-ts-extras-as-writable.ts", "../src/_internal/imported-type-aliases.ts", "../src/rules/prefer-ts-extras-assert-defined.ts", "../src/_internal/throw-consequent.ts", "../src/_internal/throw-type-error.ts", "../src/rules/prefer-ts-extras-assert-error.ts", "../src/rules/prefer-ts-extras-assert-never.ts", "../src/rules/prefer-ts-extras-assert-present.ts", "../src/_internal/filter-callback.ts", "../src/_internal/nullish-comparison.ts", "../src/rules/prefer-ts-extras-is-defined-filter.ts", "../src/rules/prefer-ts-extras-is-defined.ts", "../src/_internal/typescript-eslint-node-autofix.ts", "../src/rules/prefer-ts-extras-is-empty.ts", "../src/rules/prefer-ts-extras-is-equal-type.ts", "../src/_internal/global-identifier-member-call.ts", "../src/_internal/global-member-call-rule.ts", "../src/rules/prefer-ts-extras-is-finite.ts", "../src/rules/prefer-ts-extras-is-infinite.ts", "../src/rules/prefer-ts-extras-is-integer.ts", "../src/rules/prefer-ts-extras-is-present-filter.ts", "../src/rules/prefer-ts-extras-is-present.ts", "../src/rules/prefer-ts-extras-is-property-defined.ts", "../src/rules/prefer-ts-extras-is-property-present.ts", "../src/rules/prefer-ts-extras-is-safe-integer.ts", "../src/rules/prefer-ts-extras-key-in.ts", "../src/rules/prefer-ts-extras-not.ts", "../src/rules/prefer-ts-extras-object-entries.ts", "../src/rules/prefer-ts-extras-object-from-entries.ts", "../src/rules/prefer-ts-extras-object-has-in.ts", "../src/rules/prefer-ts-extras-object-has-own.ts", "../src/rules/prefer-ts-extras-object-keys.ts", "../src/rules/prefer-ts-extras-object-map-values.ts", "../src/rules/prefer-ts-extras-object-values.ts", "../src/rules/prefer-ts-extras-safe-cast-to.ts", "../src/rules/prefer-ts-extras-set-has.ts", "../src/_internal/typed-member-call-rule.ts", "../src/rules/prefer-ts-extras-string-split.ts", "../src/_internal/expression-boolean-memoizer.ts", "../src/rules/prefer-type-fest-absolute.ts", "../src/rules/prefer-type-fest-abstract-constructor.ts", "../src/rules/prefer-type-fest-and-all.ts", "../src/rules/prefer-type-fest-and.ts", "../src/_internal/boolean-pair-type-patterns.ts", "../src/rules/prefer-type-fest-array-element.ts", "../src/rules/prefer-type-fest-array-length.ts", "../src/rules/prefer-type-fest-array-values.ts", "../src/rules/prefer-type-fest-arrayable.ts", "../src/_internal/type-reference-node.ts", "../src/rules/prefer-type-fest-async-return-type.ts", "../src/rules/prefer-type-fest-asyncify.ts", "../src/_internal/function-type-reference-patterns.ts", "../src/rules/prefer-type-fest-conditional-except.ts", "../src/rules/prefer-type-fest-conditional-keys.ts", "../src/rules/prefer-type-fest-conditional-pick-deep.ts", "../src/rules/prefer-type-fest-conditional-pick.ts", "../src/rules/prefer-type-fest-constructor.ts", "../src/rules/prefer-type-fest-distributed-omit.ts", "../src/rules/prefer-type-fest-distributed-pick.ts", "../src/_internal/entry-type-patterns.ts", "../src/rules/prefer-type-fest-entries.ts", "../src/rules/prefer-type-fest-entry.ts", "../src/rules/prefer-type-fest-except.ts", "../src/rules/prefer-type-fest-extract-rest-element.ts", "../src/_internal/has-keys-type-patterns.ts", "../src/_internal/type-guard-conditional-patterns.ts", "../src/_internal/prefer-type-fest-has-keys-rule.ts", "../src/rules/prefer-type-fest-has-optional-keys.ts", "../src/rules/prefer-type-fest-has-readonly-keys.ts", "../src/rules/prefer-type-fest-has-required-keys.ts", "../src/rules/prefer-type-fest-has-writable-keys.ts", "../src/rules/prefer-type-fest-if.ts", "../src/rules/prefer-type-fest-is-any.ts", "../src/rules/prefer-type-fest-is-never.ts", "../src/rules/prefer-type-fest-is-null.ts", "../src/rules/prefer-type-fest-is-nullable.ts", "../src/rules/prefer-type-fest-is-tuple.ts", "../src/rules/prefer-type-fest-is-undefined.ts", "../src/rules/prefer-type-fest-is-unknown.ts", "../src/rules/prefer-type-fest-iterable-element.ts", "../src/rules/prefer-type-fest-json-array.ts", "../src/rules/prefer-type-fest-json-object.ts", "../src/rules/prefer-type-fest-json-primitive.ts", "../src/rules/prefer-type-fest-json-value.ts", "../src/rules/prefer-type-fest-keys-of-union.ts", "../src/rules/prefer-type-fest-less-than-or-equal.ts", "../src/rules/prefer-type-fest-less-than.ts", "../src/rules/prefer-type-fest-literal-union.ts", "../src/rules/prefer-type-fest-merge-exclusive.ts", "../src/rules/prefer-type-fest-merge.ts", "../src/rules/prefer-type-fest-non-empty-tuple.ts", "../src/rules/prefer-type-fest-non-nullable-deep.ts", "../src/rules/prefer-type-fest-omit-index-signature.ts", "../src/_internal/prefer-type-fest-keys-of-rule.ts", "../src/_internal/key-extraction-type-patterns.ts", "../src/rules/prefer-type-fest-optional-keys-of.ts", "../src/rules/prefer-type-fest-optional.ts", "../src/rules/prefer-type-fest-or-all.ts", "../src/rules/prefer-type-fest-or.ts", "../src/rules/prefer-type-fest-partial-deep.ts", "../src/rules/prefer-type-fest-pick-index-signature.ts", "../src/rules/prefer-type-fest-primitive.ts", "../src/rules/prefer-type-fest-promisable.ts", "../src/rules/prefer-type-fest-readonly-deep.ts", "../src/rules/prefer-type-fest-readonly-keys-of.ts", "../src/rules/prefer-type-fest-require-all-or-none.ts", "../src/rules/prefer-type-fest-require-at-least-one.ts", "../src/rules/prefer-type-fest-require-exactly-one.ts", "../src/rules/prefer-type-fest-require-one-or-none.ts", "../src/rules/prefer-type-fest-required-deep.ts", "../src/rules/prefer-type-fest-required-keys-of.ts", "../src/rules/prefer-type-fest-schema.ts", "../src/rules/prefer-type-fest-set-non-nullable.ts", "../src/rules/prefer-type-fest-set-optional.ts", "../src/rules/prefer-type-fest-set-readonly.ts", "../src/rules/prefer-type-fest-set-required.ts", "../src/rules/prefer-type-fest-set-return-type.ts", "../src/rules/prefer-type-fest-simplify.ts", "../src/rules/prefer-type-fest-stringified.ts", "../src/rules/prefer-type-fest-tagged-brands.ts", "../src/rules/prefer-type-fest-tuple-of.ts", "../src/rules/prefer-type-fest-union-length.ts", "../src/rules/prefer-type-fest-union-member.ts", "../src/rules/prefer-type-fest-union-to-intersection.ts", "../src/rules/prefer-type-fest-union-to-tuple.ts", "../src/rules/prefer-type-fest-unknown-array.ts", "../src/rules/prefer-type-fest-unknown-map.ts", "../src/rules/prefer-type-fest-unknown-record.ts", "../src/rules/prefer-type-fest-unknown-set.ts", "../src/rules/prefer-type-fest-unwrap-tagged.ts", "../src/rules/prefer-type-fest-value-of.ts", "../src/rules/prefer-type-fest-writable-deep.ts", "../src/rules/prefer-type-fest-writable-keys-of.ts", "../src/rules/prefer-type-fest-writable.ts", "../src/_internal/rules-registry.ts"],
  "sourcesContent": ["/**\n * @packageDocumentation\n * Public plugin entrypoint for eslint-plugin-typefest exports and preset wiring.\n */\nimport type { ESLint, Linter } from \"eslint\";\nimport type { Except } from \"type-fest\";\n\nimport typeScriptParser from \"@typescript-eslint/parser\";\nimport {\n    isDefined,\n    isEmpty,\n    objectEntries,\n    objectHasIn,\n    safeCastTo,\n    setHas,\n} from \"ts-extras\";\n\n// eslint-disable-next-line import-x/extensions -- Avoid importing from the ESM entrypoint to preserve CJS compatibility\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport {\n    deriveRuleDocsMetadataByName,\n    deriveRulePresetMembershipByRuleName,\n    deriveTypeCheckedRuleNameSet,\n} from \"./_internal/rule-docs-metadata.js\";\nimport { typefestRules } from \"./_internal/rules-registry.js\";\nimport {\n    type TypefestConfigName as InternalTypefestConfigName,\n    typefestConfigMetadataByName,\n} from \"./_internal/typefest-config-references.js\";\n\n/** ESLint severity used by generated preset rule maps. */\nconst ERROR_SEVERITY = \"error\" as const;\n\n/** Default file globs targeted by plugin presets when `files` is omitted. */\nconst TYPE_SCRIPT_FILES = [\"**/*.{ts,tsx,mts,cts}\"] as const;\n\n/**\n * Canonical flat-config preset keys exposed through `plugin.configs`.\n *\n * @remarks\n * These names are used by consumers when composing presets in ESLint flat\n * config arrays.\n */\nexport type TypefestConfigName = InternalTypefestConfigName;\n\n/**\n * Flat-config preset shape produced by this plugin.\n *\n * @remarks\n * The `rules` map is required so preset composition can always merge concrete\n * rule severity entries without additional null checks.\n */\nexport type TypefestPresetConfig = Linter.Config & {\n    rules: NonNullable<Linter.Config[\"rules\"]>;\n};\n\n/** Internal alias for flat config objects handled by preset builders. */\ntype FlatConfig = Linter.Config;\n\n/** Normalized language-options shape for preset composition helpers. */\ntype FlatLanguageOptions = NonNullable<FlatConfig[\"languageOptions\"]>;\n\n/** Normalized parser-options shape for preset composition helpers. */\ntype FlatParserOptions = NonNullable<FlatLanguageOptions[\"parserOptions\"]>;\n\n/** Rule-map type used by preset rule-list expansion helpers. */\ntype RulesConfig = TypefestPresetConfig[\"rules\"];\n\n/** Contract for the `configs` object exported by this plugin. */\ntype TypefestConfigsContract = Record<TypefestConfigName, TypefestPresetConfig>;\n\n/** Fully assembled plugin contract used by the runtime default export. */\ntype TypefestPluginContract = Except<ESLint.Plugin, \"configs\" | \"rules\"> & {\n    configs: TypefestConfigsContract;\n    meta: {\n        name: string;\n        namespace: string;\n        version: string;\n    };\n    processors: NonNullable<ESLint.Plugin[\"processors\"]>;\n    rules: NonNullable<ESLint.Plugin[\"rules\"]>;\n};\n\n/**\n * Resolve package version from package.json data.\n *\n * @param pkg - Parsed package metadata value.\n *\n * @returns The package version, or `0.0.0` when unavailable.\n */\nfunction getPackageVersion(pkg: unknown): string {\n    if (typeof pkg !== \"object\" || pkg === null) {\n        return \"0.0.0\";\n    }\n\n    const version: unknown = Reflect.get(pkg, \"version\");\n\n    return typeof version === \"string\" ? version : \"0.0.0\";\n}\n\n/** Package metadata used to populate plugin runtime `meta.version`. */\nconst packageJsonValue = safeCastTo<unknown>(packageJson);\n\n/** Parser module reused across preset construction. */\nconst typeScriptParserValue: FlatLanguageOptions[\"parser\"] = typeScriptParser;\n\n/** Default parser options applied when a preset omits parser options. */\nconst defaultParserOptions = {\n    ecmaVersion: \"latest\",\n    sourceType: \"module\",\n} satisfies FlatParserOptions;\n\n/**\n * Normalize unknown parser options into a mutable parser-options object.\n */\nconst normalizeParserOptions = (\n    parserOptions: FlatLanguageOptions[\"parserOptions\"]\n): FlatParserOptions =>\n    parserOptions !== null &&\n    typeof parserOptions === \"object\" &&\n    !Array.isArray(parserOptions)\n        ? { ...parserOptions }\n        : { ...defaultParserOptions };\n\n/**\n * Fully-qualified ESLint rule id used by this plugin.\n *\n * @remarks\n * Consumers typically use this when building strongly typed rule maps or helper\n * utilities that require namespaced rule identifiers.\n */\nexport type TypefestRuleId = `typefest/${TypefestRuleName}`;\n\n/** Unqualified rule name supported by `eslint-plugin-typefest`. */\nexport type TypefestRuleName = keyof typeof typefestRules;\n\n/**\n * ESLint-compatible rule map view of the strongly typed internal rule record.\n */\nconst typefestEslintRules: NonNullable<ESLint.Plugin[\"rules\"]> &\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- ESLint's public RuleDefinition type requires mutable defaultOptions, while the plugin's internal rule registry intentionally stores readonly rule metadata.\n    typeof typefestRules = typefestRules as NonNullable<\n    ESLint.Plugin[\"rules\"]\n> &\n    typeof typefestRules;\n\nconst isTypefestRuleName = (value: string): value is TypefestRuleName =>\n    objectHasIn(typefestRules, value);\n\nconst typefestRuleEntries: readonly (readonly [\n    TypefestRuleName,\n    (typeof typefestRules)[TypefestRuleName],\n])[] = (() => {\n    const entries: (readonly [\n        TypefestRuleName,\n        (typeof typefestRules)[TypefestRuleName],\n    ])[] = [];\n\n    for (const [ruleName] of objectEntries(typefestRules)) {\n        if (!isTypefestRuleName(ruleName)) {\n            continue;\n        }\n\n        const ruleDefinition = typefestRules[ruleName];\n\n        if (ruleDefinition === undefined) {\n            continue;\n        }\n\n        entries.push([ruleName, ruleDefinition]);\n    }\n\n    return entries;\n})();\n\nconst ruleDocsMetadataByRuleName = deriveRuleDocsMetadataByName(typefestRules);\nconst rulePresetMembership = deriveRulePresetMembershipByRuleName(\n    ruleDocsMetadataByRuleName\n);\nconst typeCheckedRuleNames = deriveTypeCheckedRuleNameSet(\n    ruleDocsMetadataByRuleName\n);\n\nconst createEmptyPresetRuleMap = (): Record<\n    TypefestConfigName,\n    TypefestRuleName[]\n> => ({\n    all: [],\n    experimental: [],\n    minimal: [],\n    recommended: [],\n    \"recommended-type-checked\": [],\n    strict: [],\n    \"ts-extras/type-guards\": [],\n    \"type-fest/types\": [],\n});\n\nconst dedupeRuleNames = (\n    ruleNames: readonly TypefestRuleName[]\n): TypefestRuleName[] => [...new Set(ruleNames)];\n\nconst derivePresetRuleNamesByConfig = (): Readonly<\n    Record<TypefestConfigName, readonly TypefestRuleName[]>\n> => {\n    const presetRuleNamesByConfig = createEmptyPresetRuleMap();\n\n    for (const [ruleName] of typefestRuleEntries) {\n        const configNames = rulePresetMembership[ruleName];\n\n        if (!isDefined(configNames) || isEmpty(configNames)) {\n            throw new TypeError(\n                `Rule '${ruleName}' is missing preset membership metadata.`\n            );\n        }\n\n        for (const configName of configNames) {\n            presetRuleNamesByConfig[configName].push(ruleName);\n        }\n    }\n\n    return {\n        all: dedupeRuleNames(presetRuleNamesByConfig.all),\n        experimental: dedupeRuleNames(presetRuleNamesByConfig.experimental),\n        minimal: dedupeRuleNames(presetRuleNamesByConfig.minimal),\n        recommended: dedupeRuleNames(presetRuleNamesByConfig.recommended),\n        \"recommended-type-checked\": dedupeRuleNames(\n            presetRuleNamesByConfig[\"recommended-type-checked\"]\n        ),\n        strict: dedupeRuleNames(presetRuleNamesByConfig.strict),\n        \"ts-extras/type-guards\": dedupeRuleNames(\n            presetRuleNamesByConfig[\"ts-extras/type-guards\"]\n        ),\n        \"type-fest/types\": dedupeRuleNames(\n            presetRuleNamesByConfig[\"type-fest/types\"]\n        ),\n    };\n};\n\n/**\n * Build an ESLint rules map that enables each provided rule at error level.\n *\n * @param ruleNames - Rule names to enable.\n *\n * @returns Rules config object compatible with flat config.\n */\nfunction errorRulesFor(ruleNames: readonly TypefestRuleName[]): RulesConfig {\n    const rules: RulesConfig = {};\n\n    for (const ruleName of ruleNames) {\n        rules[`typefest/${ruleName}`] = ERROR_SEVERITY;\n    }\n\n    return rules;\n}\n\n/**\n * Remove duplicates while preserving first-seen ordering.\n *\n * @param ruleNames - Candidate rule list.\n *\n * @returns Deduplicated rule list.\n */\nconst presetRuleNamesByConfig = derivePresetRuleNamesByConfig();\n\n/** Recommended preset rule list for zero-type-info usage. */\nconst recommendedRuleNames: TypefestRuleName[] = [];\n\nfor (const ruleName of presetRuleNamesByConfig.recommended) {\n    if (setHas(typeCheckedRuleNames, ruleName)) {\n        continue;\n    }\n\n    recommendedRuleNames.push(ruleName);\n}\n\n/** Type-aware recommended preset rule list. */\nconst recommendedTypeCheckedRuleNames = dedupeRuleNames([\n    ...recommendedRuleNames,\n    ...presetRuleNamesByConfig[\"recommended-type-checked\"],\n]);\n\n/** Effective per-preset rule lists after applying derived policy overlays. */\nconst effectivePresetRuleNamesByConfig: Readonly<\n    Record<TypefestConfigName, readonly TypefestRuleName[]>\n> = {\n    ...presetRuleNamesByConfig,\n    experimental: dedupeRuleNames([\n        ...presetRuleNamesByConfig.all,\n        ...presetRuleNamesByConfig.experimental,\n    ]),\n    recommended: recommendedRuleNames,\n    \"recommended-type-checked\": recommendedTypeCheckedRuleNames,\n};\n\n/**\n * Apply parser and plugin metadata required by all plugin presets.\n *\n * @param config - Preset-specific config fragment.\n * @param plugin - Plugin object registered under the `typefest` namespace.\n * @param options - Preset-level wiring options.\n *\n * @returns Normalized preset config.\n */\nfunction withTypefestPlugin(\n    config: Readonly<TypefestPresetConfig>,\n    plugin: Readonly<ESLint.Plugin>,\n    options: Readonly<{ requiresTypeChecking: boolean }>\n): TypefestPresetConfig {\n    const existingLanguageOptions = config.languageOptions ?? {};\n    const existingParserOptions = existingLanguageOptions[\"parserOptions\"];\n    const parserOptions = normalizeParserOptions(existingParserOptions);\n\n    if (\n        options.requiresTypeChecking &&\n        !objectHasIn(parserOptions, \"projectService\")\n    ) {\n        Reflect.set(parserOptions, \"projectService\", true);\n    }\n\n    const languageOptions: FlatLanguageOptions = {\n        ...existingLanguageOptions,\n        parser: existingLanguageOptions[\"parser\"] ?? typeScriptParserValue,\n        parserOptions,\n    };\n\n    return {\n        ...config,\n        files: config.files ?? [...TYPE_SCRIPT_FILES],\n        languageOptions,\n        plugins: {\n            ...config.plugins,\n            typefest: plugin,\n        },\n    };\n}\n\n/** Minimal plugin object used when assembling flat-config presets. */\nconst pluginForConfigs: ESLint.Plugin = {\n    rules: typefestEslintRules,\n};\n\nconst createPresetConfig = (\n    configName: TypefestConfigName\n): TypefestPresetConfig => {\n    const configMetadata = typefestConfigMetadataByName[configName];\n\n    return withTypefestPlugin(\n        {\n            name: configMetadata.presetName,\n            rules: errorRulesFor(effectivePresetRuleNamesByConfig[configName]),\n        },\n        pluginForConfigs,\n        {\n            requiresTypeChecking: configMetadata.requiresTypeChecking,\n        }\n    );\n};\n\n/**\n * Flat config presets distributed by eslint-plugin-typefest.\n */\nconst createTypefestConfigsDefinition = (): TypefestConfigsContract => ({\n    all: createPresetConfig(\"all\"),\n    experimental: createPresetConfig(\"experimental\"),\n    minimal: createPresetConfig(\"minimal\"),\n    recommended: createPresetConfig(\"recommended\"),\n    \"recommended-type-checked\": createPresetConfig(\"recommended-type-checked\"),\n    strict: createPresetConfig(\"strict\"),\n    \"ts-extras/type-guards\": createPresetConfig(\"ts-extras/type-guards\"),\n    \"type-fest/types\": createPresetConfig(\"type-fest/types\"),\n});\n\nconst typefestConfigsDefinition = createTypefestConfigsDefinition();\n\n/** Finalized typed view of all exported preset configurations. */\nconst typefestConfigs: TypefestConfigsContract = typefestConfigsDefinition;\n\n/**\n * Runtime type for the plugin's generated config presets.\n *\n * @remarks\n * Mirrors `plugin.configs` and is useful when composing typed preset-aware\n * tooling in external integrations.\n */\nexport type TypefestConfigs = typeof typefestConfigs;\n\n/**\n * Main plugin object exported for ESLint consumption.\n */\nconst typefestPlugin: TypefestPluginContract = {\n    configs: typefestConfigs,\n    meta: {\n        name: \"eslint-plugin-typefest\",\n        namespace: \"typefest\",\n        version: getPackageVersion(packageJsonValue),\n    },\n    processors: {},\n    rules: typefestEslintRules,\n};\n\n/**\n * Runtime type for the plugin object exported as default.\n *\n * @remarks\n * Includes resolved `meta`, `rules`, and `configs` contracts after plugin\n * assembly.\n */\nexport type TypefestPlugin = typeof typefestPlugin;\n\n/**\n * Default plugin export consumed by ESLint flat config.\n */\nexport default typefestPlugin;\n", "{\n    \"$schema\": \"https://www.schemastore.org/package.json\",\n    \"name\": \"eslint-plugin-typefest\",\n    \"version\": \"1.2.10\",\n    \"private\": false,\n    \"description\": \"ESLint rules for adopting type-fest and ts-extras conventions.\",\n    \"keywords\": [\n        \"eslint\",\n        \"eslint-plugin\",\n        \"eslintplugin\",\n        \"type-fest\",\n        \"ts-extras\",\n        \"typescript\"\n    ],\n    \"homepage\": \"https://nick2bad4u.github.io/eslint-plugin-typefest/\",\n    \"bugs\": {\n        \"url\": \"https://github.com/Nick2bad4u/eslint-plugin-typefest/issues\",\n        \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\"\n    },\n    \"repository\": {\n        \"type\": \"git\",\n        \"url\": \"git+https://github.com/Nick2bad4u/eslint-plugin-typefest.git\"\n    },\n    \"license\": \"MIT\",\n    \"author\": \"Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> (https://github.com/Nick2bad4u)\",\n    \"contributors\": [\n        {\n            \"name\": \"Nick2bad4u\",\n            \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\",\n            \"url\": \"https://github.com/Nick2bad4u\"\n        }\n    ],\n    \"sideEffects\": false,\n    \"type\": \"module\",\n    \"exports\": {\n        \".\": {\n            \"import\": {\n                \"types\": \"./dist/plugin.d.ts\",\n                \"default\": \"./dist/plugin.js\"\n            },\n            \"require\": {\n                \"types\": \"./dist/plugin.d.cts\",\n                \"default\": \"./dist/plugin.cjs\"\n            },\n            \"default\": \"./dist/plugin.js\"\n        },\n        \"./package.json\": \"./package.json\"\n    },\n    \"main\": \"./dist/plugin.cjs\",\n    \"types\": \"./dist/plugin.d.ts\",\n    \"files\": [\n        \"dist\",\n        \"docs/rules/**\",\n        \"CHANGELOG.md\"\n    ],\n    \"workspaces\": [\n        \"docs/docusaurus\"\n    ],\n    \"scripts\": {\n        \"prebench\": \"npm run build\",\n        \"bench\": \"node benchmarks/run-eslint-stats.mjs\",\n        \"prebench:compare\": \"npm run build\",\n        \"bench:compare\": \"node benchmarks/run-eslint-stats.mjs --iterations=6 --warmup=2 --compare=coverage/benchmarks/eslint-stats.json\",\n        \"prebench:eslint:stats\": \"npm run build\",\n        \"bench:eslint:stats\": \"node benchmarks/run-eslint-stats.mjs\",\n        \"prebench:eslint:timing\": \"npm run build\",\n        \"bench:eslint:timing\": \"cross-env TIMING=all eslint --config benchmarks/eslint-timing.config.mjs --stats \\\"test/fixtures/typed/*.invalid.ts\\\"\",\n        \"prebench:rule-benchmark\": \"npm run build\",\n        \"bench:rule-benchmark\": \"eslint-rule-benchmark run\",\n        \"prebench:ui\": \"npm run build\",\n        \"bench:ui\": \"vitest bench --ui\",\n        \"prebench:watch\": \"npm run build\",\n        \"bench:watch\": \"vitest bench\",\n        \"build\": \"tsc -b tsconfig.build.json --force && npm run build:types:cjs && npm run build:cjs\",\n        \"build:cjs\": \"esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js=\\\"module.exports = module.exports.default;\\\"\",\n        \"build:clean\": \"node -e \\\"require('node:fs').rmSync('dist',{recursive:true,force:true})\\\"\",\n        \"build:eslint-inspector\": \"npx -y @eslint/config-inspector@latest build --outDir \\\"docs/docusaurus/static/eslint-inspector\\\" --base \\\"/eslint-plugin-typefest/eslint-inspector/\\\"\",\n        \"build:eslint-inspector:local\": \"npx @eslint/config-inspector\",\n        \"build:stylelint-inspector\": \"npx -y stylelint-config-inspector@latest build --outDir \\\"docs/docusaurus/static/stylelint-inspector\\\" --base \\\"/eslint-plugin-typefest/stylelint-inspector/\\\"\",\n        \"build:stylelint-inspector:local\": \"npx stylelint-config-inspector@latest\",\n        \"build:types:cjs\": \"node -e \\\"require('node:fs').copyFileSync('dist/plugin.d.ts','dist/plugin.d.cts')\\\"\",\n        \"changelog\": \"git-cliff --config cliff.toml --current\",\n        \"changelog:generate\": \"git-cliff --config cliff.toml --output CHANGELOG.md\",\n        \"changelog:preview\": \"git-cliff --config cliff.toml --unreleased\",\n        \"changelog:release-notes\": \"git-cliff --config cliff.toml --current --strip all\",\n        \"clean:cache\": \"del-cli dist coverage cache .cache .vite .turbo\",\n        \"clean:cache:coverage\": \"del-cli coverage .coverage\",\n        \"clean:cache:dist\": \"del-cli dist release\",\n        \"clean:cache:eslint\": \"del-cli .cache/.eslintcache\",\n        \"clean:cache:ncu\": \"del-cli .cache/.ncu-cache.json\",\n        \"clean:cache:prettier\": \"del-cli .cache/.prettier-cache .prettier-cache .prettiercache\",\n        \"clean:cache:stryker\": \"del-cli .stryker-tmp\",\n        \"clean:cache:stylelint\": \"del-cli .cache/stylelintcache stylelintcache .stylelintcache\",\n        \"clean:cache:temp\": \"del-cli \\\".temp/**\\\"\",\n        \"clean:cache:typescript\": \"del-cli .cache/**.tsbuildinfo .cache/builds\",\n        \"clean:cache:vite\": \"del-cli .cache/vite .cache/vitest .cache/vitest-zero-coverage .cache/vite-zero-coverage\",\n        \"clean:database\": \"del-cli %appdata%/uptime-watcher/uptime-watcher.sqlite\",\n        \"clean:docs\": \"del-cli docs/docusaurus/.docusaurus/** docs/docusaurus/build/** docs/docusaurus/site-docs/developer/api/**\",\n        \"clean:docusaurus\": \"npm run clean:docs && npm run --workspace docs/docusaurus clear\",\n        \"cognitive-complexity\": \"cognitive-complexity-ts --threshold 10\",\n        \"precommit\": \"npm run sync:rules:write\",\n        \"commit\": \"git-cz\",\n        \"contrib\": \"all-contributors\",\n        \"contrib:add\": \"all-contributors add\",\n        \"contrib:check\": \"all-contributors check\",\n        \"contrib:compare\": \"npm run contrib:check\",\n        \"contrib:generate\": \"all-contributors generate\",\n        \"coverage\": \"vitest run --coverage\",\n        \"docs:api\": \"npm run --workspace docs/docusaurus docs:api\",\n        \"docs:api:local\": \"npm run --workspace docs/docusaurus docs:api:local\",\n        \"docs:build\": \"npm run --workspace docs/docusaurus build\",\n        \"docs:build:local\": \"npm run --workspace docs/docusaurus build:local\",\n        \"docs:check-links\": \"npm run docs:api && node ./scripts/check-doc-links.mjs\",\n        \"docs:devtools:metadata\": \"node scripts/generate-devtools-workspace-metadata.mjs\",\n        \"docs:serve\": \"npm run --workspace docs/docusaurus serve\",\n        \"docs:start\": \"npm run --workspace docs/docusaurus start\",\n        \"docs:start:devtools\": \"npm run docs:devtools:metadata && npm run docs:api:local && npm run --workspace docs/docusaurus start:devtools\",\n        \"docs:toc\": \"remark docs --use remark-toc --output\",\n        \"docs:typecheck\": \"npm run --workspace docs/docusaurus typecheck\",\n        \"docs:typedoc\": \"npm run --workspace docs/docusaurus docs:api\",\n        \"docs:typedoc:local\": \"npm run --workspace docs/docusaurus docs:api:local\",\n        \"docs:validate-links\": \"remark docs --use remark-validate-links --frail\",\n        \"knip\": \"cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_NO_WARNINGS=1 npx knip -c knip.config.ts --cache --cache-location .cache/knip --tsConfig tsconfig.json\",\n        \"lint\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache\",\n        \"lint:action\": \"npm run lint:actions\",\n        \"lint:actions\": \"node scripts/lint-actionlint.mjs\",\n        \"lint:all\": \"npm run lint && npm run typecheck && npm run lint:css && npm run lint:prettier && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:gitleaks && npm run lint:yaml && npm run lint:yamllint && npm run lint:actions && npm run lint:circular && npm run sync:rules:check\",\n        \"lint:all:fix\": \"npm run lint:fix && npm run typecheck && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:gitleaks && npm run lint:yaml:fix && npm run lint:yamllint && npm run lint:actions && npm run lint:circular && npm run sync:rules:write\",\n        \"lint:all:fix:quiet\": \"npm run lint:fix:quiet && npm run typecheck && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:gitleaks && npm run lint:yaml:fix && npm run lint:yamllint && npm run lint:actions && npm run lint:circular && npm run sync:rules:write\",\n        \"lint:circular\": \"npm run madge:circular\",\n        \"lint:compat:eslint9\": \"node scripts/eslint9-compat-smoke.mjs\",\n        \"lint:config:build\": \"npm run build:eslint-inspector\",\n        \"lint:config:inspect\": \"npx eslint --inspect-config\",\n        \"lint:css\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache src/ docs/ --custom-formatter stylelint-formatter-pretty && echo \\\"Stylelint done!\\\"\",\n        \"lint:css:fix\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache src/ docs/ --custom-formatter stylelint-formatter-pretty --fix && echo \\\"Stylelint done!\\\"\",\n        \"lint:depcheck\": \"npm run knip -- --dependencies\",\n        \"lint:deps\": \"npm run knip -- --dependencies\",\n        \"lint:dupes\": \"jscpd src/ --config jscpd.json\",\n        \"lint:dupes:all\": \"jscpd src/ --config jscpd.json --min-lines 3\",\n        \"lint:dupes:skiplocal\": \"jscpd src/ --skipLocal --config jscpd.json\",\n        \"lint:dupes:skiplocal:all\": \"jscpd src/ --skipLocal --config jscpd.json --min-lines 3\",\n        \"lint:duplicates\": \"npm run lint:dupes\",\n        \"lint:exports\": \"ts-unused-exports tsconfig.json src/plugin.ts --excludePathsFromReport=plugin.ts\",\n        \"lint:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache --fix\",\n        \"lint:fix:quiet\": \"cross-env ESLINT_PROGRESS=off NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache --fix && echo \\\"Eslint fix done!\\\"\",\n        \"lint:gitleaks\": \"gitleaks detect --config .gitleaks.toml --no-banner --redact --source .\",\n        \"lint:grype\": \"grype . -c .grype.yaml --name eslint-plugin-typefest\",\n        \"lint:knip\": \"npm run knip\",\n        \"lint:knip:exports\": \"npm run knip -- --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates\",\n        \"lint:knip:unused:exports\": \"npm run knip -- --dependencies --exports\",\n        \"lint:leaves\": \"npm run madge:leaves\",\n        \"lint:metrics\": \"npm run sloc\",\n        \"lint:nocache\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint .\",\n        \"lint:node-version-files\": \"node scripts/sync-node-version-files.mjs --check\",\n        \"lint:orphans\": \"npm run madge:orphans\",\n        \"lint:package\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n        \"lint:package:strict\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:package-check:strict && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n        \"lint:package-check\": \"publint && attw --pack .\",\n        \"lint:package-check:strict\": \"publint && attw --pack . --profile strict\",\n        \"lint:package-sort\": \"sort-package-json \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n        \"lint:package-sort-check\": \"sort-package-json --check \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n        \"lint:packagelintrc\": \"npmPkgJsonLint . --config .npmpackagejsonlintrc.json\",\n        \"lint:prettier\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --check\",\n        \"lint:prettier:fix\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --write\",\n        \"lint:publint\": \"publint\",\n        \"lint:quiet\": \"cross-env ESLINT_PROGRESS=nofile NODE_OPTIONS=--max_old_space_size=16384 eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache && echo \\\"Eslint done!\\\"\",\n        \"lint:remark\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" --quiet\",\n        \"lint:remark:fix\": \"prettier --log-level warn --ignore-path prettierignore.remark --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --no-error-on-unmatched-pattern --write \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" && npm run remark:fix\",\n        \"lint:secretlint\": \"secretlint --secretlintrc .secretlintrc.cjs --secretlintignore .secretlintignore \\\"./*\\\" \\\".vscode/**\\\" \\\"assets/**\\\" \\\"src/**\\\" \\\"electron/**\\\" \\\"shared/**\\\" \\\"config/**\\\" \\\"scripts/**\\\" \\\"playwright/**\\\" \\\"storybook/**\\\" \\\".storybook\\\" \\\"tests/**\\\" \\\"benchmarks/**\\\" \\\".devin/**\\\" \\\"public/**\\\" \\\".github/**\\\" \\\"docs/Architecture/**\\\" \\\"docs/*\\\" \\\"docs/assets/**\\\" \\\"docs/Guides/**\\\" \\\"docs/Testing/**\\\" \\\"docs/TSDoc/**\\\" \\\"docs/docusaurus/src/**\\\" \\\"docs/docusaurus/static/**\\\" \\\"docs/docusaurus/blog/**\\\" \\\"docs/docusaurus/docs/**\\\" \\\"docs/docusaurus/docs/*\\\"\",\n        \"lint:secrets\": \"detect-secrets scan\",\n        \"lint:unused\": \"npm run knip -- --include unlisted,unresolved,duplicates\",\n        \"lint:unused-deps\": \"npm run knip -- --dependencies\",\n        \"lint:yaml\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint done!\\\"\",\n        \"lint:yaml:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint (fix) done!\\\"\",\n        \"lint:yamllint\": \"yamllint .\",\n        \"madge:circular\": \"madge --circular --json --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n        \"madge:leaves\": \"madge --leaves --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n        \"madge:orphans\": \"madge --orphans --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n        \"open:coverage\": \"open-cli coverage/index.html\",\n        \"prepublishOnly\": \"npm run release:check\",\n        \"release:check\": \"npm run release:verify\",\n        \"release:verify\": \"cross-env NODE_OPTIONS= npm run build && cross-env NODE_OPTIONS= npm run lint:nocache && cross-env NODE_OPTIONS= npm run typecheck && cross-env NODE_OPTIONS= VITEST_TYPECHECK=false npm run test && cross-env NODE_OPTIONS= npm run sync:rules:check && cross-env NODE_OPTIONS= npm run docs:check-links && cross-env NODE_OPTIONS= npm run lint:package:strict\",\n        \"remark:fix\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail --quiet --output -- \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\"\",\n        \"remark:test-config\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"README.md\\\"\",\n        \"size\": \"size-limit\",\n        \"sync:node-version-files\": \"node scripts/sync-node-version-files.mjs\",\n        \"sync:peer-eslint-range\": \"node scripts/sync-peer-eslint-range.mjs\",\n        \"sync:presets-rules-matrix\": \"node scripts/sync-presets-rules-matrix.mjs\",\n        \"sync:readme-rules-table\": \"node scripts/sync-readme-rules-table.mjs\",\n        \"sync:readme-rules-table:update\": \"npm run build && cross-env TYPEFEST_UPDATE_GENERATED_DOCS=1 vitest run test/readme-rules-table-sync.test.ts -u\",\n        \"sync:readme-rules-table:write\": \"node scripts/sync-readme-rules-table.mjs --write\",\n        \"sync:rules:check\": \"npm run sync:readme-rules-table && npm run sync:presets-rules-matrix\",\n        \"sync:rules:write\": \"npm run sync:readme-rules-table:write && npm run sync:presets-rules-matrix\",\n        \"pretest\": \"npm run build\",\n        \"test\": \"vitest run\",\n        \"test:autofix:fixtures\": \"cross-env TYPEFEST_AUTOFIX_SMOKE=1 vitest run test/autofix-fixtures-all-rules-smoke.test.ts\",\n        \"test:autofix:fixtures:typed\": \"cross-env TYPEFEST_AUTOFIX_SMOKE=1 TYPEFEST_AUTOFIX_FIXTURE_DIR=test/fixtures/typed vitest run test/autofix-fixtures-all-rules-smoke.test.ts\",\n        \"test:ci\": \"cross-env CI=true vitest run --reporter=default\",\n        \"test:coverage\": \"vitest run --coverage --reporter=default\",\n        \"test:coverage:detailed\": \"vitest run --coverage --reporter=verbose\",\n        \"test:coverage:minimal\": \"vitest run --coverage --reporter=dot\",\n        \"test:coverage:open\": \"npm run test:coverage && npm run open:coverage\",\n        \"test:coverage:quiet\": \"vitest run --coverage --reporter=default --silent\",\n        \"test:coverage:verbose\": \"vitest run --coverage --reporter=verbose\",\n        \"test:detailed\": \"vitest run --reporter=verbose\",\n        \"test:minimal\": \"vitest run --reporter=dot\",\n        \"test:open\": \"npm run test:coverage && npm run open:coverage\",\n        \"test:quiet\": \"vitest run --reporter=default --silent\",\n        \"test:serial\": \"cross-env MAX_THREADS=1 vitest run\",\n        \"test:stryker\": \"stryker run --ignoreStatic --concurrency 12 --incrementalFile .cache/stryker/incremental-fast.json\",\n        \"test:stryker:ci\": \"cross-env CI=true stryker run --ignoreStatic --concurrency 2 --incrementalFile .cache/stryker/incremental-fast-ci.json\",\n        \"test:stryker:full\": \"stryker run --concurrency 12 --incrementalFile .cache/stryker/incremental-full.json\",\n        \"test:stryker:full:ci\": \"cross-env CI=true stryker run --concurrency 2 --incrementalFile .cache/stryker/incremental-full-ci.json\",\n        \"test:verbose\": \"vitest run --reporter=verbose\",\n        \"test:watch\": \"vitest\",\n        \"typecheck\": \"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.eslint.json --noEmit && tsc -p tsconfig.js.json --noEmit && npm run --workspace docs/docusaurus typecheck\",\n        \"typecheck:all\": \"npm run typecheck\",\n        \"types:update\": \"typesync\",\n        \"update-actions\": \"npx actions-up --yes --style sha\",\n        \"update-deps\": \"npx ncu -i --install never && npm update --workspaces --force && npm install --force && npm run sync:peer-eslint-range && npm run sync:node-version-files && npm run sync:rules:write\",\n        \"verify:readme-rules-table\": \"npm run build && npm run sync:rules:write\"\n    },\n    \"overrides\": {\n        \"jsonc-eslint-parser\": \"$jsonc-eslint-parser\"\n    },\n    \"dependencies\": {\n        \"@typescript-eslint/parser\": \"^8.61.1\",\n        \"@typescript-eslint/type-utils\": \"^8.61.1\",\n        \"@typescript-eslint/utils\": \"^8.61.1\",\n        \"ts-extras\": \"^1.0.0\",\n        \"type-fest\": \"^5.7.0\"\n    },\n    \"devDependencies\": {\n        \"@arethetypeswrong/cli\": \"^0.18.3\",\n        \"@csstools/stylelint-formatter-github\": \"^2.0.0\",\n        \"@double-great/remark-lint-alt-text\": \"^1.1.1\",\n        \"@eslint/config-inspector\": \"^3.0.4\",\n        \"@microsoft/tsdoc-config\": \"^0.18.1\",\n        \"@size-limit/file\": \"^12.1.0\",\n        \"@stryker-ignorer/console-all\": \"^0.3.2\",\n        \"@stryker-mutator/core\": \"^9.6.1\",\n        \"@stryker-mutator/typescript-checker\": \"^9.6.1\",\n        \"@stryker-mutator/vitest-runner\": \"^9.6.1\",\n        \"@types/htmlhint\": \"^1.1.5\",\n        \"@types/madge\": \"^5.0.3\",\n        \"@types/node\": \"^25.9.3\",\n        \"@types/sloc\": \"^0.2.3\",\n        \"@typescript-eslint/rule-tester\": \"^8.61.1\",\n        \"@vitest/coverage-v8\": \"^4.1.9\",\n        \"@vitest/ui\": \"^4.1.9\",\n        \"actionlint\": \"^2.0.6\",\n        \"all-contributors-cli\": \"^6.26.1\",\n        \"cognitive-complexity-ts\": \"^0.8.2\",\n        \"commitlint\": \"^21.0.2\",\n        \"commitlint-config-gitmoji\": \"^2.3.1\",\n        \"cross-env\": \"^10.1.0\",\n        \"del-cli\": \"^7.0.0\",\n        \"detect-secrets\": \"^1.0.6\",\n        \"esbuild\": \"^0.28.1\",\n        \"eslint\": \"^10.5.0\",\n        \"eslint-config-nick2bad4u\": \"^2.0.2\",\n        \"eslint-formatter-unix\": \"^9.0.1\",\n        \"eslint-rule-benchmark\": \"^0.8.0\",\n        \"fast-check\": \"^4.8.0\",\n        \"git-cliff\": \"^2.13.1\",\n        \"gitleaks-config-nick2bad4u\": \"^1.0.2\",\n        \"gitleaks-secret-scanner\": \"^2.1.1\",\n        \"htmlhint\": \"^1.9.2\",\n        \"jscpd\": \"^5.0.10\",\n        \"knip\": \"^6.17.1\",\n        \"leasot\": \"^14.4.0\",\n        \"madge\": \"^8.0.0\",\n        \"markdown-link-check\": \"^3.14.2\",\n        \"npm\": \"^11.17.0\",\n        \"npm-check-updates\": \"^22.2.3\",\n        \"npm-package-json-lint\": \"^10.4.1\",\n        \"npm-package-json-lint-config-nick2bad4u\": \"^1.0.3\",\n        \"picocolors\": \"^1.1.1\",\n        \"prettier\": \"^3.8.4\",\n        \"prettier-config-nick2bad4u\": \"^1.0.17\",\n        \"prettier-plugin-jsdoc-type\": \"^0.2.0\",\n        \"publint\": \"^0.3.21\",\n        \"rehype-katex\": \"^7.0.1\",\n        \"remark\": \"^15.0.1\",\n        \"remark-cli\": \"^12.0.1\",\n        \"remark-config-nick2bad4u\": \"^1.0.8\",\n        \"secretlint\": \"^13.0.2\",\n        \"secretlint-config-nick2bad4u\": \"^1.1.0\",\n        \"size-limit\": \"^12.1.0\",\n        \"sloc\": \"^0.3.2\",\n        \"sort-package-json\": \"^4.0.0\",\n        \"stylelint\": \"^17.13.0\",\n        \"stylelint-config-nick2bad4u\": \"^1.0.19\",\n        \"ts-unused-exports\": \"^11.0.1\",\n        \"tsdoc-config-nick2bad4u\": \"^1.0.5\",\n        \"typedoc\": \"^0.28.19\",\n        \"typedoc-config-nick2bad4u\": \"^2.0.0\",\n        \"typescript\": \"^6.0.3\",\n        \"typescript-eslint\": \"^8.61.1\",\n        \"typesync\": \"^0.14.3\",\n        \"vfile\": \"^6.0.3\",\n        \"vite\": \"^8.0.16\",\n        \"vite-tsconfig-paths\": \"^6.1.1\",\n        \"vitest\": \"^4.1.9\",\n        \"yamllint-config-nick2bad4u\": \"^1.0.2\",\n        \"yamllint-js\": \"^0.2.4\"\n    },\n    \"peerDependencies\": {\n        \"eslint\": \"^9.0.0 || ^10.5.0\",\n        \"typescript\": \"^5.0.0 || ^6.0.2\"\n    },\n    \"packageManager\": \"npm@11.16.0\",\n    \"engines\": {\n        \"node\": \">=22.0.0\"\n    },\n    \"devEngines\": {\n        \"runtime\": {\n            \"name\": \"node\",\n            \"version\": \">=22.0.0\",\n            \"onFail\": \"error\"\n        },\n        \"packageManager\": {\n            \"name\": \"npm\",\n            \"version\": \">=11.0.0\",\n            \"onFail\": \"error\"\n        }\n    },\n    \"publishConfig\": {\n        \"provenance\": true,\n        \"registry\": \"https://registry.npmjs.org/\"\n    },\n    \"readme\": \"README.md\"\n}\n", "/**\n * @packageDocumentation\n * Derivation helpers for canonical rule docs metadata.\n */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray, UnknownRecord } from \"type-fest\";\n\nimport {\n    arrayIncludes,\n    isDefined,\n    isEmpty,\n    isInteger,\n    objectEntries,\n} from \"ts-extras\";\n\nimport type { TypefestRuleNamePattern } from \"./rules-registry.js\";\n\nimport { createRuleDocsUrl } from \"./rule-docs-url.js\";\nimport {\n    isTypefestConfigReference,\n    type TypefestConfigName,\n    type TypefestConfigReference,\n    typefestConfigReferenceToName,\n} from \"./typefest-config-references.js\";\n\n/** Normalized docs metadata derived for each rule. */\nexport type RuleDocsMetadata = Readonly<{\n    description: string;\n    recommended: boolean;\n    requiresTypeChecking: boolean;\n    ruleId: string;\n    ruleNumber: number;\n    typefestConfigNames: readonly TypefestConfigName[];\n    typefestConfigReferences: readonly TypefestConfigReference[];\n    url: string;\n}>;\n\n/** Rule-name keyed metadata map derived from static docs contracts. */\nexport type RuleDocsMetadataByName = Readonly<\n    Record<TypefestRuleNamePattern, RuleDocsMetadata>\n>;\n\n/** Rule-map contract accepted by docs metadata derivation helpers. */\ntype RuleMap = Readonly<\n    Record<\n        TypefestRuleNamePattern,\n        TSESLint.RuleModule<string, Readonly<UnknownArray>>\n    >\n>;\n\n/**\n * Canonical docs contract required on every plugin rule.\n */\ntype TypefestRuleDocsContract = Readonly<{\n    description: string;\n    recommended: boolean;\n    requiresTypeChecking: boolean;\n    ruleId: string;\n    ruleNumber: number;\n    typefestConfigs:\n        | readonly TypefestConfigReference[]\n        | TypefestConfigReference;\n    url: string;\n}>;\n\nconst RULE_ID_PREFIX = \"R\" as const;\nconst RULE_ID_LENGTH = 4 as const;\nconst RULE_ID_DIGIT_START_INDEX = 1 as const;\nconst ASCII_ZERO_CODE_POINT = 48 as const;\nconst ASCII_NINE_CODE_POINT = 57 as const;\n\n/**\n * Guard dynamic rule ids to the canonical `R###` identifier contract.\n */\nconst isRuleIdInCanonicalFormat = (value: string): boolean => {\n    if (value.length !== RULE_ID_LENGTH || !value.startsWith(RULE_ID_PREFIX)) {\n        return false;\n    }\n\n    for (const character of value.slice(RULE_ID_DIGIT_START_INDEX)) {\n        const codePoint = character.codePointAt(0);\n\n        if (!isDefined(codePoint)) {\n            return false;\n        }\n\n        if (\n            codePoint < ASCII_ZERO_CODE_POINT ||\n            codePoint > ASCII_NINE_CODE_POINT\n        ) {\n            return false;\n        }\n    }\n\n    return true;\n};\n\n/**\n * Guard dynamic values to object-shaped records.\n */\nconst isUnknownRecord = (value: unknown): value is Readonly<UnknownRecord> =>\n    typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/**\n * Convert rule docs `typefestConfigs` into a normalized, deduped reference\n * list.\n */\nconst normalizeTypefestConfigReferences = (\n    ruleName: string,\n    typefestConfigs: TypefestRuleDocsContract[\"typefestConfigs\"]\n): readonly TypefestConfigReference[] => {\n    const candidates =\n        typeof typefestConfigs === \"string\"\n            ? [typefestConfigs]\n            : [...typefestConfigs];\n\n    const references: TypefestConfigReference[] = [];\n\n    for (const candidate of candidates) {\n        if (!isTypefestConfigReference(candidate)) {\n            throw new TypeError(\n                `Rule '${ruleName}' has invalid docs.typefestConfigs reference '${String(candidate)}'.`\n            );\n        }\n\n        if (arrayIncludes(references, candidate)) {\n            continue;\n        }\n\n        references.push(candidate);\n    }\n\n    if (isEmpty(references)) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare at least one docs.typefestConfigs reference.`\n        );\n    }\n\n    return references;\n};\n\n/**\n * Validate dynamic `meta.docs.typefestConfigs` values.\n */\nconst getRuleDocsTypefestConfigs = (\n    ruleName: string,\n    typefestConfigs: unknown\n): TypefestRuleDocsContract[\"typefestConfigs\"] => {\n    if (typeof typefestConfigs === \"string\") {\n        if (!isTypefestConfigReference(typefestConfigs)) {\n            throw new TypeError(\n                `Rule '${ruleName}' has invalid docs.typefestConfigs reference '${typefestConfigs}'.`\n            );\n        }\n\n        return typefestConfigs;\n    }\n\n    if (!Array.isArray(typefestConfigs)) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare docs.typefestConfigs as a preset reference or array.`\n        );\n    }\n\n    const normalizedTypefestConfigs: TypefestConfigReference[] = [];\n\n    for (const candidate of typefestConfigs) {\n        if (\n            typeof candidate !== \"string\" ||\n            !isTypefestConfigReference(candidate)\n        ) {\n            throw new TypeError(\n                `Rule '${ruleName}' has invalid docs.typefestConfigs reference '${String(candidate)}'.`\n            );\n        }\n\n        normalizedTypefestConfigs.push(candidate);\n    }\n\n    return normalizedTypefestConfigs;\n};\n\n/**\n * Validate and narrow dynamic `meta.docs` values to the plugin docs contract.\n */\nconst getRuleDocsContract = (\n    ruleName: string,\n    docs: unknown\n): TypefestRuleDocsContract => {\n    if (!isUnknownRecord(docs)) {\n        throw new TypeError(`Rule '${ruleName}' must declare meta.docs.`);\n    }\n\n    const description = docs[\"description\"];\n    const recommended = docs[\"recommended\"];\n    const requiresTypeChecking = docs[\"requiresTypeChecking\"];\n    const ruleId = docs[\"ruleId\"];\n    const ruleNumber = docs[\"ruleNumber\"];\n    const typefestConfigs = docs[\"typefestConfigs\"];\n    const url = docs[\"url\"];\n\n    if (typeof description !== \"string\" || description.trim().length === 0) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare a non-empty docs.description.`\n        );\n    }\n\n    if (typeof url !== \"string\" || url.trim().length === 0) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare a non-empty docs.url.`\n        );\n    }\n\n    const expectedRuleDocsUrl = createRuleDocsUrl(ruleName);\n    if (url !== expectedRuleDocsUrl) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare docs.url as '${expectedRuleDocsUrl}'.`\n        );\n    }\n\n    if (typeof recommended !== \"boolean\") {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare boolean docs.recommended.`\n        );\n    }\n\n    if (typeof requiresTypeChecking !== \"boolean\") {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare boolean docs.requiresTypeChecking.`\n        );\n    }\n\n    if (\n        typeof ruleId !== \"string\" ||\n        !isRuleIdInCanonicalFormat(ruleId) ||\n        ruleId.trim().length === 0\n    ) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare docs.ruleId using the 'R###' format.`\n        );\n    }\n\n    if (\n        typeof ruleNumber !== \"number\" ||\n        !isInteger(ruleNumber) ||\n        ruleNumber < 1\n    ) {\n        throw new TypeError(\n            `Rule '${ruleName}' must declare positive integer docs.ruleNumber.`\n        );\n    }\n\n    return {\n        description,\n        recommended,\n        requiresTypeChecking,\n        ruleId,\n        ruleNumber,\n        typefestConfigs: getRuleDocsTypefestConfigs(ruleName, typefestConfigs),\n        url,\n    };\n};\n\n/**\n * Derive normalized docs metadata for all plugin rules.\n */\nexport const deriveRuleDocsMetadataByName = (\n    rules: RuleMap\n): RuleDocsMetadataByName => {\n    const metadataByRuleName: Record<\n        TypefestRuleNamePattern,\n        RuleDocsMetadata\n    > = {};\n\n    for (const [ruleName, ruleModule] of objectEntries(rules)) {\n        const ruleDocs = getRuleDocsContract(ruleName, ruleModule.meta.docs);\n        const typefestConfigReferences = normalizeTypefestConfigReferences(\n            ruleName,\n            ruleDocs.typefestConfigs\n        );\n        const typefestConfigNames = typefestConfigReferences.map(\n            (reference) => typefestConfigReferenceToName[reference]\n        );\n\n        metadataByRuleName[ruleName] = {\n            description: ruleDocs.description,\n            recommended: ruleDocs.recommended,\n            requiresTypeChecking: ruleDocs.requiresTypeChecking,\n            ruleId: ruleDocs.ruleId,\n            ruleNumber: ruleDocs.ruleNumber,\n            typefestConfigNames,\n            typefestConfigReferences,\n            url: ruleDocs.url,\n        };\n    }\n\n    return metadataByRuleName;\n};\n\n/**\n * Derive a typed-rule set from normalized docs metadata.\n */\nexport const deriveTypeCheckedRuleNameSet = (\n    ruleDocsMetadataByName: RuleDocsMetadataByName\n): ReadonlySet<TypefestRuleNamePattern> => {\n    const ruleNames: TypefestRuleNamePattern[] = [];\n\n    for (const [ruleName, metadata] of objectEntries(ruleDocsMetadataByName)) {\n        if (!metadata.requiresTypeChecking) {\n            continue;\n        }\n\n        ruleNames.push(ruleName);\n    }\n\n    return new Set(ruleNames);\n};\n\n/**\n * Derive canonical preset-membership map from normalized docs metadata.\n */\nexport const deriveRulePresetMembershipByRuleName = (\n    ruleDocsMetadataByName: RuleDocsMetadataByName\n): Readonly<Record<TypefestRuleNamePattern, readonly TypefestConfigName[]>> => {\n    const membershipByRuleName: Record<\n        TypefestRuleNamePattern,\n        readonly TypefestConfigName[]\n    > = {};\n\n    for (const [ruleName, metadata] of objectEntries(ruleDocsMetadataByName)) {\n        membershipByRuleName[ruleName] = metadata.typefestConfigNames;\n    }\n\n    if (isEmpty(objectEntries(membershipByRuleName))) {\n        throw new TypeError(\n            \"Rule metadata derivation produced no membership entries.\"\n        );\n    }\n\n    return membershipByRuleName;\n};\n", "/**\n * @packageDocumentation\n * Canonical rule documentation URL helpers.\n */\n\n/** Stable docs host/prefix for generated rule docs links. */\nexport const RULE_DOCS_URL_BASE =\n    \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/\" as const;\n\n/**\n * Build the canonical documentation URL for one rule id.\n *\n * @param ruleName - Rule id (for example `prefer-ts-extras-array-at`).\n *\n * @returns Canonical docs URL for the rule page.\n */\nexport const createRuleDocsUrl = (ruleName: string): string =>\n    `${RULE_DOCS_URL_BASE}${ruleName}`;\n", "/**\n * @packageDocumentation\n * Shared typefest preset/config reference constants and type guards.\n */\nimport type { ArrayValues } from \"type-fest\";\n\nimport { objectHasOwn } from \"ts-extras\";\n\n/** Canonical flat-config preset keys exposed through `plugin.configs`. */\nexport const typefestConfigNames = [\n    \"all\",\n    \"experimental\",\n    \"minimal\",\n    \"recommended\",\n    \"recommended-type-checked\",\n    \"strict\",\n    \"ts-extras/type-guards\",\n    \"type-fest/types\",\n] as const;\n\n/** Metadata contract shared across preset wiring, docs, and README rendering. */\nexport type TypefestConfigMetadata = Readonly<{\n    icon: string;\n    presetName: `typefest:${TypefestConfigName}`;\n    readmeOrder: number;\n    requiresTypeChecking: boolean;\n}>;\n\n/** Canonical flat-config preset key type exposed through `plugin.configs`. */\nexport type TypefestConfigName = ArrayValues<typeof typefestConfigNames>;\n\n/**\n * Canonical metadata for every exported `typefest` preset key.\n *\n * @remarks\n * This is the single source of truth for:\n *\n * - Preset display order in generated README tables,\n * - Preset icon mapping,\n * - Preset runtime flat-config names, and\n * - Preset type-checking requirements.\n */\nexport const typefestConfigMetadataByName: Readonly<\n    Record<TypefestConfigName, TypefestConfigMetadata>\n> = {\n    all: {\n        icon: \"\uD83D\uDFE3\",\n        presetName: \"typefest:all\",\n        readmeOrder: 5,\n        requiresTypeChecking: true,\n    },\n    experimental: {\n        icon: \"\uD83E\uDDEA\",\n        presetName: \"typefest:experimental\",\n        readmeOrder: 6,\n        requiresTypeChecking: true,\n    },\n    minimal: {\n        icon: \"\uD83D\uDFE2\",\n        presetName: \"typefest:minimal\",\n        readmeOrder: 1,\n        requiresTypeChecking: false,\n    },\n    recommended: {\n        icon: \"\uD83D\uDFE1\",\n        presetName: \"typefest:recommended\",\n        readmeOrder: 2,\n        requiresTypeChecking: false,\n    },\n    \"recommended-type-checked\": {\n        icon: \"\uD83D\uDFE0\",\n        presetName: \"typefest:recommended-type-checked\",\n        readmeOrder: 3,\n        requiresTypeChecking: true,\n    },\n    strict: {\n        icon: \"\uD83D\uDD34\",\n        presetName: \"typefest:strict\",\n        readmeOrder: 4,\n        requiresTypeChecking: true,\n    },\n    \"ts-extras/type-guards\": {\n        icon: \"\u2734\uFE0F\",\n        presetName: \"typefest:ts-extras/type-guards\",\n        readmeOrder: 8,\n        requiresTypeChecking: true,\n    },\n    \"type-fest/types\": {\n        icon: \"\uD83D\uDCA0\",\n        presetName: \"typefest:type-fest/types\",\n        readmeOrder: 7,\n        requiresTypeChecking: false,\n    },\n};\n\n/** Stable README legend/rendering order for preset icons. */\nexport const typefestConfigNamesByReadmeOrder: readonly TypefestConfigName[] = [\n    \"minimal\",\n    \"recommended\",\n    \"recommended-type-checked\",\n    \"strict\",\n    \"all\",\n    \"experimental\",\n    \"type-fest/types\",\n    \"ts-extras/type-guards\",\n];\n\n/** Metadata references supported in `meta.docs.recommended`. */\nexport const typefestConfigReferenceToName: Readonly<{\n    \"typefest.configs.all\": \"all\";\n    \"typefest.configs.experimental\": \"experimental\";\n    \"typefest.configs.minimal\": \"minimal\";\n    \"typefest.configs.recommended\": \"recommended\";\n    \"typefest.configs.recommended-type-checked\": \"recommended-type-checked\";\n    \"typefest.configs.strict\": \"strict\";\n    \"typefest.configs.ts-extras/type-guards\": \"ts-extras/type-guards\";\n    \"typefest.configs.type-fest/types\": \"type-fest/types\";\n    'typefest.configs[\"recommended-type-checked\"]': \"recommended-type-checked\";\n    'typefest.configs[\"ts-extras/type-guards\"]': \"ts-extras/type-guards\";\n    'typefest.configs[\"type-fest/types\"]': \"type-fest/types\";\n}> = {\n    \"typefest.configs.all\": \"all\",\n    \"typefest.configs.experimental\": \"experimental\",\n    \"typefest.configs.minimal\": \"minimal\",\n    \"typefest.configs.recommended\": \"recommended\",\n    \"typefest.configs.recommended-type-checked\": \"recommended-type-checked\",\n    \"typefest.configs.strict\": \"strict\",\n    \"typefest.configs.ts-extras/type-guards\": \"ts-extras/type-guards\",\n    \"typefest.configs.type-fest/types\": \"type-fest/types\",\n    'typefest.configs[\"recommended-type-checked\"]': \"recommended-type-checked\",\n    'typefest.configs[\"ts-extras/type-guards\"]': \"ts-extras/type-guards\",\n    'typefest.configs[\"type-fest/types\"]': \"type-fest/types\",\n};\n\n/** Fully-qualified preset reference type accepted in docs metadata. */\nexport type TypefestConfigReference =\n    keyof typeof typefestConfigReferenceToName;\n\n/**\n * Check whether a string is a supported `meta.docs.recommended` reference.\n */\nexport const isTypefestConfigReference = (\n    value: string\n): value is TypefestConfigReference =>\n    objectHasOwn(typefestConfigReferenceToName, value);\n", "import type ts from \"typescript\";\n\nimport {\n    isTypeAnyType,\n    isTypeArrayTypeOrUnionOfArrayTypes,\n    isTypeUnknownType,\n} from \"@typescript-eslint/type-utils\";\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Helpers for determining whether expressions/types are array-like in typed\n * rule analysis.\n */\nimport { isDefined } from \"ts-extras\";\n\nimport { getParentNode } from \"./ast-node.js\";\nimport { getConstrainedTypeAtLocationWithFallback } from \"./constrained-type-at-location.js\";\nimport { safeTypeOperation } from \"./safe-type-operation.js\";\nimport { setContainsValue } from \"./set-membership.js\";\nimport {\n    getTypeCheckerApparentType,\n    getTypeCheckerBaseConstraintType,\n    getTypeCheckerIsArrayTypeResult,\n    getTypeCheckerIsTupleTypeResult,\n} from \"./type-checker-compat.js\";\nimport { recordTypedPathPrefilterEvaluation } from \"./typed-path-telemetry.js\";\n\n/**\n * Shared inputs required to evaluate whether an ESTree expression is array-like\n * using TypeScript type information.\n */\ninterface ArrayLikeExpressionCheckerOptions {\n    /**\n     * TypeScript checker instance used for type resolution.\n     */\n    readonly checker: ts.TypeChecker;\n\n    /**\n     * Parser services map for converting ESTree nodes to TypeScript nodes.\n     */\n    readonly parserServices: {\n        readonly esTreeNodeToTSNodeMap: {\n            readonly get: (key: Readonly<TSESTree.Node>) => ts.Node | undefined;\n        };\n    };\n\n    /**\n     * Optional file path used by telemetry counters.\n     */\n    readonly telemetryFilePath?: string;\n\n    /**\n     * How union members should be matched.\n     *\n     * Default: `\"some\"`.\n     */\n    readonly unionMatchMode?: UnionArrayLikeMatchMode;\n}\n\n/**\n * Determines how union member types are evaluated for array-likeness.\n */\ntype UnionArrayLikeMatchMode = \"every\" | \"some\";\n\nconst evaluateIsArrayLikeType = ({\n    candidateType,\n    checker,\n    resolutionCache,\n    seenTypes,\n    unionMatchMode,\n}: Readonly<{\n    candidateType: Readonly<ts.Type>;\n    checker: Readonly<ts.TypeChecker>;\n    resolutionCache: Map<Readonly<ts.Type>, boolean>;\n    seenTypes: Set<Readonly<ts.Type>>;\n    unionMatchMode: UnionArrayLikeMatchMode;\n}>): boolean => {\n    const cachedResult = resolutionCache.get(candidateType);\n\n    if (isDefined(cachedResult)) {\n        return cachedResult;\n    }\n\n    if (setContainsValue(seenTypes, candidateType)) {\n        return false;\n    }\n\n    seenTypes.add(candidateType);\n\n    if (isTypeAnyType(candidateType) || isTypeUnknownType(candidateType)) {\n        resolutionCache.set(candidateType, false);\n\n        return false;\n    }\n\n    if (isTypeArrayTypeOrUnionOfArrayTypes(candidateType, checker)) {\n        resolutionCache.set(candidateType, true);\n\n        return true;\n    }\n\n    if (\n        getTypeCheckerIsArrayTypeResult(checker, candidateType) === true ||\n        getTypeCheckerIsTupleTypeResult(checker, candidateType) === true\n    ) {\n        resolutionCache.set(candidateType, true);\n\n        return true;\n    }\n\n    if (candidateType.isUnion()) {\n        const isArrayLike =\n            unionMatchMode === \"every\"\n                ? candidateType.types.every((partType) =>\n                      evaluateIsArrayLikeType({\n                          candidateType: partType,\n                          checker,\n                          resolutionCache,\n                          seenTypes,\n                          unionMatchMode,\n                      })\n                  )\n                : candidateType.types.some((partType) =>\n                      evaluateIsArrayLikeType({\n                          candidateType: partType,\n                          checker,\n                          resolutionCache,\n                          seenTypes,\n                          unionMatchMode,\n                      })\n                  );\n\n        resolutionCache.set(candidateType, isArrayLike);\n\n        return isArrayLike;\n    }\n\n    if (candidateType.isIntersection()) {\n        const isArrayLike = candidateType.types.some((partType) =>\n            evaluateIsArrayLikeType({\n                candidateType: partType,\n                checker,\n                resolutionCache,\n                seenTypes,\n                unionMatchMode,\n            })\n        );\n\n        resolutionCache.set(candidateType, isArrayLike);\n\n        return isArrayLike;\n    }\n\n    const baseConstraint = getTypeCheckerBaseConstraintType(\n        checker,\n        candidateType\n    );\n    if (\n        isDefined(baseConstraint) &&\n        baseConstraint !== candidateType &&\n        evaluateIsArrayLikeType({\n            candidateType: baseConstraint,\n            checker,\n            resolutionCache,\n            seenTypes,\n            unionMatchMode,\n        })\n    ) {\n        resolutionCache.set(candidateType, true);\n\n        return true;\n    }\n\n    const apparentType = getTypeCheckerApparentType(checker, candidateType);\n    if (isDefined(apparentType) && apparentType !== candidateType) {\n        const isArrayLike = evaluateIsArrayLikeType({\n            candidateType: apparentType,\n            checker,\n            resolutionCache,\n            seenTypes,\n            unionMatchMode,\n        });\n\n        resolutionCache.set(candidateType, isArrayLike);\n\n        return isArrayLike;\n    }\n\n    resolutionCache.set(candidateType, false);\n\n    return false;\n};\n\n/**\n * Determine whether a TypeScript type resolves to an array-like shape.\n *\n * @param checker - Type checker used to inspect and unwrap candidate types.\n * @param type - Candidate type to evaluate.\n * @param unionMatchMode - Strategy for union members (`\"some\"` or `\"every\"`).\n *\n * @returns `true` when the candidate resolves to an array/tuple-like type.\n */\nexport const isArrayLikeType = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>,\n    unionMatchMode: UnionArrayLikeMatchMode = \"some\"\n): boolean =>\n    evaluateIsArrayLikeType({\n        candidateType: type,\n        checker,\n        resolutionCache: new Map<Readonly<ts.Type>, boolean>(),\n        seenTypes: new Set<Readonly<ts.Type>>(),\n        unionMatchMode,\n    });\n\nconst getArrayLikeExpressionPrefilterResult = (\n    expression: Readonly<TSESTree.Expression>\n): boolean | undefined => {\n    if (expression.type === AST_NODE_TYPES.ArrayExpression) {\n        return true;\n    }\n\n    if (\n        expression.type === AST_NODE_TYPES.TSAsExpression ||\n        expression.type === AST_NODE_TYPES.TSNonNullExpression ||\n        expression.type === AST_NODE_TYPES.TSSatisfiesExpression\n    ) {\n        return getArrayLikeExpressionPrefilterResult(expression.expression);\n    }\n\n    return undefined;\n};\n\n/**\n * Build a safe ESTree expression predicate for array-like type checks.\n *\n * @param options - Type checker and parser-service dependencies.\n *\n * @returns Function that returns `true` when the expression is array-like.\n */\nexport const createIsArrayLikeExpressionChecker = ({\n    checker,\n    parserServices,\n    telemetryFilePath,\n    unionMatchMode = \"some\",\n}: Readonly<ArrayLikeExpressionCheckerOptions>) => {\n    const arrayLikeTypeResolutionCache = new Map<Readonly<ts.Type>, boolean>();\n\n    return (expression: Readonly<TSESTree.Expression>): boolean => {\n        const prefilterResult =\n            getArrayLikeExpressionPrefilterResult(expression);\n\n        recordTypedPathPrefilterEvaluation({\n            filePath: telemetryFilePath,\n            prefilterHit: isDefined(prefilterResult),\n        });\n\n        if (isDefined(prefilterResult)) {\n            return prefilterResult;\n        }\n\n        const result = safeTypeOperation({\n            operation: () => {\n                const expressionType = getConstrainedTypeAtLocationWithFallback(\n                    checker,\n                    expression,\n                    parserServices,\n                    \"array-like-expression-type-resolution-failed\"\n                );\n\n                if (!isDefined(expressionType)) {\n                    return false;\n                }\n\n                return evaluateIsArrayLikeType({\n                    candidateType: expressionType,\n                    checker,\n                    resolutionCache: arrayLikeTypeResolutionCache,\n                    seenTypes: new Set<Readonly<ts.Type>>(),\n                    unionMatchMode,\n                });\n            },\n            reason: \"array-like-expression-check-failed\",\n        });\n\n        if (!result.ok) {\n            return false;\n        }\n\n        return result.value;\n    };\n};\n\n/**\n * Check whether a member expression is used as a write target.\n *\n * @param node - Member expression candidate.\n *\n * @returns `true` for assignment LHS, `delete` target, or update operand.\n */\nexport const isWriteTargetMemberExpression = (\n    node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n    const parentNode = getParentNode(node);\n\n    if (parentNode === undefined) {\n        return false;\n    }\n\n    if (parentNode.type === AST_NODE_TYPES.AssignmentExpression) {\n        return parentNode.left === node;\n    }\n\n    if (parentNode.type === AST_NODE_TYPES.UnaryExpression) {\n        return parentNode.operator === \"delete\";\n    }\n\n    if (parentNode.type === AST_NODE_TYPES.UpdateExpression) {\n        return parentNode.argument === node;\n    }\n\n    return false;\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * AST parent-chain traversal helpers used by multiple rule utilities.\n */\nimport { keyIn } from \"ts-extras\";\n\nimport { resolveFirstValueInLinkedStructure } from \"./cycle-safe-linked-search.js\";\n\n/**\n * AST node shape that may carry a parser-populated `parent` reference.\n */\ntype NodeWithOptionalParent = Readonly<TSESTree.Node> & {\n    parent?: Readonly<TSESTree.Node>;\n};\n\n/**\n * Determine whether a node exposes an optional `parent` property.\n */\nconst hasOptionalParentProperty = (\n    node: Readonly<TSESTree.Node>\n): node is NodeWithOptionalParent => keyIn(node, \"parent\");\n\n/**\n * Gets a node's parent reference when available.\n *\n * @param node - AST node whose parent should be read.\n *\n * @returns Parent node when present on parser output; otherwise `undefined`.\n */\nexport const getParentNode = (\n    node: Readonly<TSESTree.Node>\n): Readonly<TSESTree.Node> | undefined =>\n    hasOptionalParentProperty(node) ? node.parent : undefined;\n\n/**\n * Walks the parent chain to locate the enclosing `Program` node.\n *\n * @param node - Starting AST node.\n *\n * @returns Nearest enclosing `Program` node; otherwise `null` when no program\n *   boundary can be reached (including cycle-guard termination).\n */\nexport const getProgramNode = (\n    node: Readonly<TSESTree.Node>\n): null | Readonly<TSESTree.Program> => {\n    const lookupResult = resolveFirstValueInLinkedStructure<\n        Readonly<TSESTree.Node>,\n        Readonly<TSESTree.Program>\n    >({\n        getNextNode: (\n            currentNode: Readonly<TSESTree.Node>\n        ): null | Readonly<TSESTree.Node> => getParentNode(currentNode) ?? null,\n        resolveValue: (currentNode: Readonly<TSESTree.Node>) =>\n            currentNode.type === AST_NODE_TYPES.Program\n                ? {\n                      found: true,\n                      value: currentNode,\n                  }\n                : {\n                      found: false,\n                  },\n        startNode: node,\n    });\n\n    return lookupResult.found ? lookupResult.value : null;\n};\n", "/**\n * @packageDocumentation\n * Shared Floyd-cycle-guarded linked-structure traversal utilities.\n */\n\n/**\n * Result shape returned by linked-structure searches.\n */\nexport type LinkedStructureLookupResult<Value> =\n    | Readonly<{\n          found: false;\n      }>\n    | Readonly<{\n          found: true;\n          value: Value;\n      }>;\n\n/**\n * Fast-pointer hop count per iteration for Floyd cycle detection.\n */\nconst FLOYD_FAST_POINTER_ADVANCE_STEPS = 2 as const;\n\n/**\n * Resolve the first matching value while traversing a linked structure.\n *\n * @param options - Linked-structure traversal options.\n *\n *   - `startNode`: Initial node to inspect.\n *   - `getNextNode`: Function that returns the next node in the chain.\n *   - `resolveValue`: Function that returns a lookup result for the current node.\n *\n * @returns Lookup result for the first resolved value; otherwise a non-matching\n *   lookup result when traversal reaches the chain end or detects a\n *   parent-cycle.\n */\nexport const resolveFirstValueInLinkedStructure = <Node, Value>({\n    getNextNode,\n    resolveValue,\n    startNode,\n}: Readonly<{\n    getNextNode: (node: Node) => Node | null;\n    resolveValue: (node: Node) => LinkedStructureLookupResult<Value>;\n    startNode: Node | null;\n}>): LinkedStructureLookupResult<Value> => {\n    let slowNode = startNode;\n    let fastNode = startNode;\n\n    while (slowNode !== null) {\n        const resolvedValue = resolveValue(slowNode);\n\n        if (resolvedValue.found) {\n            return resolvedValue;\n        }\n\n        slowNode = getNextNode(slowNode);\n\n        for (let step = 0; step < FLOYD_FAST_POINTER_ADVANCE_STEPS; step += 1) {\n            if (fastNode === null) {\n                break;\n            }\n\n            fastNode = getNextNode(fastNode);\n        }\n\n        if (slowNode !== null && fastNode !== null && slowNode === fastNode) {\n            return {\n                found: false,\n            };\n        }\n    }\n\n    return {\n        found: false,\n    };\n};\n\n/**\n * Check whether any node in a linked structure satisfies a predicate.\n *\n * @param options - Linked-structure traversal options.\n *\n *   - `startNode`: Initial node to inspect.\n *   - `getNextNode`: Function that returns the next node in the chain.\n *   - `isMatch`: Predicate used to test each visited node.\n *\n * @returns `true` when any visited node matches; otherwise `false`.\n */\nexport const isAnyLinkedStructureNodeMatching = <Node>({\n    getNextNode,\n    isMatch,\n    startNode,\n}: Readonly<{\n    getNextNode: (node: Node) => Node | null;\n    isMatch: (node: Node) => boolean;\n    startNode: Node | null;\n}>): boolean =>\n    resolveFirstValueInLinkedStructure({\n        getNextNode,\n        resolveValue: (node): LinkedStructureLookupResult<boolean> =>\n            isMatch(node)\n                ? {\n                      found: true,\n                      value: true,\n                  }\n                : {\n                      found: false,\n                  },\n        startNode,\n    }).found;\n", "/**\n * @packageDocumentation\n * Resolve constrained TypeScript types from ESTree nodes with resilient\n * fallbacks for partially mocked parser-services in tests.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\nimport type ts from \"typescript\";\n\nimport { getConstrainedTypeAtLocation } from \"@typescript-eslint/type-utils\";\nimport { isDefined, safeCastTo } from \"ts-extras\";\n\nimport { safeTypeOperation } from \"./safe-type-operation.js\";\nimport { getTypeCheckerBaseConstraintType } from \"./type-checker-compat.js\";\nimport {\n    recordTypedPathExpensiveTypeCall,\n    recordTypedPathFallbackInvocation,\n} from \"./typed-path-telemetry.js\";\n\ntype ConstrainedTypeParserServices = Readonly<{\n    esTreeNodeToTSNodeMap: Readonly<{\n        get: (key: Readonly<TSESTree.Node>) => ts.Node | undefined;\n    }>;\n    getTypeAtLocation?: (\n        node: Readonly<TSESTree.Node>\n    ) => Readonly<ts.Type> | ts.Type;\n    program?: null | Readonly<{\n        getTypeChecker: () => ts.TypeChecker;\n    }>;\n}>;\n\n/**\n * Resolve a node type using `getConstrainedTypeAtLocation` when available, then\n * fall back to checker + node-map based resolution.\n *\n * @param checker - Type checker used for fallback type lookups.\n * @param node - ESTree node whose type should be resolved.\n * @param parserServices - Parser services with node mapping and optional typed\n *   helpers.\n * @param reason - Stable diagnostics reason fragment for safe-type wrappers.\n *\n * @returns The constrained type when resolvable; otherwise `undefined`.\n */\nexport const getConstrainedTypeAtLocationWithFallback = (\n    checker: Readonly<ts.TypeChecker>,\n    node: Readonly<TSESTree.Node>,\n    parserServices: ConstrainedTypeParserServices,\n    reason: string\n): ts.Type | undefined => {\n    const mappedTsNode = parserServices.esTreeNodeToTSNodeMap.get(node);\n    const telemetryFilePathResult = safeTypeOperation({\n        operation: () =>\n            isDefined(mappedTsNode)\n                ? mappedTsNode.getSourceFile().fileName\n                : undefined,\n        reason: \"constrained-type-telemetry-file-path-resolution-failed\",\n    });\n    const telemetryFilePath = telemetryFilePathResult.ok\n        ? telemetryFilePathResult.value\n        : undefined;\n\n    recordTypedPathExpensiveTypeCall(telemetryFilePath);\n\n    const constrainedTypeResult = safeTypeOperation({\n        operation: () => {\n            if (\n                typeof parserServices.getTypeAtLocation !== \"function\" ||\n                !isDefined(parserServices.program)\n            ) {\n                return null;\n            }\n\n            return getConstrainedTypeAtLocation(\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Runtime guards above verify the parser-services members required before calling the type-utils helper.\n                parserServices as Parameters<\n                    typeof getConstrainedTypeAtLocation\n                >[0],\n                safeCastTo(node)\n            );\n        },\n        reason: `${reason}-constrained`,\n    });\n\n    if (\n        constrainedTypeResult.ok &&\n        constrainedTypeResult.value !== null &&\n        isDefined(constrainedTypeResult.value)\n    ) {\n        return constrainedTypeResult.value;\n    }\n\n    recordTypedPathFallbackInvocation(telemetryFilePath);\n\n    const fallbackTypeResult = safeTypeOperation({\n        operation: () => {\n            const tsNode = mappedTsNode;\n\n            if (!isDefined(tsNode)) {\n                return null;\n            }\n\n            const rawType = checker.getTypeAtLocation(tsNode);\n            const constrainedType = getTypeCheckerBaseConstraintType(\n                checker,\n                rawType\n            );\n\n            return constrainedType ?? rawType;\n        },\n        reason: `${reason}-fallback`,\n    });\n\n    if (!fallbackTypeResult.ok || fallbackTypeResult.value === null) {\n        return undefined;\n    }\n\n    return fallbackTypeResult.value;\n};\n", "/**\n * @packageDocumentation\n * Structured error handling for best-effort typed AST operations.\n */\n\n/**\n * Counter contract used by test-time debug instrumentation.\n */\nexport type SafeTypeOperationCounter<Reason extends string> = Readonly<{\n    getSnapshot: () => ReadonlyMap<Reason, number>;\n    onFailure: (\n        failure: Readonly<{\n            error: unknown;\n            reason: Reason;\n        }>\n    ) => void;\n}>;\n\n/**\n * Failure payload emitted when a safe typed operation throws.\n */\nexport type SafeTypeOperationFailure<Reason extends string> = Readonly<{\n    error: unknown;\n    reason: Reason;\n}>;\n\n/**\n * Optional observer called whenever an operation fails.\n */\nexport type SafeTypeOperationFailureObserver<Reason extends string> = (\n    failure: Readonly<SafeTypeOperationFailure<Reason>>\n) => void;\n\n/**\n * Failure payload emitted when an observer itself throws.\n */\nexport type SafeTypeOperationObserverFailure<Reason extends string> = Readonly<{\n    failure: Readonly<SafeTypeOperationFailure<Reason>>;\n    observerError: unknown;\n    observerKind: \"global\" | \"local\";\n}>;\n\n/**\n * Optional observer called when an operation failure observer throws.\n */\nexport type SafeTypeOperationObserverFailureObserver<Reason extends string> = (\n    failure: Readonly<SafeTypeOperationObserverFailure<Reason>>\n) => void;\n\n/**\n * Shared observer set for operation failures across rule modules.\n *\n * @remarks\n * Observers are intentionally process-local and opt-in; they exist for\n * diagnostics and test instrumentation only.\n */\nconst safeTypeOperationFailureObservers = new Set<\n    SafeTypeOperationFailureObserver<string>\n>();\n\n/**\n * Shared observer set for local/global observer failures.\n */\nconst safeTypeOperationObserverFailureObservers = new Set<\n    SafeTypeOperationObserverFailureObserver<string>\n>();\n\n/**\n * Notify all registered observer-failure observers.\n *\n * @param failure - Observer-failure payload.\n */\nconst notifySafeTypeOperationObserverFailureObservers = (\n    failure: Readonly<SafeTypeOperationObserverFailure<string>>\n): void => {\n    for (const observer of safeTypeOperationObserverFailureObservers) {\n        try {\n            observer(failure);\n        } catch {\n            // Observer-failure observers are diagnostics only; never rethrow.\n        }\n    }\n};\n\n/**\n * Notify all registered global failure observers.\n *\n * @param failure - Failure payload emitted by a typed operation.\n */\nconst notifySafeTypeOperationFailureObservers = (\n    failure: Readonly<SafeTypeOperationFailure<string>>\n): void => {\n    for (const observer of safeTypeOperationFailureObservers) {\n        try {\n            observer(failure);\n        } catch (observerError: unknown) {\n            notifySafeTypeOperationObserverFailureObservers({\n                failure,\n                observerError,\n                observerKind: \"global\",\n            });\n        }\n    }\n};\n\n/**\n * Register a process-local observer for observer failures.\n *\n * @param observer - Callback invoked when a local/global failure observer\n *   throws.\n *\n * @returns Unsubscribe callback to remove the observer.\n */\nexport const registerSafeTypeOperationObserverFailureObserver = (\n    observer: SafeTypeOperationObserverFailureObserver<string>\n): (() => void) => {\n    safeTypeOperationObserverFailureObservers.add(observer);\n\n    return () => {\n        safeTypeOperationObserverFailureObservers.delete(observer);\n    };\n};\n\n/**\n * Register a process-local failure observer for typed operations.\n *\n * @param observer - Callback invoked for each operation failure.\n *\n * @returns Unsubscribe callback to remove the observer.\n */\nexport const registerSafeTypeOperationFailureObserver = (\n    observer: SafeTypeOperationFailureObserver<string>\n): (() => void) => {\n    safeTypeOperationFailureObservers.add(observer);\n\n    return () => {\n        safeTypeOperationFailureObservers.delete(observer);\n    };\n};\n\n/**\n * Run one operation with a scoped failure observer that is always cleaned up.\n *\n * @param observer - Observer registered for the operation scope.\n * @param operation - Synchronous operation to execute while observing failures.\n *\n * @returns Return value produced by `operation`.\n */\nexport const withSafeTypeOperationFailureObserver = <Result>(\n    observer: SafeTypeOperationFailureObserver<string>,\n    operation: () => Result\n): Result => {\n    const unsubscribe = registerSafeTypeOperationFailureObserver(observer);\n\n    try {\n        return operation();\n    } finally {\n        unsubscribe();\n    }\n};\n\n/**\n * Result shape for safe typed operations.\n */\nexport type SafeTypeOperationResult<Result, Reason extends string> =\n    | Readonly<{\n          failure: SafeTypeOperationFailure<Reason>;\n          ok: false;\n      }>\n    | Readonly<{\n          ok: true;\n          value: Result;\n      }>;\n\n/**\n * Execute a typed operation with structured failure output instead of throws.\n */\nexport const safeTypeOperation = <Result, Reason extends string>({\n    onFailure,\n    operation,\n    reason,\n}: Readonly<{\n    onFailure?: SafeTypeOperationFailureObserver<Reason>;\n    operation: () => Result;\n    reason: Reason;\n}>): SafeTypeOperationResult<Result, Reason> => {\n    try {\n        return {\n            ok: true,\n            value: operation(),\n        };\n    } catch (error: unknown) {\n        const failure: SafeTypeOperationFailure<Reason> = {\n            error,\n            reason,\n        };\n\n        try {\n            onFailure?.(failure);\n        } catch (observerError: unknown) {\n            notifySafeTypeOperationObserverFailureObservers({\n                failure,\n                observerError,\n                observerKind: \"local\",\n            });\n        }\n\n        notifySafeTypeOperationFailureObservers(failure);\n\n        return {\n            failure,\n            ok: false,\n        };\n    }\n};\n\n/**\n * Build a lightweight reason counter for debugging operation failures in tests.\n *\n * @param reasonsForTypeInference - Optional typed reason literals used to infer\n *   the `Reason` generic without requiring explicit type parameters.\n */\nexport const createSafeTypeOperationCounter = <Reason extends string = never>(\n    reasonsForTypeInference: readonly Reason[] = []\n): SafeTypeOperationCounter<Reason> => {\n    const counts = new Map<Reason, number>();\n\n    for (const reason of reasonsForTypeInference) {\n        counts.set(reason, counts.get(reason) ?? 0);\n    }\n\n    const onFailure: SafeTypeOperationFailureObserver<Reason> = (failure) => {\n        const previousCount = counts.get(failure.reason) ?? 0;\n        counts.set(failure.reason, previousCount + 1);\n    };\n\n    return {\n        getSnapshot: (): ReadonlyMap<Reason, number> => new Map(counts),\n        onFailure,\n    };\n};\n", "/**\n * @packageDocumentation\n * Compatibility wrappers for optional TypeScript TypeChecker APIs.\n */\nimport type { UnknownArray } from \"type-fest\";\nimport type ts from \"typescript\";\n\nimport { isTypeReferenceType } from \"@typescript-eslint/type-utils\";\n\ntype TypeCheckerMethod<Result> = (\n    this: Readonly<ts.TypeChecker>,\n    ...arguments_: Readonly<UnknownArray>\n) => Result;\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- The result type models optional TypeChecker APIs whose return types vary by method name.\nconst callTypeCheckerMethod = <Result>(\n    checker: Readonly<ts.TypeChecker>,\n    methodName: string,\n    ...arguments_: Readonly<UnknownArray>\n): Result | undefined => {\n    const method: unknown = Reflect.get(checker, methodName);\n\n    if (typeof method !== \"function\") {\n        return undefined;\n    }\n\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Optional checker APIs are verified as functions before invoking with the known checker receiver.\n    const typedMethod = method as TypeCheckerMethod<Result>;\n\n    return typedMethod.apply(checker, [...arguments_]);\n};\n\n/**\n * Read `checker.getApparentType` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Apparent type when available; otherwise `undefined`.\n */\nexport const getTypeCheckerApparentType = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): ts.Type | undefined =>\n    callTypeCheckerMethod<ts.Type>(checker, \"getApparentType\", type);\n\n/**\n * Read `checker.getBaseTypes` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Base types when available; otherwise `undefined`.\n */\nexport const getTypeCheckerBaseTypes = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): readonly ts.BaseType[] | undefined =>\n    callTypeCheckerMethod<readonly ts.BaseType[]>(\n        checker,\n        \"getBaseTypes\",\n        type\n    );\n\n/**\n * Read `checker.getStringType` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n *\n * @returns Primitive string type when available; otherwise `undefined`.\n */\nexport const getTypeCheckerStringType = (\n    checker: Readonly<ts.TypeChecker>\n): ts.Type | undefined =>\n    callTypeCheckerMethod<ts.Type>(checker, \"getStringType\");\n\n/**\n * Read `checker.isTypeAssignableTo` when the host TypeScript version provides\n * it.\n *\n * @param checker - TypeScript type checker.\n * @param source - Candidate source type.\n * @param target - Candidate target type.\n *\n * @returns Assignability result when available; otherwise `undefined`.\n */\nexport const getTypeCheckerIsTypeAssignableToResult = (\n    checker: Readonly<ts.TypeChecker>,\n    source: Readonly<ts.Type>,\n    target: Readonly<ts.Type>\n): boolean | undefined =>\n    callTypeCheckerMethod<boolean>(\n        checker,\n        \"isTypeAssignableTo\",\n        source,\n        target\n    );\n\n/**\n * Read `checker.getBaseConstraintOfType` when the host TypeScript version\n * provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Base-constraint type when available; otherwise `undefined`.\n */\nexport const getTypeCheckerBaseConstraintType = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): ts.Type | undefined =>\n    callTypeCheckerMethod<ts.Type>(checker, \"getBaseConstraintOfType\", type);\n\n/**\n * Read `checker.isArrayType` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Array-type result when available; otherwise `undefined`.\n */\nexport const getTypeCheckerIsArrayTypeResult = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): boolean | undefined =>\n    callTypeCheckerMethod<boolean>(checker, \"isArrayType\", type);\n\n/**\n * Read `checker.isTupleType` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Tuple-type result when available; otherwise `undefined`.\n */\nexport const getTypeCheckerIsTupleTypeResult = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): boolean | undefined =>\n    callTypeCheckerMethod<boolean>(checker, \"isTupleType\", type);\n\n/**\n * Read `checker.getTypeArguments` when the host TypeScript version provides it.\n *\n * @param checker - TypeScript type checker.\n * @param type - Candidate type.\n *\n * @returns Type arguments when available; otherwise `undefined`.\n */\nexport const getTypeCheckerTypeArguments = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): readonly ts.Type[] | undefined => {\n    if (!isTypeReferenceType(type)) {\n        return undefined;\n    }\n\n    return callTypeCheckerMethod<readonly ts.Type[]>(\n        checker,\n        \"getTypeArguments\",\n        type\n    );\n};\n", "/**\n * @remarks\n * Counters are intentionally process-local and best-effort. They are designed\n * for benchmarks/tests, not for user-facing diagnostics.\n *\n * @packageDocumentation\n * Lightweight runtime telemetry for typed-rule hot paths.\n */\nimport { isDefined } from \"ts-extras\";\n\n/** Immutable typed-path counter view exposed to consumers. */\nexport type TypedPathCounters = Readonly<{\n    expensiveTypeCalls: number;\n    fallbackInvocations: number;\n    prefilterChecks: number;\n    prefilterHits: number;\n}>;\n\n/**\n * Point-in-time telemetry snapshot grouped by file path.\n */\nexport type TypedPathTelemetrySnapshot = Readonly<{\n    files: readonly Readonly<{\n        counters: TypedPathCounters;\n        filePath: string;\n    }>[];\n    totals: Readonly<\n        TypedPathCounters & {\n            averageExpensiveCallsPerFileInput: Readonly<{\n                expensiveTypeCalls: number;\n                fileCount: number;\n            }>;\n            fallbackInvocationRateInput: Readonly<{\n                expensiveTypeCalls: number;\n                fallbackInvocations: number;\n            }>;\n            fileCount: number;\n            prefilterHitRateInput: Readonly<{\n                prefilterChecks: number;\n                prefilterHits: number;\n            }>;\n        }\n    >;\n}>;\n\ninterface MutableTypedPathCounters {\n    expensiveTypeCalls: number;\n    fallbackInvocations: number;\n    prefilterChecks: number;\n    prefilterHits: number;\n}\n\nconst UNKNOWN_FILE_PATH = \"<unknown>\" as const;\n\nconst typedPathCountersByFilePath = new Map<string, MutableTypedPathCounters>();\n\nconst createEmptyCounters = (): MutableTypedPathCounters => ({\n    expensiveTypeCalls: 0,\n    fallbackInvocations: 0,\n    prefilterChecks: 0,\n    prefilterHits: 0,\n});\n\nconst normalizeTelemetryFilePath = (\n    filePath: null | string | undefined\n): string => {\n    if (typeof filePath !== \"string\") {\n        return UNKNOWN_FILE_PATH;\n    }\n\n    const trimmedPath = filePath.trim();\n\n    return trimmedPath.length > 0 ? trimmedPath : UNKNOWN_FILE_PATH;\n};\n\nconst getCountersForFilePath = (\n    filePath: null | string | undefined\n): MutableTypedPathCounters => {\n    const normalizedFilePath = normalizeTelemetryFilePath(filePath);\n    const existingCounters =\n        typedPathCountersByFilePath.get(normalizedFilePath);\n\n    if (isDefined(existingCounters)) {\n        return existingCounters;\n    }\n\n    const createdCounters = createEmptyCounters();\n\n    typedPathCountersByFilePath.set(normalizedFilePath, createdCounters);\n\n    return createdCounters;\n};\n\n/**\n * Record one prefilter evaluation.\n *\n * @param options - Telemetry file key plus whether prefilter short-circuited.\n */\nexport const recordTypedPathPrefilterEvaluation = ({\n    filePath,\n    prefilterHit,\n}: Readonly<{\n    filePath: null | string | undefined;\n    prefilterHit: boolean;\n}>): void => {\n    const counters = getCountersForFilePath(filePath);\n\n    counters.prefilterChecks += 1;\n\n    if (prefilterHit) {\n        counters.prefilterHits += 1;\n    }\n};\n\n/**\n * Record one expensive type-resolution invocation.\n */\nexport const recordTypedPathExpensiveTypeCall = (\n    filePath: null | string | undefined\n): void => {\n    const counters = getCountersForFilePath(filePath);\n\n    counters.expensiveTypeCalls += 1;\n};\n\n/**\n * Record one fallback invocation after constrained resolution was unavailable\n * or failed.\n */\nexport const recordTypedPathFallbackInvocation = (\n    filePath: null | string | undefined\n): void => {\n    const counters = getCountersForFilePath(filePath);\n\n    counters.fallbackInvocations += 1;\n};\n\n/**\n * Read a deterministic telemetry snapshot for assertions and profiling.\n */\nexport const getTypedPathTelemetrySnapshot = (): TypedPathTelemetrySnapshot => {\n    const sortedEntries = [...typedPathCountersByFilePath.entries()];\n\n    sortedEntries.sort(([leftPath], [rightPath]) =>\n        leftPath.localeCompare(rightPath)\n    );\n\n    const files: Readonly<{\n        counters: TypedPathCounters;\n        filePath: string;\n    }>[] = [];\n    const totals = createEmptyCounters();\n\n    for (const [filePath, counters] of sortedEntries) {\n        const immutableCounters: TypedPathCounters = Object.freeze({\n            expensiveTypeCalls: counters.expensiveTypeCalls,\n            fallbackInvocations: counters.fallbackInvocations,\n            prefilterChecks: counters.prefilterChecks,\n            prefilterHits: counters.prefilterHits,\n        });\n\n        files.push(\n            Object.freeze({\n                counters: immutableCounters,\n                filePath,\n            })\n        );\n\n        totals.expensiveTypeCalls += immutableCounters.expensiveTypeCalls;\n        totals.fallbackInvocations += immutableCounters.fallbackInvocations;\n        totals.prefilterChecks += immutableCounters.prefilterChecks;\n        totals.prefilterHits += immutableCounters.prefilterHits;\n    }\n\n    const frozenFiles = Object.freeze([...files]);\n    const fileCount = frozenFiles.length;\n\n    return {\n        files: frozenFiles,\n        totals: Object.freeze({\n            ...totals,\n            averageExpensiveCallsPerFileInput: Object.freeze({\n                expensiveTypeCalls: totals.expensiveTypeCalls,\n                fileCount,\n            }),\n            fallbackInvocationRateInput: Object.freeze({\n                expensiveTypeCalls: totals.expensiveTypeCalls,\n                fallbackInvocations: totals.fallbackInvocations,\n            }),\n            fileCount,\n            prefilterHitRateInput: Object.freeze({\n                prefilterChecks: totals.prefilterChecks,\n                prefilterHits: totals.prefilterHits,\n            }),\n        }),\n    };\n};\n\n/**\n * Clear all process-local telemetry counters.\n */\nexport const resetTypedPathTelemetry = (): void => {\n    typedPathCountersByFilePath.clear();\n};\n", "/**\n * @packageDocumentation\n * Shared helpers for explicit boolean Set membership checks.\n */\nimport { setHas } from \"ts-extras\";\n\n/**\n * Check whether a Set contains a candidate value while intentionally exposing\n * only plain-boolean semantics at call sites.\n */\nexport const setContainsValue = <Type>(\n    set: ReadonlySet<Type>,\n    item: Type\n): boolean => setHas(set, item);\n", "import type { UnknownArray } from \"type-fest\";\n\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Utilities for collecting and safely resolving direct named value imports.\n */\nimport { arrayJoin, setHas } from \"ts-extras\";\n\nimport {\n    collectNamedImportLocalNamesByImportedNameFromSource,\n    isImportDeclarationFromSource,\n} from \"./import-analysis.js\";\nimport {\n    type AutofixImportInsertionStrategy,\n    createImportAwareFixes,\n} from \"./import-aware-fixes.js\";\nimport {\n    type ImportFixIntent,\n    type ImportInsertionDecision,\n    resolveImportInsertionDecisionForReportFix,\n} from \"./import-fix-coordinator.js\";\nimport { createImportInsertionFix } from \"./import-insertion.js\";\nimport { getScopeFromContextSourceCode } from \"./scope-resolution.js\";\nimport { getVariableInScopeChain } from \"./scope-variable.js\";\n\n/**\n * Immutable mapping of imported symbol names to directly imported local\n * aliases.\n */\nexport type ImportedValueAliasMap = ReadonlyMap<string, ReadonlySet<string>>;\n\n/**\n * Parameters for creating a safe member-expression to function-call fixer.\n */\ntype MemberToFunctionCallFixParams = Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    memberNode: TSESTree.MemberExpression;\n    reportFixIntent?: ImportFixIntent;\n    sourceModuleName: string;\n}>;\n\nconst isImportBindingDefinition = (\n    definition: Readonly<TSESLint.Scope.Definition>\n): boolean =>\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison -- Scope manager exposes string literal discriminator values.\n    definition.type === \"ImportBinding\";\n\n/**\n * Parameters for creating a safe method-call to function-call fixer.\n */\ntype MethodToFunctionCallFixParams = Readonly<{\n    callNode: TSESTree.CallExpression;\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    reportFixIntent?: ImportFixIntent;\n    sourceModuleName: string;\n}>;\n\n/**\n * Parameters for resolving a safe local alias for an imported value symbol.\n */\ntype SafeImportedValueNameParams = Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    referenceNode: TSESTree.Node;\n    sourceModuleName: string;\n}>;\n\n/**\n * Parameters for creating a safe replacement fixer with custom replacement text\n * derived from the resolved helper local name.\n */\ntype SafeValueNodeTextReplacementFixParams = Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    replacementTextFactory: (replacementName: string) => string;\n    reportFixIntent?: ImportFixIntent;\n    sourceModuleName: string;\n    targetNode: TSESTree.Node;\n}>;\n\n/**\n * Parameters for creating a safe replacement fixer for a value reference.\n */\ntype SafeValueReplacementFixParams = Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    reportFixIntent?: ImportFixIntent;\n    sourceModuleName: string;\n    targetNode: TSESTree.Node;\n}>;\n\n/** Scope-chain root used for local-variable resolution helpers. */\ntype ScopeChainRoot = Readonly<null | Readonly<TSESLint.Scope.Scope>>;\n\n/**\n * Parameters for creating a safe function-call replacement fixer.\n */\ntype ValueArgumentFunctionCallFixParams = Readonly<{\n    argumentNode: TSESTree.Node;\n    autofixImportInsertionStrategy?: AutofixImportInsertionStrategy;\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    negated?: boolean;\n    reportFixIntent?: ImportFixIntent;\n    sourceModuleName: string;\n    targetNode: TSESTree.Node;\n}>;\n\n/**\n * Resolved import-planning metadata reused across value-fixer factories.\n */\ntype ValueReplacementPlan = Readonly<{\n    importInsertionDecision: ImportInsertionDecision;\n    replacementNameAndImportFixFactory: Readonly<{\n        createImportFix: (\n            fixer: Readonly<TSESLint.RuleFixer>\n        ) => null | TSESLint.RuleFix;\n        replacementName: string;\n        requiresImportInsertion: boolean;\n    }>;\n    reportFixIntent: ImportFixIntent;\n}>;\n\nconst getImportDeclarationParent = (\n    node: Readonly<TSESTree.Node>\n): null | Readonly<TSESTree.ImportDeclaration> => {\n    const nodeParent = node.parent;\n\n    if (nodeParent?.type !== AST_NODE_TYPES.ImportDeclaration) {\n        return null;\n    }\n\n    return nodeParent;\n};\n\nconst getFirstImportedAliasName = ({\n    importedName,\n    imports,\n}: Readonly<{\n    importedName: string;\n    imports: ImportedValueAliasMap;\n}>): null | string => {\n    const candidateNames = imports.get(importedName);\n\n    if (!candidateNames || candidateNames.size === 0) {\n        return null;\n    }\n\n    if (setHas(candidateNames, importedName)) {\n        return importedName;\n    }\n\n    const [firstCandidateName] = candidateNames;\n\n    return firstCandidateName ?? null;\n};\n\nconst resolveReferenceScope = ({\n    context,\n    referenceNode,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    referenceNode: Readonly<TSESTree.Node>;\n}>): ScopeChainRoot => getScopeFromContextSourceCode(context, referenceNode);\n\n/**\n * Coordination decision used when import insertion is not required.\n */\nconst NO_IMPORT_INSERTION_NEEDED_DECISION: ImportInsertionDecision = {\n    allowReplacementWithoutImportInsertion: true,\n    shouldIncludeImportInsertionFix: false,\n};\n\n/**\n * Collect direct named value imports from a specific module.\n *\n * @param sourceCode - Source code object for the current file.\n * @param sourceModuleName - Module source string to match.\n *\n * @returns Readonly map of imported symbol names to local aliases.\n */\nexport const collectDirectNamedValueImportsFromSource = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    sourceModuleName: string\n): ImportedValueAliasMap =>\n    collectNamedImportLocalNamesByImportedNameFromSource({\n        allowTypeImportDeclaration: false,\n        allowTypeImportSpecifier: false,\n        sourceCode,\n        sourceModuleName,\n    });\n\n/**\n * Verify that a local identifier resolves to an import binding from the\n * expected module at a specific reference location.\n *\n * @param sourceScope - Scope chain root used to resolve the local name.\n * @param localName - Candidate local alias name.\n * @param sourceModuleName - Expected source module for the import binding.\n *\n * @returns `true` when the resolved local name is a matching import binding\n *   from the expected module.\n */\nfunction isLocalNameBoundToExpectedImport(\n    sourceScope: ScopeChainRoot,\n    localName: string,\n    sourceModuleName: string\n): boolean {\n    const variable = getVariableInScopeChain(sourceScope, localName);\n\n    if (!variable) {\n        return false;\n    }\n\n    return variable.defs.some((definition) => {\n        if (!isImportBindingDefinition(definition)) {\n            return false;\n        }\n\n        const definitionNode = definition.node;\n        if (definitionNode.type !== AST_NODE_TYPES.ImportSpecifier) {\n            return false;\n        }\n\n        const parentImportDeclaration =\n            getImportDeclarationParent(definitionNode);\n\n        return (\n            parentImportDeclaration !== null &&\n            isImportDeclarationFromSource(\n                parentImportDeclaration,\n                sourceModuleName\n            )\n        );\n    });\n}\n\n/**\n * Determine whether using the direct imported symbol name is safe at a\n * reference node without colliding with non-import bindings.\n *\n * @param options - Resolution inputs used to test direct-name safety.\n *\n * @returns `true` when using the bare imported symbol name would resolve to the\n *   expected import binding at the reference location.\n */\nconst canUseDirectImportedNameSafely = ({\n    importedName,\n    sourceModuleName,\n    sourceScope,\n}: Readonly<{\n    importedName: string;\n    sourceModuleName: string;\n    sourceScope: ScopeChainRoot;\n}>): boolean => {\n    const variable = getVariableInScopeChain(sourceScope, importedName);\n\n    if (!variable) {\n        return true;\n    }\n\n    return variable.defs.some((definition) => {\n        if (!isImportBindingDefinition(definition)) {\n            return false;\n        }\n\n        const definitionNode = definition.node;\n        if (definitionNode.type !== AST_NODE_TYPES.ImportSpecifier) {\n            return false;\n        }\n\n        if (definitionNode.local.name !== importedName) {\n            return false;\n        }\n\n        const parentImportDeclaration =\n            getImportDeclarationParent(definitionNode);\n\n        return (\n            parentImportDeclaration !== null &&\n            isImportDeclarationFromSource(\n                parentImportDeclaration,\n                sourceModuleName\n            ) &&\n            parentImportDeclaration.importKind !== \"type\" &&\n            definitionNode.importKind !== \"type\"\n        );\n    });\n};\n\n/**\n * Create a fixer that inserts a missing named value import for the target\n * module.\n *\n * @param options - Fixer context and import metadata.\n *\n * @returns Import insertion fix when a safe insertion point is found; otherwise\n *   `null`.\n */\nconst createInsertNamedValueImportFix = ({\n    fixer,\n    importedName,\n    referenceNode,\n    sourceModuleName,\n}: Readonly<{\n    fixer: TSESLint.RuleFixer;\n    importedName: string;\n    referenceNode: TSESTree.Node;\n    sourceModuleName: string;\n}>): null | TSESLint.RuleFix => {\n    const importDeclarationText = `import { ${importedName} } from \"${sourceModuleName}\";`;\n\n    return createImportInsertionFix({\n        fixer,\n        importDeclarationText,\n        moduleSpecifierHint: sourceModuleName,\n        referenceNode,\n    });\n};\n\n/**\n * Resolve a local alias that is safely bound to the expected import at a\n * reference node.\n *\n * @param options - Context and import metadata for local-name resolution.\n *\n * @returns Local alias when safely resolved; otherwise `null`.\n */\nfunction getSafeLocalNameForImportedValueInScope({\n    importedName,\n    imports,\n    sourceModuleName,\n    sourceScope,\n}: Readonly<{\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    sourceModuleName: string;\n    sourceScope: ScopeChainRoot;\n}>): null | string {\n    const candidateNames = imports.get(importedName);\n    if (!candidateNames || candidateNames.size === 0) {\n        return null;\n    }\n\n    for (const candidateName of candidateNames) {\n        if (\n            isLocalNameBoundToExpectedImport(\n                sourceScope,\n                candidateName,\n                sourceModuleName\n            )\n        ) {\n            return candidateName;\n        }\n    }\n\n    return null;\n}\n\n/**\n * Resolve a safe local alias for a required imported value at one reference.\n *\n * @param options - Rule context, import alias map, and target reference\n *   metadata.\n *\n * @returns Local alias when the current scope binds it to the expected module;\n *   otherwise `null`.\n */\nexport const getSafeLocalNameForImportedValue = ({\n    context,\n    importedName,\n    imports,\n    referenceNode,\n    sourceModuleName,\n}: Readonly<SafeImportedValueNameParams>): null | string => {\n    const sourceScope = resolveReferenceScope({\n        context,\n        referenceNode,\n    });\n\n    if (sourceScope === null) {\n        return getFirstImportedAliasName({\n            importedName,\n            imports,\n        });\n    }\n\n    return getSafeLocalNameForImportedValueInScope({\n        importedName,\n        imports,\n        sourceModuleName,\n        sourceScope,\n    });\n};\n\n/**\n * Resolve a safe replacement symbol and corresponding optional import-insert\n * factory for value replacements.\n *\n * @param options - Context and import metadata used to resolve a safe\n *   replacement name.\n *\n * @returns Replacement metadata with optional import-fix factory when safe;\n *   otherwise `null`.\n */\nconst getSafeReplacementNameAndImportFixFactory = ({\n    context,\n    importedName,\n    imports,\n    referenceNode,\n    sourceModuleName,\n}: Readonly<SafeImportedValueNameParams>): null | {\n    createImportFix: (\n        fixer: Readonly<TSESLint.RuleFixer>\n    ) => null | TSESLint.RuleFix;\n    replacementName: string;\n    requiresImportInsertion: boolean;\n} => {\n    const sourceScope = resolveReferenceScope({\n        context,\n        referenceNode,\n    });\n\n    if (sourceScope === null) {\n        const fallbackLocalName = getFirstImportedAliasName({\n            importedName,\n            imports,\n        });\n\n        if (fallbackLocalName === null) {\n            return null;\n        }\n\n        return {\n            createImportFix: () => null,\n            replacementName: fallbackLocalName,\n            requiresImportInsertion: false,\n        };\n    }\n\n    const existingReplacementName = getSafeLocalNameForImportedValueInScope({\n        importedName,\n        imports,\n        sourceModuleName,\n        sourceScope,\n    });\n\n    if (\n        typeof existingReplacementName === \"string\" &&\n        existingReplacementName.length > 0\n    ) {\n        return {\n            createImportFix: () => null,\n            replacementName: existingReplacementName,\n            requiresImportInsertion: false,\n        };\n    }\n\n    if (\n        !canUseDirectImportedNameSafely({\n            importedName,\n            sourceModuleName,\n            sourceScope,\n        })\n    ) {\n        return null;\n    }\n\n    return {\n        createImportFix: (fixer) =>\n            createInsertNamedValueImportFix({\n                fixer,\n                importedName,\n                referenceNode,\n                sourceModuleName,\n            }),\n        replacementName: importedName,\n        requiresImportInsertion: true,\n    };\n};\n\n/**\n * Resolve and coordinate import planning for value replacement fixers.\n */\nconst createValueReplacementPlan = ({\n    context,\n    importedName,\n    imports,\n    referenceNode,\n    reportFixIntent,\n    sourceModuleName,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n    importedName: string;\n    imports: ImportedValueAliasMap;\n    referenceNode: Readonly<TSESTree.Node>;\n    reportFixIntent: ImportFixIntent;\n    sourceModuleName: string;\n}>): null | ValueReplacementPlan => {\n    const replacementNameAndImportFixFactory =\n        getSafeReplacementNameAndImportFixFactory({\n            context,\n            importedName,\n            imports,\n            referenceNode,\n            sourceModuleName,\n        });\n\n    if (replacementNameAndImportFixFactory === null) {\n        return null;\n    }\n\n    const importInsertionDecision =\n        replacementNameAndImportFixFactory.requiresImportInsertion\n            ? resolveImportInsertionDecisionForReportFix({\n                  importBindingKind: \"value\",\n                  importedName,\n                  referenceNode,\n                  reportFixIntent,\n                  sourceModuleName,\n              })\n            : NO_IMPORT_INSERTION_NEEDED_DECISION;\n\n    return {\n        importInsertionDecision,\n        replacementNameAndImportFixFactory,\n        reportFixIntent,\n    };\n};\n\n/**\n * Build a report-fix callback from a resolved value replacement plan.\n */\nconst createReportFixFromValueReplacementPlan =\n    ({\n        autofixImportInsertionStrategy,\n        createReplacementFix,\n        valueReplacementPlan,\n    }: Readonly<{\n        autofixImportInsertionStrategy?:\n            | AutofixImportInsertionStrategy\n            | undefined;\n        createReplacementFix: (\n            fixer: Readonly<TSESLint.RuleFixer>,\n            replacementName: string\n        ) => TSESLint.RuleFix;\n        valueReplacementPlan: Readonly<ValueReplacementPlan>;\n    }>): TSESLint.ReportFixFunction =>\n    (fixer) =>\n        createImportAwareFixes({\n            autofixImportInsertionStrategy,\n            createImportFix:\n                valueReplacementPlan.replacementNameAndImportFixFactory\n                    .createImportFix,\n            createReplacementFix: (replacementFixer) =>\n                createReplacementFix(\n                    replacementFixer,\n                    valueReplacementPlan.replacementNameAndImportFixFactory\n                        .replacementName\n                ),\n            fixer,\n            importInsertionDecision:\n                valueReplacementPlan.importInsertionDecision,\n            reportFixIntent: valueReplacementPlan.reportFixIntent,\n            requiresImportInsertion:\n                valueReplacementPlan.replacementNameAndImportFixFactory\n                    .requiresImportInsertion,\n        });\n\n/**\n * Serialize a call argument node to text, preserving sequence-expression\n * semantics with parentheses when required.\n *\n * @param options - Argument node and source-code accessor.\n *\n * @returns Trimmed argument text suitable for function-call insertion, or\n *   `null` when no text can be produced.\n */\nexport const getFunctionCallArgumentText = ({\n    argumentNode,\n    sourceCode,\n}: Readonly<{\n    argumentNode: Readonly<TSESTree.Node>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    const argumentText = sourceCode.getText(argumentNode).trim();\n    if (argumentText.length === 0) {\n        return null;\n    }\n\n    if (argumentNode.type !== AST_NODE_TYPES.SequenceExpression) {\n        return argumentText;\n    }\n\n    if (argumentText.startsWith(\"(\") && argumentText.endsWith(\")\")) {\n        return argumentText;\n    }\n\n    return `(${argumentText})`;\n};\n\n/**\n * Create a fixer that safely replaces a target node with a resolved local\n * import alias.\n *\n * @param options - Inputs used to resolve replacement/import insertion safety.\n *\n * @returns A report fixer when safe; otherwise `null`.\n */\nexport const createSafeValueReferenceReplacementFix = ({\n    context,\n    importedName,\n    imports,\n    reportFixIntent = \"autofix\",\n    sourceModuleName,\n    targetNode,\n}: Readonly<SafeValueReplacementFixParams>): null | TSESLint.ReportFixFunction => {\n    const valueReplacementPlan = createValueReplacementPlan({\n        context,\n        importedName,\n        imports,\n        referenceNode: targetNode,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    if (valueReplacementPlan === null) {\n        return null;\n    }\n\n    return createReportFixFromValueReplacementPlan({\n        createReplacementFix: (replacementFixer, replacementName) =>\n            replacementFixer.replaceText(targetNode, replacementName),\n        valueReplacementPlan,\n    });\n};\n\n/**\n * Create a fixer that safely rewrites a target node using custom replacement\n * text derived from a resolved helper local name.\n *\n * @param options - Inputs for safe helper-name resolution and replacement-text\n *   generation.\n *\n * @returns A report fixer when safe; otherwise `null`.\n */\nexport const createSafeValueNodeTextReplacementFix = ({\n    context,\n    importedName,\n    imports,\n    replacementTextFactory,\n    reportFixIntent = \"autofix\",\n    sourceModuleName,\n    targetNode,\n}: Readonly<SafeValueNodeTextReplacementFixParams>): null | TSESLint.ReportFixFunction => {\n    const valueReplacementPlan = createValueReplacementPlan({\n        context,\n        importedName,\n        imports,\n        referenceNode: targetNode,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    if (valueReplacementPlan === null) {\n        return null;\n    }\n\n    return createReportFixFromValueReplacementPlan({\n        createReplacementFix: (replacementFixer, replacementName) =>\n            replacementFixer.replaceText(\n                targetNode,\n                replacementTextFactory(replacementName)\n            ),\n        valueReplacementPlan,\n    });\n};\n\n/**\n * Create a fixer that rewrites `receiver.method(args...)` to\n * `importedFn(receiver, args...)`.\n *\n * @returns A report fixer when safe; otherwise `null`.\n */\nexport const createMethodToFunctionCallFix = ({\n    callNode,\n    context,\n    importedName,\n    imports,\n    reportFixIntent = \"autofix\",\n    sourceModuleName,\n}: Readonly<MethodToFunctionCallFixParams>): null | TSESLint.ReportFixFunction => {\n    if (\n        callNode.optional ||\n        callNode.callee.type !== AST_NODE_TYPES.MemberExpression\n    ) {\n        return null;\n    }\n\n    if (callNode.callee.optional) {\n        return null;\n    }\n\n    if (callNode.callee.object.type === AST_NODE_TYPES.Super) {\n        return null;\n    }\n\n    const valueReplacementPlan = createValueReplacementPlan({\n        context,\n        importedName,\n        imports,\n        referenceNode: callNode,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    if (valueReplacementPlan === null) {\n        return null;\n    }\n\n    const { sourceCode } = context;\n    const receiverText = getFunctionCallArgumentText({\n        argumentNode: callNode.callee.object,\n        sourceCode,\n    });\n    if (receiverText === null) {\n        return null;\n    }\n\n    const argumentTexts: string[] = [];\n\n    for (const argument of callNode.arguments) {\n        const argumentText = getFunctionCallArgumentText({\n            argumentNode: argument,\n            sourceCode,\n        });\n\n        if (argumentText === null) {\n            return null;\n        }\n\n        argumentTexts.push(argumentText);\n    }\n\n    const argumentText = arrayJoin(argumentTexts, \", \");\n\n    const replacementText =\n        argumentText.length > 0\n            ? `${valueReplacementPlan.replacementNameAndImportFixFactory.replacementName}(${receiverText}, ${argumentText})`\n            : `${valueReplacementPlan.replacementNameAndImportFixFactory.replacementName}(${receiverText})`;\n\n    return createReportFixFromValueReplacementPlan({\n        createReplacementFix: (replacementFixer) =>\n            replacementFixer.replaceText(callNode, replacementText),\n        valueReplacementPlan,\n    });\n};\n\n/**\n * Create a fixer that rewrites `receiver[member]` to `importedFn(receiver)`.\n *\n * @returns A report fixer when safe; otherwise `null`.\n */\nexport const createMemberToFunctionCallFix = ({\n    context,\n    importedName,\n    imports,\n    memberNode,\n    reportFixIntent = \"autofix\",\n    sourceModuleName,\n}: Readonly<MemberToFunctionCallFixParams>): null | TSESLint.ReportFixFunction => {\n    if (memberNode.optional) {\n        return null;\n    }\n\n    if (memberNode.object.type === AST_NODE_TYPES.Super) {\n        return null;\n    }\n\n    const valueReplacementPlan = createValueReplacementPlan({\n        context,\n        importedName,\n        imports,\n        referenceNode: memberNode,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    if (valueReplacementPlan === null) {\n        return null;\n    }\n\n    const receiverText = getFunctionCallArgumentText({\n        argumentNode: memberNode.object,\n        sourceCode: context.sourceCode,\n    });\n    if (receiverText === null) {\n        return null;\n    }\n\n    const replacementText = `${valueReplacementPlan.replacementNameAndImportFixFactory.replacementName}(${receiverText})`;\n\n    return createReportFixFromValueReplacementPlan({\n        createReplacementFix: (replacementFixer) =>\n            replacementFixer.replaceText(memberNode, replacementText),\n        valueReplacementPlan,\n    });\n};\n\n/**\n * Create a fixer that rewrites a target node to an imported helper invocation.\n *\n * @param options - Target/argument nodes and import metadata for call\n *\n * @returns A report fixer when safe; otherwise `null`.\n */\nexport const createSafeValueArgumentFunctionCallFix = ({\n    argumentNode,\n    autofixImportInsertionStrategy,\n    context,\n    importedName,\n    imports,\n    negated,\n    reportFixIntent = \"autofix\",\n    sourceModuleName,\n    targetNode,\n}: Readonly<ValueArgumentFunctionCallFixParams>): null | TSESLint.ReportFixFunction => {\n    const valueReplacementPlan = createValueReplacementPlan({\n        context,\n        importedName,\n        imports,\n        referenceNode: targetNode,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    if (valueReplacementPlan === null) {\n        return null;\n    }\n\n    const argumentText = getFunctionCallArgumentText({\n        argumentNode,\n        sourceCode: context.sourceCode,\n    });\n    if (argumentText === null) {\n        return null;\n    }\n\n    const callText = `${valueReplacementPlan.replacementNameAndImportFixFactory.replacementName}(${argumentText})`;\n    const replacementText = negated === true ? `!${callText}` : callText;\n\n    return createReportFixFromValueReplacementPlan({\n        autofixImportInsertionStrategy,\n        createReplacementFix: (replacementFixer) =>\n            replacementFixer.replaceText(targetNode, replacementText),\n        valueReplacementPlan,\n    });\n};\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Shared import-declaration analysis utilities for rule internals.\n */\nimport { isDefined } from \"ts-extras\";\n\n/**\n * Grouped mapping from imported symbol name to all local alias names.\n */\nexport type NamedImportLocalNamesByImportedName = ReadonlyMap<\n    string,\n    ReadonlySet<string>\n>;\n\n/**\n * Flattened named-import binding metadata.\n */\nexport type NamedImportSpecifierBinding = Readonly<{\n    declaration: Readonly<TSESTree.ImportDeclaration>;\n    importedName: string;\n    localName: string;\n    specifier: Readonly<TSESTree.ImportSpecifier>;\n}>;\n\n/**\n * Program-level import analysis cached per SourceCode instance.\n */\ntype SourceImportAnalysis = Readonly<{\n    namedImportSpecifierBindings: readonly NamedImportSpecifierBinding[];\n    namespaceImportLocalNamesBySourceModule: ReadonlyMap<\n        string,\n        ReadonlySet<string>\n    >;\n}>;\n\n/**\n * SourceCode-scoped cache for parsed import declarations.\n */\nconst sourceImportAnalysisCache = new WeakMap<\n    Readonly<TSESLint.SourceCode>,\n    SourceImportAnalysis\n>();\n\nconst isIdentifierNode = (\n    value: unknown\n): value is Readonly<TSESTree.Identifier> =>\n    typeof value === \"object\" &&\n    value !== null &&\n    Reflect.get(value, \"type\") === AST_NODE_TYPES.Identifier &&\n    typeof Reflect.get(value, \"name\") === \"string\";\n\n/**\n * Build and cache one import-analysis snapshot for the provided SourceCode.\n */\nconst getSourceImportAnalysis = (\n    sourceCode: Readonly<TSESLint.SourceCode>\n): SourceImportAnalysis => {\n    const existingAnalysis = sourceImportAnalysisCache.get(sourceCode);\n    if (isDefined(existingAnalysis)) {\n        return existingAnalysis;\n    }\n\n    const namedImportSpecifierBindings: NamedImportSpecifierBinding[] = [];\n    const mutableNamespaceLocalNamesBySourceModule = new Map<\n        string,\n        Set<string>\n    >();\n\n    for (const statement of sourceCode.ast.body) {\n        if (statement.type !== AST_NODE_TYPES.ImportDeclaration) {\n            continue;\n        }\n\n        const sourceModuleName =\n            typeof statement.source.value === \"string\"\n                ? statement.source.value\n                : undefined;\n\n        for (const specifier of statement.specifiers) {\n            if (\n                specifier.type === AST_NODE_TYPES.ImportSpecifier &&\n                isIdentifierNode(specifier.imported) &&\n                isIdentifierNode(specifier.local)\n            ) {\n                namedImportSpecifierBindings.push(\n                    Object.freeze({\n                        declaration: statement,\n                        importedName: specifier.imported.name,\n                        localName: specifier.local.name,\n                        specifier,\n                    })\n                );\n\n                continue;\n            }\n\n            if (\n                specifier.type === AST_NODE_TYPES.ImportNamespaceSpecifier &&\n                isDefined(sourceModuleName)\n            ) {\n                const existingLocalNames =\n                    mutableNamespaceLocalNamesBySourceModule.get(\n                        sourceModuleName\n                    );\n\n                if (!isDefined(existingLocalNames)) {\n                    mutableNamespaceLocalNamesBySourceModule.set(\n                        sourceModuleName,\n                        new Set([specifier.local.name])\n                    );\n\n                    continue;\n                }\n\n                existingLocalNames.add(specifier.local.name);\n            }\n        }\n    }\n\n    const namespaceImportLocalNamesBySourceModule = new Map<\n        string,\n        ReadonlySet<string>\n    >();\n\n    for (const [\n        sourceModuleName,\n        localNames,\n    ] of mutableNamespaceLocalNamesBySourceModule) {\n        namespaceImportLocalNamesBySourceModule.set(\n            sourceModuleName,\n            Object.freeze(new Set(localNames))\n        );\n    }\n\n    const analysis: SourceImportAnalysis = Object.freeze({\n        namedImportSpecifierBindings: Object.freeze(\n            namedImportSpecifierBindings\n        ),\n        namespaceImportLocalNamesBySourceModule,\n    });\n\n    sourceImportAnalysisCache.set(sourceCode, analysis);\n\n    return analysis;\n};\n\n/**\n * Check whether an import declaration points at a specific source module.\n */\nexport const isImportDeclarationFromSource = (\n    declaration: Readonly<TSESTree.ImportDeclaration>,\n    sourceModuleName: string\n): boolean => declaration.source.value === sourceModuleName;\n\n/**\n * Collect named import-specifier bindings from one module source.\n */\nexport const collectNamedImportSpecifierBindingsFromSource = ({\n    allowTypeImportDeclaration = true,\n    allowTypeImportSpecifier = true,\n    sourceCode,\n    sourceModuleName,\n}: Readonly<{\n    allowTypeImportDeclaration?: boolean;\n    allowTypeImportSpecifier?: boolean;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n    sourceModuleName?: string;\n}>): readonly NamedImportSpecifierBinding[] => {\n    const sourceImportAnalysis = getSourceImportAnalysis(sourceCode);\n    const bindings: NamedImportSpecifierBinding[] = [];\n\n    for (const binding of sourceImportAnalysis.namedImportSpecifierBindings) {\n        if (\n            isDefined(sourceModuleName) &&\n            !isImportDeclarationFromSource(\n                binding.declaration,\n                sourceModuleName\n            )\n        ) {\n            continue;\n        }\n\n        if (\n            !allowTypeImportDeclaration &&\n            binding.declaration.importKind === \"type\"\n        ) {\n            continue;\n        }\n\n        if (\n            !allowTypeImportSpecifier &&\n            binding.specifier.importKind === \"type\"\n        ) {\n            continue;\n        }\n\n        bindings.push(binding);\n    }\n\n    return bindings;\n};\n\n/**\n * Collect named import local names grouped by imported symbol name.\n */\nexport const collectNamedImportLocalNamesByImportedNameFromSource = ({\n    allowTypeImportDeclaration = true,\n    allowTypeImportSpecifier = true,\n    sourceCode,\n    sourceModuleName,\n}: Readonly<{\n    allowTypeImportDeclaration?: boolean;\n    allowTypeImportSpecifier?: boolean;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n    sourceModuleName?: string;\n}>): NamedImportLocalNamesByImportedName => {\n    const localNamesByImportedName = new Map<string, Set<string>>();\n\n    const bindingCollectionOptions: Parameters<\n        typeof collectNamedImportSpecifierBindingsFromSource\n    >[0] = {\n        allowTypeImportDeclaration,\n        allowTypeImportSpecifier,\n        sourceCode,\n        ...(isDefined(sourceModuleName) ? { sourceModuleName } : {}),\n    };\n\n    for (const binding of collectNamedImportSpecifierBindingsFromSource(\n        bindingCollectionOptions\n    )) {\n        const existingLocalNames = localNamesByImportedName.get(\n            binding.importedName\n        );\n\n        if (!isDefined(existingLocalNames)) {\n            localNamesByImportedName.set(\n                binding.importedName,\n                new Set([binding.localName])\n            );\n\n            continue;\n        }\n\n        existingLocalNames.add(binding.localName);\n    }\n\n    return localNamesByImportedName;\n};\n\n/**\n * Collect namespace-import local names from one module source.\n */\nexport const collectNamespaceImportLocalNamesFromSourceModule = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    sourceModuleName: string\n): ReadonlySet<string> => {\n    const sourceImportAnalysis = getSourceImportAnalysis(sourceCode);\n    const localNames =\n        sourceImportAnalysis.namespaceImportLocalNamesBySourceModule.get(\n            sourceModuleName\n        );\n\n    return isDefined(localNames) ? new Set(localNames) : new Set<string>();\n};\n", "/**\n * @packageDocumentation\n * Shared composition helpers for import-aware report fix callbacks.\n */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport type {\n    ImportFixIntent,\n    ImportInsertionDecision,\n} from \"./import-fix-coordinator.js\";\n\n/**\n * Controls whether an autofix that must insert an import should also emit its\n * replacement in the same report callback.\n */\nexport type AutofixImportInsertionStrategy = \"combined\" | \"separate-pass\";\n\n/**\n * Build replacement/import fixer arrays according to an import-insertion\n * coordination decision.\n *\n * @param options - Replacement and optional import-fix factories with the\n *   import-insertion decision for this report callback.\n *\n * @returns Ordered fix array (`import`, then `replacement`) when applicable;\n *   otherwise `null` when the fix must be suppressed.\n */\nexport const createImportAwareFixes = ({\n    autofixImportInsertionStrategy = \"combined\",\n    createImportFix,\n    createReplacementFix,\n    fixer,\n    importInsertionDecision,\n    reportFixIntent = \"autofix\",\n    requiresImportInsertion,\n}: Readonly<{\n    autofixImportInsertionStrategy?: AutofixImportInsertionStrategy | undefined;\n    createImportFix: (\n        fixer: Readonly<TSESLint.RuleFixer>\n    ) => null | TSESLint.RuleFix;\n    createReplacementFix: (\n        fixer: Readonly<TSESLint.RuleFixer>\n    ) => TSESLint.RuleFix;\n    fixer: Readonly<TSESLint.RuleFixer>;\n    importInsertionDecision: ImportInsertionDecision;\n    reportFixIntent?: ImportFixIntent | undefined;\n    requiresImportInsertion: boolean;\n}>): null | readonly TSESLint.RuleFix[] => {\n    if (\n        requiresImportInsertion &&\n        reportFixIntent === \"autofix\" &&\n        autofixImportInsertionStrategy === \"separate-pass\"\n    ) {\n        if (!importInsertionDecision.shouldIncludeImportInsertionFix) {\n            return null;\n        }\n\n        const importFix = createImportFix(fixer);\n        if (importFix === null) {\n            return null;\n        }\n\n        return [importFix];\n    }\n\n    if (!requiresImportInsertion) {\n        return [createReplacementFix(fixer)];\n    }\n\n    if (!importInsertionDecision.shouldIncludeImportInsertionFix) {\n        return importInsertionDecision.allowReplacementWithoutImportInsertion\n            ? [createReplacementFix(fixer)]\n            : null;\n    }\n\n    const importFix = createImportFix(fixer);\n    if (importFix === null) {\n        return null;\n    }\n\n    return [importFix, createReplacementFix(fixer)];\n};\n", "/**\n * @packageDocumentation\n * Shared import-insertion coordination used by import-aware replacement fixers.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\nimport { getProgramNode } from \"./ast-node.js\";\nimport { isImportInsertionFixesDisabledForNode } from \"./plugin-settings.js\";\n\n/** Classification for coordinated import insertion keys. */\nexport type ImportBindingKind = \"type\" | \"value\";\n\n/**\n * Delivery channel for a report fix callback.\n *\n * @remarks\n * - `autofix`: fix supplied through `context.report({ fix })` and coordinated so\n *   only one report emits a specific import insertion per file/lint pass.\n * - `suggestion`: fix supplied through `context.report({ suggest })`; each\n *   suggestion remains self-contained and therefore keeps import insertion.\n */\nexport type ImportFixIntent = \"autofix\" | \"suggestion\";\n\n/**\n * Import-insertion planning decision for one report fix callback.\n */\nexport type ImportInsertionDecision = Readonly<{\n    allowReplacementWithoutImportInsertion: boolean;\n    shouldIncludeImportInsertionFix: boolean;\n}>;\n\n/**\n * Input options used to resolve import-insertion coordination decisions.\n */\nexport type ImportInsertionDecisionOptions = Readonly<{\n    importBindingKind: ImportBindingKind;\n    importedName: string;\n    referenceNode: Readonly<TSESTree.Node>;\n    reportFixIntent: ImportFixIntent;\n    sourceModuleName: string;\n}>;\n\n/** Claimed import-insertion keys for one Program node. */\ntype ProgramImportClaims = Set<string>;\n\n/** Program-scoped claimed import keys cache. */\nconst claimedImportKeysByProgram = new WeakMap<\n    Readonly<TSESTree.Program>,\n    ProgramImportClaims\n>();\n\n/**\n * Build a deterministic coordination key for one import binding.\n */\nconst createImportCoordinationKey = ({\n    importBindingKind,\n    importedName,\n    sourceModuleName,\n}: Readonly<{\n    importBindingKind: ImportBindingKind;\n    importedName: string;\n    sourceModuleName: string;\n}>): string =>\n    `${importBindingKind}\\u0000${sourceModuleName}\\u0000${importedName}`;\n\n/**\n * Claim a coordination key for one program and return whether this call made\n * the first claim.\n */\nconst claimImportCoordinationKeyForProgram = ({\n    coordinationKey,\n    programNode,\n}: Readonly<{\n    coordinationKey: string;\n    programNode: Readonly<TSESTree.Program>;\n}>): boolean => {\n    const existingClaims = claimedImportKeysByProgram.get(programNode);\n    if (existingClaims?.has(coordinationKey) === true) {\n        return false;\n    }\n\n    if (!isDefined(existingClaims)) {\n        claimedImportKeysByProgram.set(programNode, new Set([coordinationKey]));\n\n        return true;\n    }\n\n    existingClaims.add(coordinationKey);\n\n    return true;\n};\n\n/**\n * Decision when import insertion should be emitted and replacement is allowed.\n */\nconst INCLUDE_IMPORT_INSERTION: ImportInsertionDecision = {\n    allowReplacementWithoutImportInsertion: true,\n    shouldIncludeImportInsertionFix: true,\n};\n\n/**\n * Decision when replacement depends on insertion and should be suppressed.\n */\nconst SKIP_IMPORT_INSERTION_BLOCK_REPLACEMENT: ImportInsertionDecision = {\n    allowReplacementWithoutImportInsertion: false,\n    shouldIncludeImportInsertionFix: false,\n};\n\n/**\n * Resolve import-insertion and replacement behavior for a report-fix callback.\n *\n * @remarks\n * This decision is made during fixer construction (AST traversal) to keep\n * behavior deterministic across repeated fix callback evaluation.\n */\nexport function resolveImportInsertionDecisionForReportFix({\n    importBindingKind,\n    importedName,\n    referenceNode,\n    reportFixIntent,\n    sourceModuleName,\n}: ImportInsertionDecisionOptions): ImportInsertionDecision {\n    if (reportFixIntent === \"suggestion\") {\n        return INCLUDE_IMPORT_INSERTION;\n    }\n\n    if (isImportInsertionFixesDisabledForNode(referenceNode)) {\n        return SKIP_IMPORT_INSERTION_BLOCK_REPLACEMENT;\n    }\n\n    const programNode = getProgramNode(referenceNode);\n    if (!programNode) {\n        return INCLUDE_IMPORT_INSERTION;\n    }\n\n    const coordinationKey = createImportCoordinationKey({\n        importBindingKind,\n        importedName,\n        sourceModuleName,\n    });\n\n    if (\n        !claimImportCoordinationKeyForProgram({\n            coordinationKey,\n            programNode,\n        })\n    ) {\n        return SKIP_IMPORT_INSERTION_BLOCK_REPLACEMENT;\n    }\n\n    return INCLUDE_IMPORT_INSERTION;\n}\n", "/**\n * @packageDocumentation\n * Parsing and memoization helpers for plugin-level runtime settings.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { JsonObject, UnknownArray } from \"type-fest\";\n\nimport { isPresent, objectHasOwn } from \"ts-extras\";\n\nimport { getProgramNode } from \"./ast-node.js\";\n\n/** Top-level `settings` key for this plugin. */\nconst TYPEFEST_SETTINGS_KEY = \"typefest\";\n\n/** Flag that disables all plugin autofix behavior. */\nconst DISABLE_ALL_AUTOFIXES_KEY = \"disableAllAutofixes\";\n\n/** Flag that disables import-insertion fix helpers only. */\nconst DISABLE_IMPORT_INSERTION_FIXES_KEY = \"disableImportInsertionFixes\";\n\n/**\n * Normalized per-program settings consumed by fix-generation helpers.\n */\ninterface ProgramSettings {\n    disableAllAutofixes: boolean;\n    disableImportInsertionFixes: boolean;\n}\n\n/**\n * Cache of parsed settings keyed by the Program node for the active file.\n */\nconst settingsByProgram = new WeakMap<TSESTree.Program, ProgramSettings>();\n\n/**\n * Narrow an unknown value to a JSON-object-like record.\n *\n * @param value - Value to narrow.\n *\n * @returns `true` when the value is a non-null, non-array object.\n */\nconst isObject = (value: unknown): value is Readonly<JsonObject> =>\n    typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/**\n * Extract the `settings.typefest` object when present and valid.\n *\n * @param settings - ESLint settings value from rule context.\n *\n * @returns Parsed `settings.typefest` object when valid; otherwise `null`.\n */\nconst getTypefestSettings = (\n    settings: unknown\n): null | Readonly<JsonObject> => {\n    if (!isObject(settings)) {\n        return null;\n    }\n\n    const typefestSettings = settings[TYPEFEST_SETTINGS_KEY];\n\n    return isObject(typefestSettings) ? typefestSettings : null;\n};\n\n/**\n * Read a strict boolean flag (`true`) from a JSON object by key.\n *\n * @param object - Source settings object.\n * @param key - Flag key to read.\n *\n * @returns `true` only when the key exists and equals literal `true`.\n */\nconst readBooleanFlag = (object: Readonly<JsonObject>, key: string): boolean =>\n    objectHasOwn(object, key) && object[key] === true;\n\n/**\n * Reads the import-insertion disable flag from plugin settings.\n *\n * @param settings - ESLint settings value from rule context.\n *\n * @returns `true` when import insertion fixes are explicitly disabled.\n */\nconst readDisableImportInsertionFixesFromSettings = (\n    settings: unknown\n): boolean => {\n    const typefestSettings = getTypefestSettings(settings);\n    if (!isPresent(typefestSettings)) {\n        return false;\n    }\n\n    return readBooleanFlag(\n        typefestSettings,\n        DISABLE_IMPORT_INSERTION_FIXES_KEY\n    );\n};\n\n/**\n * Reads the global autofix disable flag from plugin settings.\n *\n * @param settings - ESLint settings value from rule context.\n *\n * @returns `true` when all plugin autofixes are explicitly disabled.\n */\nconst readDisableAllAutofixesFromSettings = (settings: unknown): boolean => {\n    const typefestSettings = getTypefestSettings(settings);\n    if (!isPresent(typefestSettings)) {\n        return false;\n    }\n\n    return readBooleanFlag(typefestSettings, DISABLE_ALL_AUTOFIXES_KEY);\n};\n\n/**\n * Guard values suitable for WeakMap object keys.\n */\nconst isWeakMapKeyObject = (value: unknown): value is object =>\n    typeof value === \"object\" && value !== null;\n\n/**\n * Register parsed plugin settings for the current file program.\n *\n * @param context - Active ESLint rule context.\n *\n * @returns Memoized immutable settings for the context's program node.\n */\nexport const registerProgramSettingsForContext = (\n    context: Readonly<TSESLint.RuleContext<string, UnknownArray>>\n): Readonly<ProgramSettings> => {\n    const programNode = context.sourceCode.ast;\n\n    const disableAllAutofixes = readDisableAllAutofixesFromSettings(\n        context.settings\n    );\n    const disableImportInsertionFixes =\n        disableAllAutofixes ||\n        readDisableImportInsertionFixesFromSettings(context.settings);\n\n    const parsedSettings: Readonly<ProgramSettings> = Object.freeze({\n        disableAllAutofixes,\n        disableImportInsertionFixes,\n    });\n\n    if (!isWeakMapKeyObject(programNode)) {\n        return parsedSettings;\n    }\n\n    const existingProgramSettings = settingsByProgram.get(programNode);\n    if (isPresent(existingProgramSettings)) {\n        return existingProgramSettings;\n    }\n\n    settingsByProgram.set(programNode, parsedSettings);\n\n    return parsedSettings;\n};\n\n/**\n * Determine whether import insertion autofixes are globally disabled for the\n * file containing the provided node.\n *\n * @param node - AST node used to resolve the enclosing Program.\n *\n * @returns `true` when import insertion fixes should be suppressed.\n */\nexport const isImportInsertionFixesDisabledForNode = (\n    node: Readonly<TSESTree.Node>\n): boolean => {\n    const programNode = getProgramNode(node);\n    if (!isPresent(programNode)) {\n        return false;\n    }\n\n    const settings = settingsByProgram.get(programNode);\n\n    return settings?.disableImportInsertionFixes === true;\n};\n", "import parser from \"@typescript-eslint/parser\";\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Shared utilities for safely inserting import declarations in fixer output.\n */\nimport { arrayAt, isInteger } from \"ts-extras\";\n\nimport { getProgramNode } from \"./ast-node.js\";\nimport { getBoundedCacheValue, setBoundedCacheValue } from \"./bounded-cache.js\";\nimport { safeTypeOperation } from \"./safe-type-operation.js\";\nimport { isKnownWhitespaceCharacter } from \"./text-character.js\";\n\n/**\n * Cached insertion-layout metadata for one Program node.\n */\ntype ProgramInsertionLayout = Readonly<{\n    firstRelativeImportDeclaration: null | Readonly<TSESTree.ImportDeclaration>;\n    firstStatementStart: null | number;\n    importDeclarations: readonly Readonly<TSESTree.ImportDeclaration>[];\n    lastDirectiveStatement: null | Readonly<TSESTree.ExpressionStatement>;\n    lastImportDeclaration: null | Readonly<TSESTree.ImportDeclaration>;\n    lastNonRelativeImportDeclaration: null | Readonly<TSESTree.ImportDeclaration>;\n    programEnd: null | number;\n}>;\n\n/**\n * Program-scoped insertion-layout cache reused across repeated fixer planning.\n */\nconst programInsertionLayoutCache = new WeakMap<\n    Readonly<TSESTree.Program>,\n    ProgramInsertionLayout\n>();\n\nconst IMPORT_KEYWORD = \"import\" as const;\n\n/**\n * Upper bound for import-text snippets parsed to recover module specifiers.\n *\n * @remarks\n * Fix suggestions can include large synthetic text. Capping parser input keeps\n * this helper predictable on pathological inputs.\n */\nconst MAX_IMPORT_DECLARATION_TEXT_PARSE_LENGTH = 2048 as const;\n\nconst skipLeadingWhitespace = ({\n    startIndex,\n    text,\n}: Readonly<{\n    startIndex: number;\n    text: string;\n}>): number => {\n    let index = startIndex;\n\n    while (\n        index < text.length &&\n        isKnownWhitespaceCharacter(text[index] ?? \"\")\n    ) {\n        index += 1;\n    }\n\n    return index;\n};\n\nconst MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES = 256 as const;\n\nconst parsedModuleSpecifierByImportText = new Map<string, null | string>();\n\nconst isTrailingImportText = (text: string): boolean => {\n    const trailingText = text.trim();\n\n    return trailingText === \"\" || trailingText === \";\";\n};\n\nconst parseModuleSpecifierFromImportDeclarationText = (\n    importDeclarationText: string\n): null | string => {\n    const parsedResult = safeTypeOperation({\n        operation: () =>\n            parser.parseForESLint(importDeclarationText, {\n                ecmaVersion: \"latest\",\n                loc: false,\n                range: false,\n                sourceType: \"module\",\n            }),\n        reason: \"import-insertion-module-specifier-parse-failed\",\n    });\n\n    if (!parsedResult.ok) {\n        return null;\n    }\n\n    const [firstStatement] = parsedResult.value.ast.body;\n\n    if (\n        parsedResult.value.ast.body.length !== 1 ||\n        firstStatement?.type !== AST_NODE_TYPES.ImportDeclaration\n    ) {\n        return null;\n    }\n\n    const moduleSpecifier = firstStatement.source.value;\n\n    return typeof moduleSpecifier === \"string\" ? moduleSpecifier : null;\n};\n\n/**\n * Extract the module specifier from an import declaration text snippet.\n */\nconst getModuleSpecifierFromImportDeclarationText = (\n    importDeclarationText: string\n): null | string => {\n    const trimmedImportText = importDeclarationText.trim();\n\n    if (trimmedImportText.length > MAX_IMPORT_DECLARATION_TEXT_PARSE_LENGTH) {\n        setBoundedCacheValue({\n            cache: parsedModuleSpecifierByImportText,\n            key: trimmedImportText,\n            maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n            value: null,\n        });\n\n        return null;\n    }\n\n    const cachedModuleSpecifierLookup = getBoundedCacheValue(\n        parsedModuleSpecifierByImportText,\n        trimmedImportText\n    );\n\n    if (cachedModuleSpecifierLookup.found) {\n        return cachedModuleSpecifierLookup.value ?? null;\n    }\n\n    if (!trimmedImportText.startsWith(IMPORT_KEYWORD)) {\n        setBoundedCacheValue({\n            cache: parsedModuleSpecifierByImportText,\n            key: trimmedImportText,\n            maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n            value: null,\n        });\n\n        return null;\n    }\n\n    const importClauseStart = skipLeadingWhitespace({\n        startIndex: IMPORT_KEYWORD.length,\n        text: trimmedImportText,\n    });\n\n    if (importClauseStart >= trimmedImportText.length) {\n        setBoundedCacheValue({\n            cache: parsedModuleSpecifierByImportText,\n            key: trimmedImportText,\n            maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n            value: null,\n        });\n\n        return null;\n    }\n\n    const moduleSpecifier =\n        parseModuleSpecifierFromImportDeclarationText(trimmedImportText);\n\n    if (moduleSpecifier !== null) {\n        setBoundedCacheValue({\n            cache: parsedModuleSpecifierByImportText,\n            key: trimmedImportText,\n            maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n            value: moduleSpecifier,\n        });\n\n        return moduleSpecifier;\n    }\n\n    const semicolonIndex = trimmedImportText.lastIndexOf(\";\");\n    const trailingImportText =\n        semicolonIndex === -1\n            ? \"\"\n            : trimmedImportText.slice(semicolonIndex + 1);\n\n    if (!isTrailingImportText(trailingImportText)) {\n        setBoundedCacheValue({\n            cache: parsedModuleSpecifierByImportText,\n            key: trimmedImportText,\n            maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n            value: null,\n        });\n\n        return null;\n    }\n\n    setBoundedCacheValue({\n        cache: parsedModuleSpecifierByImportText,\n        key: trimmedImportText,\n        maxEntries: MAX_PARSED_MODULE_SPECIFIER_CACHE_ENTRIES,\n        value: null,\n    });\n\n    return null;\n};\n\n/**\n * Determine whether a module specifier is relative (`./` or `../`) or rooted.\n */\nconst isRelativeModuleSpecifier = (moduleSpecifier: string): boolean =>\n    moduleSpecifier.startsWith(\".\") || moduleSpecifier.startsWith(\"/\");\n\n/**\n * Read a string-valued module specifier from an import declaration node.\n */\nconst getImportDeclarationModuleSpecifier = (\n    importDeclaration: Readonly<TSESTree.ImportDeclaration>\n): null | string => {\n    const sourceValue = importDeclaration.source.value;\n\n    return typeof sourceValue === \"string\" ? sourceValue : null;\n};\n\n/**\n * Check whether a Program statement is part of the directive prologue (for\n * example, `\"use strict\"`).\n */\nconst isDirectiveExpressionStatement = (\n    statement: Readonly<TSESTree.ProgramStatement>\n): statement is TSESTree.ExpressionStatement & { directive: string } =>\n    statement.type === AST_NODE_TYPES.ExpressionStatement &&\n    typeof statement.directive === \"string\";\n\n/**\n * Read and validate a node range tuple.\n *\n * @param node - Node whose range should be extracted.\n *\n * @returns `[start, end]` tuple when available and valid; otherwise `null`.\n */\nconst getNodeRange = (\n    node: Readonly<TSESTree.Node>\n): null | readonly [number, number] => {\n    const nodeRange = node.range;\n\n    if (!Array.isArray(nodeRange)) {\n        return null;\n    }\n\n    const [start, end] = nodeRange;\n\n    if (!isInteger(start) || !isInteger(end)) {\n        return null;\n    }\n\n    if (start < 0 || end < start) {\n        return null;\n    }\n\n    return [start, end];\n};\n\n/**\n * Read the numeric start offset from an ESTree node range tuple.\n *\n * @param node - Node whose start offset should be extracted.\n *\n * @returns Numeric start offset when available; otherwise `null`.\n */\nconst getNodeRangeStart = (node: Readonly<TSESTree.Node>): null | number => {\n    const nodeRange = getNodeRange(node);\n    if (nodeRange === null) {\n        return null;\n    }\n\n    return arrayAt(nodeRange, 0) ?? null;\n};\n\n/**\n * Read and validate the Program end offset from its range tuple.\n *\n * @param programNode - Program node whose range end should be read.\n *\n * @returns Valid end offset when available; otherwise `null`.\n */\nconst getProgramRangeEnd = (\n    programNode: Readonly<TSESTree.Program>\n): null | number => {\n    const programRange = getNodeRange(programNode);\n\n    return programRange?.[1] ?? null;\n};\n\n/**\n * Build and cache insertion-layout metadata for one Program.\n */\nconst getProgramInsertionLayout = (\n    programNode: Readonly<TSESTree.Program>\n): ProgramInsertionLayout => {\n    const existingLayout = programInsertionLayoutCache.get(programNode);\n    if (existingLayout) {\n        return existingLayout;\n    }\n\n    const importDeclarations: TSESTree.ImportDeclaration[] = [];\n    let firstRelativeImportDeclaration: null | Readonly<TSESTree.ImportDeclaration> =\n        null;\n    let lastNonRelativeImportDeclaration: null | Readonly<TSESTree.ImportDeclaration> =\n        null;\n    let lastDirectiveStatement: null | Readonly<TSESTree.ExpressionStatement> =\n        null;\n    let inDirectivePrologue = true;\n\n    for (const statement of programNode.body) {\n        if (inDirectivePrologue && isDirectiveExpressionStatement(statement)) {\n            lastDirectiveStatement = statement;\n        } else {\n            inDirectivePrologue = false;\n        }\n\n        if (statement.type !== AST_NODE_TYPES.ImportDeclaration) {\n            continue;\n        }\n\n        importDeclarations.push(statement);\n\n        const existingModuleSpecifier =\n            getImportDeclarationModuleSpecifier(statement);\n\n        if (\n            typeof existingModuleSpecifier === \"string\" &&\n            isRelativeModuleSpecifier(existingModuleSpecifier)\n        ) {\n            firstRelativeImportDeclaration ??= statement;\n\n            continue;\n        }\n\n        lastNonRelativeImportDeclaration = statement;\n    }\n\n    const [firstStatement] = programNode.body;\n\n    const layout: ProgramInsertionLayout = Object.freeze({\n        firstRelativeImportDeclaration,\n        firstStatementStart:\n            firstStatement === undefined\n                ? null\n                : getNodeRangeStart(firstStatement),\n        importDeclarations: Object.freeze(importDeclarations),\n        lastDirectiveStatement,\n        lastImportDeclaration: arrayAt(importDeclarations, -1) ?? null,\n        lastNonRelativeImportDeclaration,\n        programEnd: getProgramRangeEnd(programNode),\n    });\n\n    programInsertionLayoutCache.set(programNode, layout);\n\n    return layout;\n};\n\n/**\n * Create a fixer that inserts an import declaration in a safe location: after\n * existing imports, after directive prologue, before first statement, or at\n * file end for empty programs.\n *\n * @param options - Fix-planning options.\n *\n *   - `fixer`: Rule fixer from ESLint.\n *   - `referenceNode`: Node used to discover the enclosing Program.\n *   - `importDeclarationText`: Full import declaration text to insert.\n *   - `moduleSpecifierHint`: Optional known module specifier that skips import-text\n *       parsing when provided.\n *\n * @returns Rule fix when insertion is possible; otherwise `null`.\n */\nexport const createImportInsertionFix = (\n    options: Readonly<{\n        fixer: TSESLint.RuleFixer;\n        importDeclarationText: string;\n        moduleSpecifierHint?: string;\n        referenceNode: Readonly<TSESTree.Node>;\n    }>\n): null | TSESLint.RuleFix => {\n    const { fixer, importDeclarationText, moduleSpecifierHint, referenceNode } =\n        options;\n\n    const normalizedImportDeclarationText = importDeclarationText.trim();\n    if (normalizedImportDeclarationText.length === 0) {\n        return null;\n    }\n\n    const programNode = getProgramNode(referenceNode);\n    if (!programNode) {\n        return null;\n    }\n\n    const insertionLayout = getProgramInsertionLayout(programNode);\n\n    if (insertionLayout.importDeclarations.length > 0) {\n        const moduleSpecifier =\n            moduleSpecifierHint ??\n            getModuleSpecifierFromImportDeclarationText(\n                normalizedImportDeclarationText\n            );\n\n        if (\n            typeof moduleSpecifier === \"string\" &&\n            !isRelativeModuleSpecifier(moduleSpecifier)\n        ) {\n            if (insertionLayout.lastNonRelativeImportDeclaration !== null) {\n                return fixer.insertTextAfter(\n                    insertionLayout.lastNonRelativeImportDeclaration,\n                    `\\n${normalizedImportDeclarationText}`\n                );\n            }\n\n            if (insertionLayout.firstRelativeImportDeclaration !== null) {\n                const firstRelativeImportStart = getNodeRangeStart(\n                    insertionLayout.firstRelativeImportDeclaration\n                );\n\n                if (firstRelativeImportStart !== null) {\n                    return fixer.insertTextBeforeRange(\n                        [firstRelativeImportStart, firstRelativeImportStart],\n                        `${normalizedImportDeclarationText}\\n`\n                    );\n                }\n            }\n        }\n    }\n\n    if (insertionLayout.lastImportDeclaration !== null) {\n        return fixer.insertTextAfter(\n            insertionLayout.lastImportDeclaration,\n            `\\n${normalizedImportDeclarationText}`\n        );\n    }\n\n    if (insertionLayout.lastDirectiveStatement !== null) {\n        return fixer.insertTextAfter(\n            insertionLayout.lastDirectiveStatement,\n            `\\n${normalizedImportDeclarationText}`\n        );\n    }\n\n    if (insertionLayout.firstStatementStart !== null) {\n        return fixer.insertTextBeforeRange(\n            [\n                insertionLayout.firstStatementStart,\n                insertionLayout.firstStatementStart,\n            ],\n            `${normalizedImportDeclarationText}\\n`\n        );\n    }\n\n    if (insertionLayout.programEnd === null) {\n        return null;\n    }\n\n    return fixer.insertTextBeforeRange(\n        [insertionLayout.programEnd, insertionLayout.programEnd],\n        `${insertionLayout.programEnd === 0 ? \"\" : \"\\n\"}${normalizedImportDeclarationText}\\n`\n    );\n};\n", "/**\n * @packageDocumentation\n * Shared bounded-cache helpers with lightweight LRU semantics for hot-path\n * parser/type-analysis caches.\n */\n\nimport { isSafeInteger } from \"ts-extras\";\n\nconst isSameValueZero = <Value>(left: Value, right: Value): boolean =>\n    left === right ||\n    (typeof left === \"number\" &&\n        typeof right === \"number\" &&\n        Number.isNaN(left) &&\n        Number.isNaN(right));\n\n/**\n * Result shape returned by bounded-cache lookups.\n */\nexport type BoundedCacheLookupResult<Value> =\n    | Readonly<{\n          found: false;\n      }>\n    | Readonly<{\n          found: true;\n          value: Value;\n      }>;\n\n/**\n * Read a cache entry and mark it as most-recently-used.\n *\n * @param cache - Mutable cache map.\n * @param key - Entry key.\n *\n * @returns Lookup result describing whether an entry was found. When found,\n *   includes the cached value (which can itself be `undefined`/`null`).\n */\nexport const getBoundedCacheValue = <Key, Value>(\n    cache: Map<Key, Value>,\n    key: Key\n): BoundedCacheLookupResult<Value> => {\n    for (const [entryKey, value] of cache) {\n        if (isSameValueZero(entryKey, key)) {\n            cache.delete(key);\n            cache.set(key, value);\n\n            return {\n                found: true,\n                value,\n            };\n        }\n    }\n\n    return {\n        found: false,\n    };\n};\n\n/**\n * Insert or update a cache entry and evict least-recently-used entries beyond\n * the configured max size.\n *\n * @param options - Bounded-cache insertion options.\n *\n *   - `cache`: Mutable cache map.\n *   - `key`: Entry key.\n *   - `maxEntries`: Maximum number of cache entries to retain.\n *   - `value`: Entry value.\n */\nexport const setBoundedCacheValue = <Key, Value>({\n    cache,\n    key,\n    maxEntries,\n    value,\n}: Readonly<{\n    cache: Map<Key, Value>;\n    key: Key;\n    maxEntries: number;\n    value: Value;\n}>): void => {\n    if (!isSafeInteger(maxEntries) || maxEntries < 1) {\n        return;\n    }\n\n    if (cache.has(key)) {\n        cache.delete(key);\n    }\n\n    cache.set(key, value);\n\n    while (cache.size > maxEntries) {\n        const oldestEntry = cache.keys().next();\n\n        if (oldestEntry.done === true) {\n            return;\n        }\n\n        cache.delete(oldestEntry.value);\n    }\n};\n", "/**\n * @packageDocumentation\n * Shared character classification helpers for lightweight parser/token logic.\n */\n\nimport { isDefined } from \"ts-extras\";\n\nconst ASCII_DIGIT_ZERO = 48 as const;\nconst ASCII_DIGIT_NINE = 57 as const;\nconst ASCII_UPPERCASE_A = 65 as const;\nconst ASCII_UPPERCASE_Z = 90 as const;\nconst ASCII_LOWERCASE_A = 97 as const;\nconst ASCII_LOWERCASE_Z = 122 as const;\n\nconst ASCII_TAB = 9 as const;\nconst ASCII_LINE_FEED = 10 as const;\nconst ASCII_VERTICAL_TAB = 11 as const;\nconst ASCII_FORM_FEED = 12 as const;\nconst ASCII_CARRIAGE_RETURN = 13 as const;\nconst ASCII_SPACE = 32 as const;\nconst NO_BREAK_SPACE = 160 as const;\nconst BYTE_ORDER_MARK = 65_279 as const;\nconst LINE_SEPARATOR = 8232 as const;\nconst PARAGRAPH_SEPARATOR = 8233 as const;\n\nconst DOLLAR_SIGN = \"$\" as const;\nconst UNDERSCORE = \"_\" as const;\n\n/**\n * Determine whether a single-character string is an ASCII identifier part.\n *\n * @remarks\n * This intentionally mirrors lightweight token checks used by internal string\n * parsers. It does not attempt to model full Unicode ECMAScript identifiers.\n */\nexport const isAsciiIdentifierPartCharacter = (character: string): boolean => {\n    if (character === DOLLAR_SIGN || character === UNDERSCORE) {\n        return true;\n    }\n\n    if (character.length === 0) {\n        return false;\n    }\n\n    const codePoint = character.codePointAt(0);\n\n    if (!isDefined(codePoint)) {\n        return false;\n    }\n\n    return (\n        (codePoint >= ASCII_DIGIT_ZERO && codePoint <= ASCII_DIGIT_NINE) ||\n        (codePoint >= ASCII_UPPERCASE_A && codePoint <= ASCII_UPPERCASE_Z) ||\n        (codePoint >= ASCII_LOWERCASE_A && codePoint <= ASCII_LOWERCASE_Z)\n    );\n};\n\n/**\n * Determine whether a single-character string should be treated as whitespace\n * in internal import/token parsing helpers.\n */\nexport const isKnownWhitespaceCharacter = (character: string): boolean => {\n    if (character.length === 0) {\n        return false;\n    }\n\n    const codePoint = character.codePointAt(0);\n\n    if (!isDefined(codePoint)) {\n        return false;\n    }\n\n    return (\n        codePoint === ASCII_TAB ||\n        codePoint === ASCII_LINE_FEED ||\n        codePoint === ASCII_VERTICAL_TAB ||\n        codePoint === ASCII_FORM_FEED ||\n        codePoint === ASCII_CARRIAGE_RETURN ||\n        codePoint === ASCII_SPACE ||\n        codePoint === NO_BREAK_SPACE ||\n        codePoint === BYTE_ORDER_MARK ||\n        codePoint === LINE_SEPARATOR ||\n        codePoint === PARAGRAPH_SEPARATOR\n    );\n};\n", "/**\n * @packageDocumentation\n * Context/source-code scope-resolution helpers.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport { safeCastTo } from \"ts-extras\";\n\ntype SourceCodeScopeGetter = Readonly<{\n    getScope: (node: Readonly<TSESTree.Node>) => TSESLint.Scope.Scope;\n}>;\n\n/**\n * Resolve the lexical scope for a node via modern SourceCode APIs.\n *\n * @remarks\n * ESLint v9+ exposes scope lookups via `context.sourceCode.getScope(node)`.\n * This helper intentionally does not use legacy `context.getScope()`.\n *\n * @param context - Active rule context.\n * @param node - Node used as the scope lookup anchor.\n *\n * @returns Scope when available; otherwise `null`.\n */\nexport const getScopeFromContextSourceCode = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,\n    node: Readonly<TSESTree.Node>\n): null | Readonly<TSESLint.Scope.Scope> => {\n    const sourceCodeMaybeWithScope = safeCastTo<\n        Partial<SourceCodeScopeGetter> | undefined\n    >(context.sourceCode);\n\n    if (typeof sourceCodeMaybeWithScope?.getScope !== \"function\") {\n        return null;\n    }\n\n    return sourceCodeMaybeWithScope.getScope(node);\n};\n", "/**\n * @packageDocumentation\n * Scope-chain helpers for reliable variable-resolution checks.\n */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { resolveFirstValueInLinkedStructure } from \"./cycle-safe-linked-search.js\";\n\n/**\n * Resolve a variable binding by walking the current scope and all parent\n * scopes.\n *\n * @param scope - Initial scope to inspect.\n * @param variableName - Identifier name to resolve.\n *\n * @returns Matched variable binding from the nearest scope chain; otherwise\n *   `null`.\n */\nexport const getVariableInScopeChain = (\n    scope: Readonly<null | Readonly<TSESLint.Scope.Scope>>,\n    variableName: string\n): null | TSESLint.Scope.Variable => {\n    const lookupResult = resolveFirstValueInLinkedStructure<\n        Readonly<TSESLint.Scope.Scope>,\n        TSESLint.Scope.Variable\n    >({\n        getNextNode: (\n            currentScope: Readonly<TSESLint.Scope.Scope>\n        ): null | Readonly<TSESLint.Scope.Scope> => currentScope.upper,\n        resolveValue: (currentScope: Readonly<TSESLint.Scope.Scope>) => {\n            const variable = currentScope.set.get(variableName);\n\n            return variable === undefined\n                ? {\n                      found: false,\n                  }\n                : {\n                      found: true,\n                      value: variable,\n                  };\n        },\n        startNode: scope,\n    });\n\n    return lookupResult.found ? lookupResult.value : null;\n};\n", "/**\n * @packageDocumentation\n * Shared call-expression helpers for matching method calls safely.\n */\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * Strongly-typed shape for non-computed member calls with identifier receiver\n * and property (e.g. `Object.keys`).\n */\nexport type IdentifierMemberCallExpression = TSESTree.CallExpression & {\n    callee: TSESTree.MemberExpression & {\n        computed: false;\n        object: TSESTree.Identifier;\n        property: TSESTree.Identifier;\n    };\n};\n/**\n * Strongly-typed shape for non-computed member calls with identifier property\n * (e.g. `value.includes`).\n */\nexport type IdentifierPropertyMemberCallExpression = TSESTree.CallExpression & {\n    callee: TSESTree.MemberExpression & {\n        computed: false;\n        object: Exclude<TSESTree.MemberExpression[\"object\"], TSESTree.Super>;\n        property: TSESTree.Identifier;\n    };\n};\nconst isIdentifierMemberCallExpression = (\n    options: Readonly<{\n        memberName: string;\n        node: Readonly<TSESTree.CallExpression>;\n        objectName: string;\n    }>\n): options is Readonly<{\n    memberName: string;\n    node: IdentifierMemberCallExpression;\n    objectName: string;\n}> => {\n    const { memberName, node, objectName } = options;\n    if (node.optional) {\n        return false;\n    }\n    const { callee } = node;\n    return (\n        callee.type === AST_NODE_TYPES.MemberExpression &&\n        !callee.computed &&\n        !callee.optional &&\n        callee.object.type === AST_NODE_TYPES.Identifier &&\n        callee.object.name === objectName &&\n        callee.property.type === AST_NODE_TYPES.Identifier &&\n        callee.property.name === memberName\n    );\n};\nconst isIdentifierPropertyMemberCallExpression = (\n    options: Readonly<{\n        memberName: string;\n        node: Readonly<TSESTree.CallExpression>;\n    }>\n): options is Readonly<{\n    memberName: string;\n    node: IdentifierPropertyMemberCallExpression;\n}> => {\n    const { memberName, node } = options;\n    if (node.optional) {\n        return false;\n    }\n    const { callee } = node;\n    return (\n        callee.type === AST_NODE_TYPES.MemberExpression &&\n        !callee.computed &&\n        !callee.optional &&\n        callee.object.type !== AST_NODE_TYPES.Super &&\n        callee.property.type === AST_NODE_TYPES.Identifier &&\n        callee.property.name === memberName\n    );\n};\n/**\n * Match `ObjectName.methodName(...)` style calls.\n *\n * @param options - Candidate call expression and expected receiver/member\n *   names.\n *\n * @returns Narrowed call expression when the shape matches; otherwise `null`.\n */\nexport const getIdentifierMemberCall = (\n    options: Readonly<{\n        memberName: string;\n        node: Readonly<TSESTree.CallExpression>;\n        objectName: string;\n    }>\n): IdentifierMemberCallExpression | null => {\n    if (!isIdentifierMemberCallExpression(options)) {\n        return null;\n    }\n    return options.node;\n};\n/**\n * Match `<expression>.memberName(...)` style calls where the property is a\n * non-computed identifier.\n *\n * @param options - Candidate call expression and expected member name.\n *\n * @returns Narrowed call expression when matched; otherwise `null`.\n */\nexport const getIdentifierPropertyMemberCall = (\n    options: Readonly<{\n        memberName: string;\n        node: Readonly<TSESTree.CallExpression>;\n    }>\n): IdentifierPropertyMemberCallExpression | null => {\n    if (!isIdentifierPropertyMemberCallExpression(options)) {\n        return null;\n    }\n    return options.node;\n};\n", "/**\n * @packageDocumentation\n * Canonical module-source string constants used across rule internals.\n */\n\n/** Canonical source module string for `ts-extras` helpers. */\nexport const TS_EXTRAS_MODULE_SOURCE = \"ts-extras\" as const;\n\n/** Canonical source module string for `type-fest` type utilities. */\nexport const TYPE_FEST_MODULE_SOURCE = \"type-fest\" as const;\n\n/** Canonical source module string for `@typescript-eslint/utils`. */\nexport const TYPESCRIPT_ESLINT_UTILS_MODULE_SOURCE =\n    \"@typescript-eslint/utils\" as const;\n", "/**\n * @packageDocumentation\n * Explicit report-adapter utilities for rule-level autofix policy handling.\n */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport { isDefined, objectHasOwn } from \"ts-extras\";\n\n/**\n * Report callback type for a given message/options pair.\n */\ntype ReportCallback<\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n> = TSESLint.RuleContext<MessageIds, Options>[\"report\"];\n\n/**\n * Canonical report descriptor type for a given message/options pair.\n */\ntype ReportDescriptor<\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n> = Parameters<ReportCallback<MessageIds, Options>>[0];\n\n/**\n * Determine whether a report descriptor has a callable own data-property `fix`\n * value that can be safely omitted.\n */\nconst hasCallableOwnFixDataProperty = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    descriptor: Readonly<ReportDescriptor<MessageIds, Options>>\n): boolean => {\n    const ownFixDescriptor = Object.getOwnPropertyDescriptor(descriptor, \"fix\");\n    if (!isDefined(ownFixDescriptor)) {\n        return false;\n    }\n\n    if (!objectHasOwn(ownFixDescriptor, \"value\")) {\n        return false;\n    }\n\n    return typeof ownFixDescriptor.value === \"function\";\n};\n\n/**\n * Remove top-level autofix from a report descriptor while preserving all other\n * fields (including suggestions).\n */\nexport const omitAutofixFromReportDescriptor = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    descriptor: Readonly<ReportDescriptor<MessageIds, Options>>\n): ReportDescriptor<MessageIds, Options> => {\n    if (!hasCallableOwnFixDataProperty(descriptor)) {\n        return descriptor;\n    }\n\n    const descriptorWithoutFix = {\n        ...descriptor,\n    };\n\n    delete descriptorWithoutFix.fix;\n\n    return descriptorWithoutFix;\n};\n\n/**\n * Build a report callback that enforces no-top-level-autofix semantics.\n */\nexport const createReportWithoutAutofixes =\n    <MessageIds extends string, Options extends Readonly<UnknownArray>>(\n        report: ReportCallback<MessageIds, Options>\n    ): ReportCallback<MessageIds, Options> =>\n    (descriptor) => {\n        report(omitAutofixFromReportDescriptor(descriptor));\n    };\n", "/**\n * @packageDocumentation\n * Shared helpers for consistent rule reporting with optional fixes and\n * suggestion fallbacks.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport { registerProgramSettingsForContext } from \"./plugin-settings.js\";\nimport { omitAutofixFromReportDescriptor } from \"./report-adapter.js\";\n\n/**\n * Resolution result for optional fix/suggestion reporting.\n */\nexport type AutofixOrSuggestionOutcome =\n    | Readonly<{ fix: TSESLint.ReportFixFunction; kind: \"autofix\" }>\n    | Readonly<{ fix: TSESLint.ReportFixFunction; kind: \"suggestion\" }>\n    | Readonly<{ kind: \"no-fix\" }>;\n\n/** Input shape for {@link resolveAutofixOrSuggestionOutcome}. */\ntype AutofixOrSuggestionResolutionInput = Readonly<{\n    canAutofix: boolean;\n    fix: null | TSESLint.ReportFixFunction;\n}>;\n\n/** Concrete report descriptor type for a rule context. */\ntype ReportDescriptor<\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n> = Parameters<TSESLint.RuleContext<MessageIds, Options>[\"report\"]>[0];\n\n/**\n * Report using plugin-aware autofix policy handling.\n */\nexport const reportWithTypefestPolicy = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>({\n    context,\n    descriptor,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>;\n    descriptor: ReportDescriptor<MessageIds, Options>;\n}>): void => {\n    const settings = registerProgramSettingsForContext(context);\n\n    if (!settings.disableAllAutofixes) {\n        context.report(descriptor);\n\n        return;\n    }\n\n    context.report(omitAutofixFromReportDescriptor(descriptor));\n};\n\n/**\n * Report a diagnostic with an optional direct fix.\n *\n * @remarks\n * When `fix` is absent this reports only `messageId` + `node`.\n */\nexport const reportWithOptionalFix = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>({\n    context,\n    data,\n    fix,\n    messageId,\n    node,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>;\n    data?: ReportDescriptor<MessageIds, Options>[\"data\"];\n    fix: null | TSESLint.ReportFixFunction;\n    messageId: MessageIds;\n    node: TSESTree.Node;\n}>): void => {\n    const descriptor: ReportDescriptor<MessageIds, Options> = {\n        ...(data === undefined ? {} : { data }),\n        ...(fix === null ? {} : { fix }),\n        messageId,\n        node,\n    };\n\n    reportWithTypefestPolicy({\n        context,\n        descriptor,\n    });\n};\n\n/**\n * Resolve one of three standardized reporting outcomes:\n *\n * - No fix (`messageId` only),\n * - Direct autofix (`fix`), or\n * - Suggestion-only (`suggest`).\n */\nexport function resolveAutofixOrSuggestionOutcome({\n    canAutofix,\n    fix,\n}: AutofixOrSuggestionResolutionInput): AutofixOrSuggestionOutcome {\n    if (fix === null) {\n        return {\n            kind: \"no-fix\",\n        };\n    }\n\n    if (canAutofix) {\n        return {\n            fix,\n            kind: \"autofix\",\n        };\n    }\n\n    return {\n        fix,\n        kind: \"suggestion\",\n    };\n}\n\n/**\n * Report a previously resolved autofix/suggestion outcome.\n *\n * @remarks\n * - Suggestion outcomes are reported with a single `suggest` entry.\n * - Autofix and no-fix outcomes are delegated to {@link reportWithOptionalFix}.\n */\nexport const reportResolvedAutofixOrSuggestionOutcome = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>({\n    context,\n    data,\n    messageId,\n    node,\n    outcome,\n    suggestionMessageId,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>;\n    data?: ReportDescriptor<MessageIds, Options>[\"data\"];\n    messageId: MessageIds;\n    node: TSESTree.Node;\n    outcome: AutofixOrSuggestionOutcome;\n    suggestionMessageId: MessageIds;\n}>): void => {\n    if (outcome.kind === \"suggestion\") {\n        reportWithTypefestPolicy({\n            context,\n            descriptor: {\n                ...(data === undefined ? {} : { data }),\n                messageId,\n                node,\n                suggest: [\n                    {\n                        fix: outcome.fix,\n                        messageId: suggestionMessageId,\n                    },\n                ],\n            },\n        });\n\n        return;\n    }\n\n    reportWithOptionalFix({\n        context,\n        data,\n        fix: outcome.kind === \"autofix\" ? outcome.fix : null,\n        messageId,\n        node,\n    });\n};\n", "/**\n * @packageDocumentation\n * Shared reporting helper for ts-extras array-method call replacement rules.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport {\n    createMethodToFunctionCallFix,\n    type ImportedValueAliasMap,\n} from \"./imported-value-symbols.js\";\nimport { getIdentifierPropertyMemberCall } from \"./member-call.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"./module-source.js\";\nimport {\n    reportResolvedAutofixOrSuggestionOutcome,\n    resolveAutofixOrSuggestionOutcome,\n} from \"./rule-reporting.js\";\n\n/** Typed rule context shape for array-method rule listeners. */\ntype ArrayMethodRuleContext<MessageId extends string> = Readonly<\n    TSESLint.RuleContext<MessageId, Readonly<UnknownArray>>\n>;\n\n/** Direct named value imports collection type from shared import helper. */\ntype DirectNamedValueImports = ImportedValueAliasMap;\n\n/**\n * Match `<arrayExpr>.<method>(...)` and report a standardized ts-extras helper\n * replacement when the receiver is array-like.\n */\nexport const reportTsExtrasArrayMethodCall = <MessageId extends string>({\n    canAutofix,\n    context,\n    importedName,\n    imports,\n    isArrayLikeExpression,\n    memberName,\n    messageId,\n    node,\n    reportSuggestion,\n    suggestionMessageId,\n}: Readonly<{\n    canAutofix?: (node: Readonly<TSESTree.CallExpression>) => boolean;\n    context: ArrayMethodRuleContext<MessageId>;\n    importedName: string;\n    imports: DirectNamedValueImports;\n    isArrayLikeExpression: (\n        expression: Readonly<TSESTree.Expression>\n    ) => boolean;\n    memberName: string;\n    messageId: MessageId;\n    node: Readonly<TSESTree.CallExpression>;\n    reportSuggestion?: (\n        input: Readonly<{\n            fix: TSESLint.ReportFixFunction;\n            messageId: MessageId;\n            node: Readonly<TSESTree.CallExpression>;\n            suggestionMessageId: MessageId;\n        }>\n    ) => void;\n    suggestionMessageId?: MessageId;\n}>): void => {\n    const memberCall = getIdentifierPropertyMemberCall({\n        memberName,\n        node,\n    });\n\n    if (memberCall === null) {\n        return;\n    }\n\n    if (!isArrayLikeExpression(memberCall.callee.object)) {\n        return;\n    }\n\n    const shouldAutofix = canAutofix?.(node) ?? true;\n    const fix = createMethodToFunctionCallFix({\n        callNode: node,\n        context,\n        importedName,\n        imports,\n        sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n    });\n\n    const outcome = resolveAutofixOrSuggestionOutcome({\n        canAutofix: shouldAutofix,\n        fix,\n    });\n\n    if (outcome.kind === \"suggestion\" && reportSuggestion !== undefined) {\n        reportSuggestion({\n            fix: outcome.fix,\n            messageId,\n            node,\n            suggestionMessageId: suggestionMessageId ?? messageId,\n        });\n\n        return;\n    }\n\n    reportResolvedAutofixOrSuggestionOutcome({\n        context,\n        messageId,\n        node,\n        outcome,\n        suggestionMessageId: suggestionMessageId ?? messageId,\n    });\n};\n", "/**\n * @packageDocumentation\n * Internal shared utilities used by eslint-plugin-typefest rule modules and\n * plugin wiring.\n */\nimport type { UnknownArray } from \"type-fest\";\nimport type ts from \"typescript\";\n\nimport {\n    AST_NODE_TYPES,\n    ESLintUtils,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\nimport { assertDefined, isDefined } from \"ts-extras\";\n\nimport type { TypefestConfigReference } from \"./typefest-config-references.js\";\n\nimport { registerProgramSettingsForContext } from \"./plugin-settings.js\";\nimport { getRuleCatalogEntryForRuleNameOrNull } from \"./rule-catalog.js\";\nimport { createRuleDocsUrl } from \"./rule-docs-url.js\";\nimport { safeTypeOperation } from \"./safe-type-operation.js\";\nimport { getScopeFromContextSourceCode } from \"./scope-resolution.js\";\nimport { getVariableInScopeChain } from \"./scope-variable.js\";\nimport { getTypeCheckerIsTypeAssignableToResult } from \"./type-checker-compat.js\";\n\n/**\n * Parser services and type checker bundle used by typed rules.\n */\nexport interface TypedRuleServices {\n    checker: ts.TypeChecker;\n    parserServices: ReturnType<typeof ESLintUtils.getParserServices>;\n}\n\n/** Shared typed-rule context contract used by helper utilities. */\ntype TypedRuleContext = Readonly<TSESLint.RuleContext<string, UnknownArray>>;\n\nexport type { TypedRuleContext };\n\ntype TypefestRuleCreator = ReturnType<\n    typeof ESLintUtils.RuleCreator<TypefestRuleDocs>\n>;\n\n/**\n * Plugin-specific metadata extensions for `meta.docs`.\n *\n * @remarks\n * `eslint-plugin/require-meta-docs-recommended` expects `meta.docs.recommended`\n * to be boolean. Preset membership is tracked separately via\n * `meta.docs.typefestConfigs`.\n *\n * `ruleId` and `ruleNumber` are injected centrally by `createTypedRule` for\n * cataloged `prefer-*` rules. Rule authors should not hand-author those fields\n * in individual rule modules.\n */\ninterface TypefestRuleDocs {\n    recommended?: boolean;\n    requiresTypeChecking?: boolean;\n    ruleId?: string;\n    ruleNumber?: number;\n    typefestConfigs?:\n        | readonly TypefestConfigReference[]\n        | TypefestConfigReference;\n}\n\n/**\n * Rule-creator wrapper used by all plugin rules.\n *\n * @remarks\n * This wrapper automatically registers per-program plugin settings and injects\n * canonical `meta.docs.ruleId` / `meta.docs.ruleNumber` values for cataloged\n * public rules.\n *\n * @param ruleDefinition - Rule module definition passed to\n *   `ESLintUtils.RuleCreator`.\n *\n * @returns Rule module factory output that auto-registers program settings and\n *   preserves the authored rule contract.\n */\nexport const createTypedRule: TypefestRuleCreator = (ruleDefinition) => {\n    const catalogEntry = getRuleCatalogEntryForRuleNameOrNull(\n        ruleDefinition.name\n    );\n    const createdRule = ESLintUtils.RuleCreator.withoutDocs(ruleDefinition);\n    const ruleDocs = createdRule.meta.docs;\n    assertDefined(ruleDocs);\n    const canonicalDocsUrl = createRuleDocsUrl(ruleDefinition.name);\n\n    if (typeof ruleDocs.url === \"string\" && ruleDocs.url !== canonicalDocsUrl) {\n        throw new TypeError(\n            `Rule '${ruleDefinition.name}' has non-canonical docs.url '${ruleDocs.url}'. Expected '${canonicalDocsUrl}'.`\n        );\n    }\n\n    if (ruleDefinition.name.startsWith(\"prefer-\") && catalogEntry === null) {\n        throw new TypeError(\n            `Rule '${ruleDefinition.name}' is missing from the stable rule catalog.`\n        );\n    }\n\n    const docsWithCatalog: TSESLint.RuleMetaDataDocs & TypefestRuleDocs =\n        catalogEntry === null\n            ? {\n                  ...ruleDocs,\n                  url: canonicalDocsUrl,\n              }\n            : {\n                  ...ruleDocs,\n                  ruleId: catalogEntry.ruleId,\n                  ruleNumber: catalogEntry.ruleNumber,\n                  url: canonicalDocsUrl,\n              };\n\n    const metaDefaultOptions = createdRule.meta.defaultOptions;\n\n    return {\n        ...createdRule,\n        create(context) {\n            registerProgramSettingsForContext(context);\n\n            return createdRule.create(context);\n        },\n        meta: {\n            ...createdRule.meta,\n            ...(isDefined(metaDefaultOptions)\n                ? { defaultOptions: metaDefaultOptions }\n                : {}),\n            docs: docsWithCatalog,\n        },\n        name: ruleDefinition.name,\n    };\n};\n\n/**\n * Retrieve parser services and type checker for typed rules.\n *\n * @param context - Rule context from the current lint evaluation.\n *\n * @returns Parser services and type checker references bound to the current\n *   program.\n *\n * @throws Throws when `parserServices.program` is unavailable, which indicates\n *   the current lint run is not configured for type-aware analysis.\n */\nexport const getTypedRuleServices = (\n    context: TypedRuleContext\n): TypedRuleServices => {\n    const parserServices = ESLintUtils.getParserServices(context, true);\n    const program = parserServices.program;\n\n    if (program === null) {\n        throw new Error(\n            \"Typed rule requires parserServices.program; ensure projectService is enabled for this lint run.\"\n        );\n    }\n\n    return {\n        checker: program.getTypeChecker(),\n        parserServices,\n    };\n};\n\n/**\n * Determine whether the current lint context has full type information.\n *\n * @param context - Rule context from the current lint evaluation.\n *\n * @returns `true` when parser services and `program` are available.\n */\nexport const hasTypeServices = (context: TypedRuleContext): boolean => {\n    const parserServicesResult = safeTypeOperation({\n        operation: () => ESLintUtils.getParserServices(context, true),\n        reason: \"typed-rule-services-check-failed\",\n    });\n\n    return (\n        parserServicesResult.ok && parserServicesResult.value.program !== null\n    );\n};\n\n/**\n * Retrieve typed services when available, otherwise return `undefined`.\n *\n * @param context - Rule context from the current lint evaluation.\n *\n * @returns Typed services when parser services include a TypeScript program.\n */\nexport const getTypedRuleServicesOrUndefined = (\n    context: TypedRuleContext\n): TypedRuleServices | undefined =>\n    hasTypeServices(context) ? getTypedRuleServices(context) : undefined;\n\n/**\n * Determine whether one TypeScript type is assignable to another.\n *\n * @remarks\n * Uses `checker.isTypeAssignableTo` when available and falls back to strict\n * reference equality if the checker API is unavailable or throws.\n *\n * @param checker - TypeScript type checker.\n * @param sourceType - Candidate source type.\n * @param targetType - Candidate target type.\n *\n * @returns `true` when assignable; otherwise `false`.\n */\nexport const isTypeAssignableTo = (\n    checker: Readonly<ts.TypeChecker>,\n    sourceType: Readonly<ts.Type>,\n    targetType: Readonly<ts.Type>\n): boolean => {\n    const result = safeTypeOperation({\n        operation: () =>\n            getTypeCheckerIsTypeAssignableToResult(\n                checker,\n                sourceType,\n                targetType\n            ),\n        reason: \"type-assignability-check-failed\",\n    });\n\n    if (!result.ok || typeof result.value !== \"boolean\") {\n        return sourceType === targetType;\n    }\n\n    return result.value;\n};\n\n/**\n * Resolve the type of a signature parameter by index.\n *\n * @param options - Signature parameter lookup options.\n *\n *   - `checker`: TypeScript type checker.\n *   - `index`: Parameter index in the signature.\n *   - `location`: Source location used for contextual type lookup.\n *   - `signature`: Candidate call signature.\n *\n * @returns Parameter type when available; otherwise `undefined`.\n */\nexport const getSignatureParameterTypeAt = (\n    options: Readonly<{\n        checker: ts.TypeChecker;\n        index: number;\n        location: ts.Node;\n        signature: null | ts.Signature | undefined;\n    }>\n): ts.Type | undefined => {\n    const { checker, index, location, signature } = options;\n\n    const symbol = signature?.parameters[index];\n    if (!symbol) {\n        return undefined;\n    }\n\n    return checker.getTypeOfSymbolAtLocation(symbol, location);\n};\n\n/**\n * Determine whether an expression references an unshadowed global identifier.\n *\n * @param context - Rule context used for scope resolution.\n * @param expression - Expression to inspect.\n * @param identifierName - Expected identifier name.\n *\n * @returns `true` when the expression is an Identifier with the expected name\n *   and resolves to the global binding.\n */\nexport const isGlobalIdentifierNamed = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,\n    expression: Readonly<TSESTree.Expression>,\n    identifierName: string\n): expression is TSESTree.Identifier => {\n    if (\n        expression.type !== AST_NODE_TYPES.Identifier ||\n        expression.name !== identifierName\n    ) {\n        return false;\n    }\n\n    const result = safeTypeOperation({\n        operation: () => {\n            const initialScope = getScopeFromContextSourceCode(\n                context,\n                expression\n            );\n\n            if (initialScope === null) {\n                return true;\n            }\n\n            const variable = getVariableInScopeChain(\n                initialScope,\n                identifierName\n            );\n\n            return variable === null || variable.defs.length === 0;\n        },\n        reason: \"scope-resolution-failed\",\n    });\n\n    if (!result.ok) {\n        return false;\n    }\n\n    return result.value;\n};\n\n/**\n * Determine whether an expression references the global `undefined` binding\n * (not a shadowed user-defined symbol).\n *\n * @param context - Rule context used for scope resolution.\n * @param expression - Expression to inspect.\n *\n * @returns `true` when the expression is an Identifier named `undefined` that\n *   resolves to the global binding.\n */\nexport const isGlobalUndefinedIdentifier = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.Identifier =>\n    isGlobalIdentifierNamed(context, expression, \"undefined\");\n", "/**\n * @packageDocumentation\n * Stable catalog IDs for all plugin rules.\n */\nimport { objectFromEntries, setHas } from \"ts-extras\";\n\n/**\n * Catalog metadata for a single rule.\n */\nexport type TypefestRuleCatalogEntry = Readonly<{\n    ruleId: TypefestRuleCatalogId;\n    ruleName: TypefestRuleNamePattern;\n    ruleNumber: number;\n}>;\n\n/**\n * Stable machine-friendly rule id format (for example: `R001`).\n */\nexport type TypefestRuleCatalogId = `R${string}`;\n\n/** Pattern for unqualified rule names supported by eslint-plugin-typefest. */\ntype TypefestRuleNamePattern = `prefer-${string}`;\n\n/**\n * Stable global ordering used for rule catalog IDs.\n *\n * @remarks\n * Append new rules to preserve existing IDs.\n */\n\nconst orderedRuleNames = [\n    \"prefer-ts-extras-array-at\",\n    \"prefer-ts-extras-array-concat\",\n    // Reserved historical rule IDs kept in the catalog so removing these\n    // unusable rules does not renumber every later public rule reference.\n    \"prefer-ts-extras-array-find\",\n    \"prefer-ts-extras-array-find-last\",\n    \"prefer-ts-extras-array-find-last-index\",\n    \"prefer-ts-extras-array-first\",\n    \"prefer-ts-extras-array-includes\",\n    \"prefer-ts-extras-array-join\",\n    \"prefer-ts-extras-array-last\",\n    \"prefer-ts-extras-as-writable\",\n    \"prefer-ts-extras-assert-defined\",\n    \"prefer-ts-extras-assert-error\",\n    \"prefer-ts-extras-assert-never\",\n    \"prefer-ts-extras-assert-present\",\n    \"prefer-ts-extras-is-defined\",\n    \"prefer-ts-extras-is-defined-filter\",\n    \"prefer-ts-extras-is-empty\",\n    \"prefer-ts-extras-is-equal-type\",\n    \"prefer-ts-extras-is-finite\",\n    \"prefer-ts-extras-is-infinite\",\n    \"prefer-ts-extras-is-integer\",\n    \"prefer-ts-extras-is-present\",\n    \"prefer-ts-extras-is-present-filter\",\n    \"prefer-ts-extras-is-property-defined\",\n    \"prefer-ts-extras-is-property-present\",\n    \"prefer-ts-extras-is-safe-integer\",\n    \"prefer-ts-extras-key-in\",\n    \"prefer-ts-extras-not\",\n    \"prefer-ts-extras-object-entries\",\n    \"prefer-ts-extras-object-from-entries\",\n    \"prefer-ts-extras-object-has-in\",\n    \"prefer-ts-extras-object-has-own\",\n    \"prefer-ts-extras-object-keys\",\n    \"prefer-ts-extras-object-map-values\",\n    \"prefer-ts-extras-object-values\",\n    \"prefer-ts-extras-safe-cast-to\",\n    \"prefer-ts-extras-set-has\",\n    \"prefer-ts-extras-string-split\",\n    \"prefer-type-fest-absolute\",\n    \"prefer-type-fest-abstract-constructor\",\n    \"prefer-type-fest-and-all\",\n    \"prefer-type-fest-array-length\",\n    \"prefer-type-fest-arrayable\",\n    \"prefer-type-fest-async-return-type\",\n    \"prefer-type-fest-asyncify\",\n    \"prefer-type-fest-conditional-except\",\n    \"prefer-type-fest-conditional-keys\",\n    \"prefer-type-fest-conditional-pick\",\n    \"prefer-type-fest-conditional-pick-deep\",\n    \"prefer-type-fest-constructor\",\n    \"prefer-type-fest-distributed-omit\",\n    \"prefer-type-fest-distributed-pick\",\n    \"prefer-type-fest-except\",\n    \"prefer-type-fest-if\",\n    \"prefer-type-fest-iterable-element\",\n    \"prefer-type-fest-json-array\",\n    \"prefer-type-fest-json-object\",\n    \"prefer-type-fest-json-primitive\",\n    \"prefer-type-fest-json-value\",\n    \"prefer-type-fest-keys-of-union\",\n    \"prefer-type-fest-less-than\",\n    \"prefer-type-fest-less-than-or-equal\",\n    \"prefer-type-fest-literal-union\",\n    \"prefer-type-fest-merge\",\n    \"prefer-type-fest-merge-exclusive\",\n    \"prefer-type-fest-non-empty-tuple\",\n    \"prefer-type-fest-non-nullable-deep\",\n    \"prefer-type-fest-omit-index-signature\",\n    \"prefer-type-fest-optional\",\n    \"prefer-type-fest-or-all\",\n    \"prefer-type-fest-partial-deep\",\n    \"prefer-type-fest-pick-index-signature\",\n    \"prefer-type-fest-primitive\",\n    \"prefer-type-fest-promisable\",\n    \"prefer-type-fest-readonly-deep\",\n    \"prefer-type-fest-require-all-or-none\",\n    \"prefer-type-fest-require-at-least-one\",\n    \"prefer-type-fest-require-exactly-one\",\n    \"prefer-type-fest-require-one-or-none\",\n    \"prefer-type-fest-required-deep\",\n    \"prefer-type-fest-schema\",\n    \"prefer-type-fest-set-non-nullable\",\n    \"prefer-type-fest-set-optional\",\n    \"prefer-type-fest-set-readonly\",\n    \"prefer-type-fest-set-required\",\n    \"prefer-type-fest-set-return-type\",\n    \"prefer-type-fest-simplify\",\n    \"prefer-type-fest-stringified\",\n    \"prefer-type-fest-tagged-brands\",\n    \"prefer-type-fest-tuple-of\",\n    \"prefer-type-fest-union-length\",\n    \"prefer-type-fest-union-member\",\n    \"prefer-type-fest-union-to-intersection\",\n    \"prefer-type-fest-union-to-tuple\",\n    \"prefer-type-fest-unknown-array\",\n    \"prefer-type-fest-unknown-map\",\n    \"prefer-type-fest-unknown-record\",\n    \"prefer-type-fest-unknown-set\",\n    \"prefer-type-fest-unwrap-tagged\",\n    \"prefer-type-fest-value-of\",\n    \"prefer-type-fest-writable\",\n    \"prefer-type-fest-writable-deep\",\n    \"prefer-type-fest-is-any\",\n    \"prefer-type-fest-is-never\",\n    \"prefer-type-fest-is-null\",\n    \"prefer-type-fest-is-undefined\",\n    \"prefer-type-fest-entry\",\n    \"prefer-type-fest-entries\",\n    \"prefer-type-fest-array-element\",\n    \"prefer-type-fest-array-values\",\n    \"prefer-type-fest-is-unknown\",\n    \"prefer-type-fest-is-tuple\",\n    \"prefer-type-fest-and\",\n    \"prefer-type-fest-or\",\n    \"prefer-type-fest-extract-rest-element\",\n    \"prefer-type-fest-is-nullable\",\n    \"prefer-type-fest-has-optional-keys\",\n    \"prefer-type-fest-has-required-keys\",\n    \"prefer-type-fest-has-readonly-keys\",\n    \"prefer-type-fest-has-writable-keys\",\n    \"prefer-type-fest-optional-keys-of\",\n    \"prefer-type-fest-required-keys-of\",\n    \"prefer-type-fest-readonly-keys-of\",\n    \"prefer-type-fest-writable-keys-of\",\n] as const satisfies readonly TypefestRuleNamePattern[];\n\nconst toRuleCatalogId = (ruleNumber: number): TypefestRuleCatalogId =>\n    `R${String(ruleNumber).padStart(3, \"0\")}`;\n\nconst isTypefestRuleNamePattern = (\n    ruleName: string\n): ruleName is TypefestRuleNamePattern => ruleName.startsWith(\"prefer-\");\n\n/**\n * Canonical catalog metadata entries in stable display/order form.\n */\nexport const typefestRuleCatalogEntries: readonly TypefestRuleCatalogEntry[] =\n    orderedRuleNames.map((ruleName, index) => {\n        const ruleNumber = index + 1;\n\n        return {\n            ruleId: toRuleCatalogId(ruleNumber),\n            ruleName,\n            ruleNumber,\n        };\n    });\n\n/**\n * Fast lookup map for rule catalog metadata by rule name.\n */\nexport const typefestRuleCatalogByRuleName: Readonly<\n    Partial<Record<TypefestRuleNamePattern, TypefestRuleCatalogEntry>>\n> = objectFromEntries(\n    typefestRuleCatalogEntries.map((entry) => [entry.ruleName, entry])\n);\n\n/**\n * Resolve stable catalog metadata for a rule name.\n *\n * @throws When the rule is missing from the catalog.\n */\n/**\n * Resolve stable catalog metadata for a rule name when available.\n */\nexport const getRuleCatalogEntryForRuleNameOrNull = (\n    ruleName: string\n): null | TypefestRuleCatalogEntry => {\n    if (!isTypefestRuleNamePattern(ruleName)) {\n        return null;\n    }\n\n    return typefestRuleCatalogByRuleName[ruleName] ?? null;\n};\n\n/**\n * Resolve stable catalog metadata for a rule name.\n *\n * @throws When the rule is missing from the catalog.\n */\nexport const getRuleCatalogEntryForRuleName = (\n    ruleName: string\n): TypefestRuleCatalogEntry => {\n    const catalogEntry = getRuleCatalogEntryForRuleNameOrNull(ruleName);\n\n    if (catalogEntry === null) {\n        throw new TypeError(\n            `Rule '${ruleName}' is missing from the stable rule catalog.`\n        );\n    }\n\n    return catalogEntry;\n};\n\n/**\n * Resolve stable catalog metadata by rule id.\n */\nexport const typefestRuleCatalogByRuleId: ReadonlyMap<\n    TypefestRuleCatalogId,\n    TypefestRuleCatalogEntry\n> = new Map(typefestRuleCatalogEntries.map((entry) => [entry.ruleId, entry]));\n\n/**\n * Resolve stable catalog metadata for a catalog id.\n */\nexport const getRuleCatalogEntryForRuleId = (\n    ruleId: TypefestRuleCatalogId\n): TypefestRuleCatalogEntry | undefined =>\n    typefestRuleCatalogByRuleId.get(ruleId);\n\n/**\n * Validate that catalog IDs are unique and sequential.\n */\nexport const validateRuleCatalogIntegrity = (): boolean => {\n    const entries = typefestRuleCatalogEntries;\n    const seenRuleIds = new Set<TypefestRuleCatalogId>();\n\n    for (const [index, entry] of entries.entries()) {\n        if (setHas(seenRuleIds, entry.ruleId)) {\n            return false;\n        }\n\n        seenRuleIds.add(entry.ruleId);\n\n        const expectedRuleNumber = index + 1;\n        if (entry.ruleNumber !== expectedRuleNumber) {\n            return false;\n        }\n\n        if (entry.ruleId !== toRuleCatalogId(expectedRuleNumber)) {\n            return false;\n        }\n    }\n\n    return true;\n};\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-at`.\n */\nimport { createIsArrayLikeExpressionChecker } from \"../_internal/array-like-expression.js\";\nimport { reportTsExtrasArrayMethodCall } from \"../_internal/array-method-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-array-at`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasArrayAtRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"at\"]'(\n                    node\n                ) {\n                    reportTsExtrasArrayMethodCall({\n                        context,\n                        importedName: \"arrayAt\",\n                        imports: tsExtrasImports,\n                        isArrayLikeExpression,\n                        memberName: \"at\",\n                        messageId: \"preferTsExtrasArrayAt\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras arrayAt over Array#at for stronger element inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-at\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasArrayAt:\n                    \"Prefer `arrayAt` from `ts-extras` over `array.at(...)` for stronger element inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-at\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-at` rule module.\n */\nexport default preferTsExtrasArrayAtRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-concat`.\n */\nimport { createIsArrayLikeExpressionChecker } from \"../_internal/array-like-expression.js\";\nimport { reportTsExtrasArrayMethodCall } from \"../_internal/array-method-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-array-concat`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasArrayConcatRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"concat\"]'(\n                    node\n                ) {\n                    reportTsExtrasArrayMethodCall({\n                        context,\n                        importedName: \"arrayConcat\",\n                        imports: tsExtrasImports,\n                        isArrayLikeExpression,\n                        memberName: \"concat\",\n                        messageId: \"preferTsExtrasArrayConcat\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras arrayConcat over Array#concat for stronger tuple and readonly-array typing.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-concat\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasArrayConcat:\n                    \"Prefer `arrayConcat` from `ts-extras` over `array.concat(...)` for stronger tuple and readonly-array typing.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-concat\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-concat` rule module.\n */\nexport default preferTsExtrasArrayConcatRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-first`.\n */\nimport { safeCastTo } from \"ts-extras\";\n\nimport {\n    createIsArrayLikeExpressionChecker,\n    isWriteTargetMemberExpression,\n} from \"../_internal/array-like-expression.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createMemberToFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n    resolveAutofixOrSuggestionOutcome,\n} from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\nimport { isArrayIndexReadAutofixSafe } from \"../_internal/value-rewrite-autofix-safety.js\";\n\n/**\n * Checks whether a computed member property represents index `0`.\n *\n * @param node - Member property node candidate.\n *\n * @returns `true` for numeric `0` and string literal `\"0\"` property nodes.\n */\n\nconst isZeroProperty = (\n    node: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>\n): boolean =>\n    node.type === AST_NODE_TYPES.Literal &&\n    (node.value === 0 || node.value === \"0\");\n\n/**\n * ESLint rule definition for `prefer-ts-extras-array-first`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasArrayFirstRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'MemberExpression[computed=true][property.type=\"Literal\"]'(\n                    node\n                ) {\n                    const memberNode =\n                        safeCastTo<TSESTree.MemberExpression>(node);\n\n                    if (!isZeroProperty(memberNode.property)) {\n                        return;\n                    }\n\n                    if (isWriteTargetMemberExpression(memberNode)) {\n                        return;\n                    }\n\n                    if (!isArrayLikeExpression(memberNode.object)) {\n                        return;\n                    }\n\n                    const outcome = resolveAutofixOrSuggestionOutcome({\n                        canAutofix: isArrayIndexReadAutofixSafe(memberNode),\n                        fix: createMemberToFunctionCallFix({\n                            context,\n                            importedName: \"arrayFirst\",\n                            imports: tsExtrasImports,\n                            memberNode,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                        }),\n                    });\n\n                    if (outcome.kind === \"suggestion\") {\n                        reportWithTypefestPolicy({\n                            context,\n                            descriptor: {\n                                messageId: \"preferTsExtrasArrayFirst\",\n                                node: memberNode,\n                                suggest: [\n                                    {\n                                        fix: outcome.fix,\n                                        messageId: \"suggestTsExtrasArrayFirst\",\n                                    },\n                                ],\n                            },\n                        });\n\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: outcome.kind === \"autofix\" ? outcome.fix : null,\n                        messageId: \"preferTsExtrasArrayFirst\",\n                        node: memberNode,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras arrayFirst over direct [0] array access for stronger tuple and readonly-array inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-first\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasArrayFirst:\n                    \"Prefer `arrayFirst` from `ts-extras` over direct `array[0]` access for stronger inference.\",\n                suggestTsExtrasArrayFirst:\n                    \"Replace this direct index access with `arrayFirst(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-first\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-first` rule module.\n */\nexport default preferTsExtrasArrayFirstRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Shared safety checks for value-expression autofixes.\n */\nimport { getParentNode } from \"./ast-node.js\";\n\n/**\n * Check whether a parent node is a transparent expression wrapper for `child`.\n */\nexport const isTransparentExpressionWrapper = (\n    parent: Readonly<TSESTree.Node>,\n    child: Readonly<TSESTree.Node>\n): boolean => {\n    if (parent.type === AST_NODE_TYPES.ChainExpression) {\n        return parent.expression === child;\n    }\n\n    if (parent.type === AST_NODE_TYPES.TSAsExpression) {\n        return parent.expression === child;\n    }\n\n    if (parent.type === AST_NODE_TYPES.TSNonNullExpression) {\n        return parent.expression === child;\n    }\n\n    if (parent.type === AST_NODE_TYPES.TSSatisfiesExpression) {\n        return parent.expression === child;\n    }\n\n    if (parent.type === AST_NODE_TYPES.TSTypeAssertion) {\n        return parent.expression === child;\n    }\n\n    return false;\n};\n\n/**\n * Detect whether an expression is a chain/optional-call/optional-member shape.\n */\nexport const isOptionalChainExpression = (\n    node: Readonly<TSESTree.Expression>\n): boolean =>\n    node.type === AST_NODE_TYPES.ChainExpression ||\n    ((node.type === AST_NODE_TYPES.CallExpression ||\n        node.type === AST_NODE_TYPES.MemberExpression) &&\n        node.optional);\n\n/**\n * Determine whether an expression occupies a direct return position.\n */\nexport const isDirectReturnLikeExpressionPosition = (\n    node: Readonly<TSESTree.Expression>\n): boolean => {\n    let currentNode: Readonly<TSESTree.Node> = node;\n\n    while (true) {\n        const parentNode = getParentNode(currentNode);\n\n        if (parentNode === undefined) {\n            return false;\n        }\n\n        if (isTransparentExpressionWrapper(parentNode, currentNode)) {\n            currentNode = parentNode;\n            continue;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.ReturnStatement &&\n            parentNode.argument === currentNode\n        ) {\n            return true;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.ArrowFunctionExpression &&\n            parentNode.body === currentNode\n        ) {\n            return true;\n        }\n\n        return false;\n    }\n};\n\n/**\n * Guard array index-to-helper rewrites known to be type-sensitive.\n */\nexport const isArrayIndexReadAutofixSafe = (\n    node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n    if (isOptionalChainExpression(node.object)) {\n        return false;\n    }\n\n    if (isDirectReturnLikeExpressionPosition(node)) {\n        return false;\n    }\n\n    return true;\n};\n\n/**\n * Determine whether an expression is safe to evaluate fewer times after a\n * rewrite that collapses duplicate evaluations.\n *\n * @remarks\n * Expressions such as member access or function calls can change runtime\n * behavior when duplicated evaluation sites are rewritten to a single helper\n * call. This helper intentionally accepts only stable, exception-free\n * primitives and identifiers.\n */\nexport const isRepeatablyEvaluableExpression = (\n    node: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>\n): node is TSESTree.Expression => {\n    if (node.type === AST_NODE_TYPES.PrivateIdentifier) {\n        return false;\n    }\n\n    if (\n        node.type === AST_NODE_TYPES.TSAsExpression ||\n        node.type === AST_NODE_TYPES.TSNonNullExpression ||\n        node.type === AST_NODE_TYPES.TSSatisfiesExpression ||\n        node.type === AST_NODE_TYPES.TSTypeAssertion\n    ) {\n        return isRepeatablyEvaluableExpression(node.expression);\n    }\n\n    if (node.type === AST_NODE_TYPES.ChainExpression) {\n        return isRepeatablyEvaluableExpression(node.expression);\n    }\n\n    if (node.type === AST_NODE_TYPES.Identifier) {\n        return true;\n    }\n\n    if (node.type === AST_NODE_TYPES.Literal) {\n        return true;\n    }\n\n    if (node.type === AST_NODE_TYPES.TemplateLiteral) {\n        return node.expressions.length === 0;\n    }\n\n    if (node.type === AST_NODE_TYPES.ThisExpression) {\n        return true;\n    }\n\n    return false;\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Conservative safety checks for autofixes that introduce type predicates.\n */\nimport { getParentNode } from \"./ast-node.js\";\nimport { isTransparentExpressionWrapper } from \"./value-rewrite-autofix-safety.js\";\n\n/**\n * Determine whether a call-expression replacement to a type-predicate helper is\n * safe to apply as an autofix.\n *\n * @remarks\n * Type-predicate helpers (for example `setHas`) can change control-flow\n * narrowing in boolean guard expressions. This check intentionally disables\n * autofix in those contexts and leaves a diagnostic for manual review.\n */\nexport const isTypePredicateExpressionAutofixSafe = (\n    node: Readonly<TSESTree.Expression>\n): boolean => {\n    let currentNode: Readonly<TSESTree.Node> = node;\n\n    while (true) {\n        const parentNode = getParentNode(currentNode);\n\n        if (parentNode === undefined) {\n            return true;\n        }\n\n        if (isTransparentExpressionWrapper(parentNode, currentNode)) {\n            currentNode = parentNode;\n            continue;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.UnaryExpression &&\n            parentNode.operator === \"!\" &&\n            parentNode.argument === currentNode\n        ) {\n            return false;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.LogicalExpression &&\n            (parentNode.left === currentNode ||\n                parentNode.right === currentNode)\n        ) {\n            return false;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.ConditionalExpression &&\n            parentNode.test === currentNode\n        ) {\n            return false;\n        }\n\n        if (\n            (parentNode.type === AST_NODE_TYPES.DoWhileStatement ||\n                parentNode.type === AST_NODE_TYPES.IfStatement ||\n                parentNode.type === AST_NODE_TYPES.WhileStatement) &&\n            parentNode.test === currentNode\n        ) {\n            return false;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.ForStatement &&\n            parentNode.test === currentNode\n        ) {\n            return false;\n        }\n\n        if (\n            parentNode.type === AST_NODE_TYPES.SwitchCase &&\n            parentNode.test === currentNode\n        ) {\n            return false;\n        }\n\n        return true;\n    }\n};\n\n/**\n * Backward-compatible alias for call-expression-based callers.\n */\nexport const isTypePredicateAutofixSafe = (\n    node: Readonly<TSESTree.CallExpression>\n): boolean => isTypePredicateExpressionAutofixSafe(node);\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-includes`.\n */\nimport { createIsArrayLikeExpressionChecker } from \"../_internal/array-like-expression.js\";\nimport { reportTsExtrasArrayMethodCall } from \"../_internal/array-method-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithTypefestPolicy } from \"../_internal/rule-reporting.js\";\nimport { isTypePredicateAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-array-includes`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasArrayIncludesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"includes\"]'(\n                    node\n                ) {\n                    reportTsExtrasArrayMethodCall({\n                        canAutofix: isTypePredicateAutofixSafe,\n                        context,\n                        importedName: \"arrayIncludes\",\n                        imports: tsExtrasImports,\n                        isArrayLikeExpression,\n                        memberName: \"includes\",\n                        messageId: \"preferTsExtrasArrayIncludes\",\n                        node,\n                        reportSuggestion: ({ fix, node: suggestionNode }) => {\n                            reportWithTypefestPolicy({\n                                context,\n                                descriptor: {\n                                    messageId: \"preferTsExtrasArrayIncludes\",\n                                    node: suggestionNode,\n                                    suggest: [\n                                        {\n                                            fix,\n                                            messageId:\n                                                \"suggestTsExtrasArrayIncludes\",\n                                        },\n                                    ],\n                                },\n                            });\n                        },\n                        suggestionMessageId: \"suggestTsExtrasArrayIncludes\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras arrayIncludes over Array#includes for stronger element inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-includes\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasArrayIncludes:\n                    \"Prefer `arrayIncludes` from `ts-extras` over `array.includes(...)` for stronger element inference.\",\n                suggestTsExtrasArrayIncludes:\n                    \"Replace this `array.includes(...)` call with `arrayIncludes(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-includes\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-includes` rule module.\n */\nexport default preferTsExtrasArrayIncludesRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-join`.\n */\nimport { createIsArrayLikeExpressionChecker } from \"../_internal/array-like-expression.js\";\nimport { reportTsExtrasArrayMethodCall } from \"../_internal/array-method-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-array-join`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasArrayJoinRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"join\"]'(\n                    node\n                ) {\n                    reportTsExtrasArrayMethodCall({\n                        context,\n                        importedName: \"arrayJoin\",\n                        imports: tsExtrasImports,\n                        isArrayLikeExpression,\n                        memberName: \"join\",\n                        messageId: \"preferTsExtrasArrayJoin\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras arrayJoin over Array#join for stronger tuple-aware typing.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-join\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasArrayJoin:\n                    \"Prefer `arrayJoin` from `ts-extras` over `array.join(...)` for stronger tuple-aware typing.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-join\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-join` rule module.\n */\nexport default preferTsExtrasArrayJoinRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-array-last`.\n */\nimport { safeCastTo } from \"ts-extras\";\n\nimport {\n    createIsArrayLikeExpressionChecker,\n    isWriteTargetMemberExpression,\n} from \"../_internal/array-like-expression.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createMemberToFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n    resolveAutofixOrSuggestionOutcome,\n} from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\nimport {\n    isArrayIndexReadAutofixSafe,\n    isRepeatablyEvaluableExpression,\n} from \"../_internal/value-rewrite-autofix-safety.js\";\n\n/**\n * Detects direct last-element index access (`value[value.length - 1]`).\n *\n * @param node - Member expression to inspect.\n *\n * @returns `true` when the member expression uses a computed `length - 1` index\n *   derived from the same object.\n */\nconst isLastIndexPattern = (\n    node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n    if (\n        !node.computed ||\n        node.property.type !== AST_NODE_TYPES.BinaryExpression\n    ) {\n        return false;\n    }\n\n    const propertyExpression = node.property;\n\n    if (propertyExpression.operator !== \"-\") {\n        return false;\n    }\n\n    if (propertyExpression.right.type !== AST_NODE_TYPES.Literal) {\n        return false;\n    }\n\n    if (propertyExpression.right.value !== 1) {\n        return false;\n    }\n\n    const objectExpression = node.object;\n\n    if (\n        propertyExpression.left.type !== AST_NODE_TYPES.MemberExpression ||\n        propertyExpression.left.computed ||\n        propertyExpression.left.property.type !== AST_NODE_TYPES.Identifier ||\n        propertyExpression.left.property.name !== \"length\"\n    ) {\n        return false;\n    }\n\n    if (propertyExpression.left.object.type === AST_NODE_TYPES.Super) {\n        return false;\n    }\n\n    return areEquivalentExpressions(\n        propertyExpression.left.object,\n        objectExpression\n    );\n};\n\n/** Rule module definition for `prefer-ts-extras-array-last`. */\nconst preferTsExtrasArrayLastRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const directImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n            });\n\n            return {\n                'MemberExpression[computed=true][property.type=\"BinaryExpression\"][property.operator=\"-\"]'(\n                    node\n                ): void {\n                    const memberNode =\n                        safeCastTo<TSESTree.MemberExpression>(node);\n\n                    if (!isLastIndexPattern(memberNode)) {\n                        return;\n                    }\n\n                    if (isWriteTargetMemberExpression(memberNode)) {\n                        return;\n                    }\n\n                    if (!isArrayLikeExpression(memberNode.object)) {\n                        return;\n                    }\n\n                    const fixes = createMemberToFunctionCallFix({\n                        context,\n                        importedName: \"arrayLast\",\n                        imports: directImports,\n                        memberNode,\n                        sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                    });\n\n                    const outcome = resolveAutofixOrSuggestionOutcome({\n                        canAutofix:\n                            isArrayIndexReadAutofixSafe(memberNode) &&\n                            isRepeatablyEvaluableExpression(memberNode.object),\n                        fix: fixes,\n                    });\n\n                    if (outcome.kind === \"suggestion\") {\n                        reportWithTypefestPolicy({\n                            context,\n                            descriptor: {\n                                messageId: \"preferTsExtrasArrayLast\",\n                                node: memberNode,\n                                suggest: [\n                                    {\n                                        fix: outcome.fix,\n                                        messageId: \"suggestTsExtrasArrayLast\",\n                                    },\n                                ],\n                            },\n                        });\n\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: outcome.kind === \"autofix\" ? outcome.fix : null,\n                        messageId: \"preferTsExtrasArrayLast\",\n                        node: memberNode,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require `arrayLast` from `ts-extras` instead of manual last-index member access.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-array-last\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasArrayLast:\n                    \"Prefer `arrayLast` from `ts-extras` over direct last-index access.\",\n                suggestTsExtrasArrayLast:\n                    \"Replace this last-index access with `arrayLast(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-array-last\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-array-last` rule module.\n */\nexport default preferTsExtrasArrayLastRule;\n", "import type { JsonObject } from \"type-fest\";\n\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Structural normalization and equivalence checks for expressions and type\n * nodes used by safe-fix heuristics.\n */\nimport { isDefined, objectHasOwn, objectKeys } from \"ts-extras\";\n\nimport { setContainsValue } from \"./set-membership.js\";\n\n/**\n * Object-like value that can participate in deep structural comparisons.\n */\ntype ComparableObject = Readonly<JsonObject>;\n\n/**\n * ESTree metadata keys ignored during structural-equivalence checks.\n */\nconst ignoredPropertyKeys = new Set<string>([\n    \"end\",\n    \"loc\",\n    \"parent\",\n    \"range\",\n    \"start\",\n]);\n\n/**\n * Maximum recursive depth allowed during structural node-value comparisons.\n *\n * @remarks\n * This guard avoids stack-overflow crashes on pathological, adversarially deep\n * AST/type structures. Returning `false` in that case preserves lint-process\n * stability by failing closed for autofix-equivalence checks.\n */\nconst MAX_NODE_VALUE_COMPARISON_DEPTH = 256;\n\n/**\n * Check whether a value is object-like for structural comparisons.\n */\nconst isComparableRecord = (value: unknown): value is ComparableObject =>\n    typeof value === \"object\" && value !== null;\n\n/**\n * Return stable comparable keys after stripping metadata properties.\n */\nconst getComparableKeys = (value: ComparableObject): readonly string[] =>\n    objectKeys(value).filter(\n        (key) => !setContainsValue(ignoredPropertyKeys, key)\n    );\n\n/**\n * Read comparable keys with per-comparison caching to reduce repeated\n * key-filter allocations during deep traversals.\n *\n * @param value - Object candidate being compared.\n * @param comparableKeysByObject - Per-comparison key cache.\n *\n * @returns Comparable key list with ESTree metadata keys removed.\n */\nconst getCachedComparableKeys = (\n    value: ComparableObject,\n    comparableKeysByObject: WeakMap<ComparableObject, readonly string[]>\n): readonly string[] => {\n    const existingComparableKeys = comparableKeysByObject.get(value);\n    if (isDefined(existingComparableKeys)) {\n        return existingComparableKeys;\n    }\n\n    const comparableKeys = getComparableKeys(value);\n    comparableKeysByObject.set(value, comparableKeys);\n\n    return comparableKeys;\n};\n\n/**\n * Unwrap transparent TypeScript expression wrappers.\n *\n * @param expression - Expression to normalize.\n *\n * @returns The innermost wrapped expression.\n */\nconst unwrapTransparentExpression = (\n    expression: Readonly<TSESTree.Expression>\n): Readonly<TSESTree.Expression> => {\n    let currentExpression = expression;\n    const visitedExpressions = new Set<Readonly<TSESTree.Expression>>();\n\n    while (true) {\n        if (setContainsValue(visitedExpressions, currentExpression)) {\n            return currentExpression;\n        }\n\n        visitedExpressions.add(currentExpression);\n\n        if (currentExpression.type === AST_NODE_TYPES.TSAsExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSNonNullExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSSatisfiesExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSTypeAssertion) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        return currentExpression;\n    }\n};\n\n/**\n * Records a compared object pair and reports whether that pair was already\n * visited.\n *\n * @param left - Left-side object in the comparison pair.\n * @param right - Right-side object in the comparison pair.\n * @param seenPairs - Weakly-held pair-tracking cache for cycle-safe traversal.\n *\n * @returns `true` when this exact pair has already been processed.\n */\nconst markAndCheckSeenPair = (\n    left: object,\n    right: object,\n    seenPairs: WeakMap<object, WeakSet<object>>\n): boolean => {\n    const seenRightNodes = seenPairs.get(left);\n    if (isDefined(seenRightNodes) && seenRightNodes.has(right)) {\n        return true;\n    }\n\n    if (isDefined(seenRightNodes)) {\n        seenRightNodes.add(right);\n    } else {\n        seenPairs.set(left, new WeakSet([right]));\n    }\n\n    return false;\n};\n\n/**\n * Deep structural comparison that is resilient to cycles and ESTree metadata\n * fields.\n *\n * @param left - Left-side value.\n * @param right - Right-side value.\n * @param seenPairs - Pair cache used to break recursive cycles.\n *\n * @returns `true` when the values are structurally equivalent after metadata\n *   normalization.\n */\nconst areEquivalentNodeValues = (\n    left: unknown,\n    right: unknown,\n    seenPairs: WeakMap<object, WeakSet<object>> = new WeakMap(),\n    comparableKeysByObject: WeakMap<\n        ComparableObject,\n        readonly string[]\n    > = new WeakMap(),\n    depth = 0\n): boolean => {\n    if (depth >= MAX_NODE_VALUE_COMPARISON_DEPTH) {\n        return false;\n    }\n\n    if (Object.is(left, right)) {\n        return true;\n    }\n\n    if (typeof left !== typeof right) {\n        return false;\n    }\n\n    if (left === null || right === null) {\n        return false;\n    }\n\n    if (Array.isArray(left) || Array.isArray(right)) {\n        if (!Array.isArray(left) || !Array.isArray(right)) {\n            return false;\n        }\n\n        if (markAndCheckSeenPair(left, right, seenPairs)) {\n            return true;\n        }\n\n        if (left.length !== right.length) {\n            return false;\n        }\n\n        return left.every((value, index) =>\n            areEquivalentNodeValues(\n                value,\n                right[index],\n                seenPairs,\n                comparableKeysByObject,\n                depth + 1\n            )\n        );\n    }\n\n    if (!isComparableRecord(left) || !isComparableRecord(right)) {\n        return false;\n    }\n\n    if (markAndCheckSeenPair(left, right, seenPairs)) {\n        return true;\n    }\n\n    const leftKeys = getCachedComparableKeys(left, comparableKeysByObject);\n    const rightKeys = getCachedComparableKeys(right, comparableKeysByObject);\n    const rightKeySet = new Set(rightKeys);\n\n    if (leftKeys.length !== rightKeys.length) {\n        return false;\n    }\n\n    if (leftKeys.some((key) => !setContainsValue(rightKeySet, key))) {\n        return false;\n    }\n\n    return leftKeys.every((key) => {\n        if (!objectHasOwn(left, key) || !objectHasOwn(right, key)) {\n            return false;\n        }\n\n        return areEquivalentNodeValues(\n            left[key],\n            right[key],\n            seenPairs,\n            comparableKeysByObject,\n            depth + 1\n        );\n    });\n};\n\n/**\n * Compare two expressions for structural equivalence after unwrapping\n * transparent TypeScript wrappers.\n *\n * @param left - Left-hand expression.\n * @param right - Right-hand expression.\n *\n * @returns `true` when both expressions are structurally equivalent.\n */\nexport const areEquivalentExpressions = (\n    left: Readonly<TSESTree.Expression>,\n    right: Readonly<TSESTree.Expression>\n): boolean =>\n    areEquivalentNodeValues(\n        unwrapTransparentExpression(left),\n        unwrapTransparentExpression(right)\n    );\n\n/**\n * Compare two type nodes for structural equivalence.\n *\n * @param left - Left-hand type node.\n * @param right - Right-hand type node.\n *\n * @returns `true` when both type nodes are structurally equivalent.\n */\nexport const areEquivalentTypeNodes = (\n    left: Readonly<TSESTree.TypeNode>,\n    right: Readonly<TSESTree.TypeNode>\n): boolean => areEquivalentNodeValues(left, right);\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-as-writable`.\n */\nimport {\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n} from \"../_internal/imported-type-aliases.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport {\n    TS_EXTRAS_MODULE_SOURCE,\n    TYPE_FEST_MODULE_SOURCE,\n} from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst WRITABLE_TYPE_NAME = \"Writable\" as const;\n\n/**\n * ESLint rule definition for `prefer-ts-extras-as-writable`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasAsWritableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const writableLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                WRITABLE_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            /**\n             * Check whether a type annotation references `Writable` from\n             * `type-fest` (direct import or namespace member).\n             */\n            const isWritableTypeReference = (\n                typeAnnotation: Readonly<TSESTree.TypeNode>\n            ): boolean => {\n                if (typeAnnotation.type !== AST_NODE_TYPES.TSTypeReference) {\n                    return false;\n                }\n\n                if (\n                    typeAnnotation.typeName.type === AST_NODE_TYPES.Identifier\n                ) {\n                    return setContainsValue(\n                        writableLocalNames,\n                        typeAnnotation.typeName.name\n                    );\n                }\n\n                if (\n                    typeAnnotation.typeName.type !==\n                    AST_NODE_TYPES.TSQualifiedName\n                ) {\n                    return false;\n                }\n\n                return (\n                    typeAnnotation.typeName.left.type ===\n                        AST_NODE_TYPES.Identifier &&\n                    setContainsValue(\n                        typeFestNamespaceImportNames,\n                        typeAnnotation.typeName.left.name\n                    ) &&\n                    typeAnnotation.typeName.right.name === WRITABLE_TYPE_NAME\n                );\n            };\n\n            /**\n             * Report and optionally autofix `Writable<...>` type assertions to\n             * `asWritable(...)` calls.\n             */\n            const reportIfWritableAssertion = (\n                node: Readonly<TSESTree.Node>,\n                expression: Readonly<TSESTree.Expression>,\n                typeAnnotation: Readonly<TSESTree.TypeNode>\n            ): void => {\n                if (!isWritableTypeReference(typeAnnotation)) {\n                    return;\n                }\n\n                const expressionArgumentText = getFunctionCallArgumentText({\n                    argumentNode: expression,\n                    sourceCode: context.sourceCode,\n                });\n\n                if (expressionArgumentText === null) {\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferTsExtrasAsWritable\",\n                        node,\n                    });\n\n                    return;\n                }\n\n                const fix = createSafeValueNodeTextReplacementFix({\n                    context,\n                    importedName: \"asWritable\",\n                    imports: tsExtrasImports,\n                    replacementTextFactory: (replacementName) =>\n                        `${replacementName}(${expressionArgumentText})`,\n                    sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                    targetNode: node,\n                });\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferTsExtrasAsWritable\",\n                    node,\n                });\n            };\n\n            return {\n                TSAsExpression(node) {\n                    reportIfWritableAssertion(\n                        node,\n                        node.expression,\n                        node.typeAnnotation\n                    );\n                },\n                TSTypeAssertion(node) {\n                    reportIfWritableAssertion(\n                        node,\n                        node.expression,\n                        node.typeAnnotation\n                    );\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras asWritable over Writable<T> style assertions from type-fest.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-as-writable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasAsWritable:\n                    \"Prefer `asWritable(value)` from `ts-extras` over `Writable<...>` assertions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-as-writable\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-as-writable` rule module.\n */\nexport default preferTsExtrasAsWritableRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Internal shared utilities used by eslint-plugin-typefest rule modules and plugin wiring.\n */\nimport { keyIn } from \"ts-extras\";\n\nimport { getParentNode } from \"./ast-node.js\";\nimport { isAnyLinkedStructureNodeMatching } from \"./cycle-safe-linked-search.js\";\nimport {\n    collectNamedImportLocalNamesByImportedNameFromSource,\n    collectNamedImportSpecifierBindingsFromSource,\n    collectNamespaceImportLocalNamesFromSourceModule,\n} from \"./import-analysis.js\";\nimport { createImportAwareFixes } from \"./import-aware-fixes.js\";\nimport {\n    type ImportFixIntent,\n    resolveImportInsertionDecisionForReportFix,\n} from \"./import-fix-coordinator.js\";\nimport { createImportInsertionFix } from \"./import-insertion.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"./module-source.js\";\nimport { setContainsValue } from \"./set-membership.js\";\n\n/** Utility wrapper used to preserve explicit readonly semantics in fixes. */\nconst READONLY_UTILITY_TYPE_NAME = \"Readonly\";\n\n/**\n * Container type references that semantically encode readonly wrappers.\n */\nconst READONLY_CONTAINER_TYPE_NAMES = new Set([\n    \"ReadonlyArray\",\n    \"ReadonlyMap\",\n    \"ReadonlySet\",\n]);\n\n/**\n * AST node shape that may carry optional generic type parameters.\n */\ntype NodeWithOptionalTypeParameters = Readonly<TSESTree.Node> & {\n    typeParameters?: Readonly<TSESTree.TSTypeParameterDeclaration>;\n};\n\n/**\n * Determine whether a node exposes an optional `typeParameters` property.\n */\nconst hasOptionalTypeParametersProperty = (\n    node: Readonly<TSESTree.Node>\n): node is NodeWithOptionalTypeParameters => keyIn(node, \"typeParameters\");\n\n/**\n * Matched imported type alias that can be replaced with a canonical name.\n */\ninterface ImportedTypeAliasMatch {\n    importedName: string;\n    replacementName: string;\n    sourceValue: string;\n}\n\n/**\n * Collects imported canonical type alias names that should be replaced by\n * preferred type-fest utility names.\n *\n * @param sourceCode - Source code object for the current file.\n * @param replacementsByImportedName - Mapping from imported symbol names to\n *   preferred replacement names.\n *\n * @returns Map keyed by canonical imported alias name with replacement\n *   metadata.\n */\nexport const collectImportedTypeAliasMatches = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    replacementsByImportedName: Readonly<Record<string, string>>\n): ReadonlyMap<string, ImportedTypeAliasMatch> => {\n    const aliasMatches = new Map<string, ImportedTypeAliasMatch>();\n\n    for (const binding of collectNamedImportSpecifierBindingsFromSource({\n        sourceCode,\n    })) {\n        if (binding.localName !== binding.importedName) {\n            continue;\n        }\n\n        const replacementName =\n            replacementsByImportedName[binding.importedName];\n        if (\n            typeof replacementName !== \"string\" ||\n            replacementName.length === 0\n        ) {\n            continue;\n        }\n\n        const sourceValue =\n            typeof binding.declaration.source.value === \"string\"\n                ? binding.declaration.source.value\n                : \"\";\n\n        aliasMatches.set(binding.importedName, {\n            importedName: binding.importedName,\n            replacementName,\n            sourceValue,\n        });\n    }\n\n    return aliasMatches;\n};\n\n/**\n * Collect direct (non-renamed) named imports for a specific source module.\n *\n * @param sourceCode - Source code object for the current file.\n * @param expectedSourceValue - Module source string to match.\n *\n * @returns Set of imported identifier names.\n */\nexport const collectDirectNamedImportsFromSource = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    expectedSourceValue: string\n): ReadonlySet<string> => {\n    const localNamesByImportedName =\n        collectNamedImportLocalNamesByImportedNameFromSource({\n            sourceCode,\n            sourceModuleName: expectedSourceValue,\n        });\n\n    const namedImports = new Set<string>();\n\n    for (const [importedName, localNames] of localNamesByImportedName) {\n        if (!setContainsValue(localNames, importedName)) {\n            continue;\n        }\n\n        namedImports.add(importedName);\n    }\n\n    return namedImports;\n};\n\n/**\n * Collect local identifier names for a specific named import from a selected\n * module source.\n *\n * @param sourceCode - Source code object for the current file.\n * @param expectedSourceValue - Module source string to match.\n * @param expectedImportedName - Imported symbol name to match.\n *\n * @returns Set of local identifier names (including aliased locals).\n */\nexport const collectNamedImportLocalNamesFromSource = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    expectedSourceValue: string,\n    expectedImportedName: string\n): ReadonlySet<string> =>\n    new Set(\n        collectNamedImportLocalNamesByImportedNameFromSource({\n            sourceCode,\n            sourceModuleName: expectedSourceValue,\n        }).get(expectedImportedName)\n    );\n\n/**\n * Collect local identifier names for namespace imports from a selected module\n * source.\n *\n * @param sourceCode - Source code object for the current file.\n * @param expectedSourceValue - Module source string to match.\n *\n * @returns Set of namespace import local names.\n */\nexport const collectNamespaceImportLocalNamesFromSource = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    expectedSourceValue: string\n): ReadonlySet<string> =>\n    collectNamespaceImportLocalNamesFromSourceModule(\n        sourceCode,\n        expectedSourceValue\n    );\n\n/**\n * Builds an import-insertion fix for missing named type replacements.\n *\n * @param options - Fixer context and replacement import metadata.\n *\n * @returns Import insertion fix when a safe insertion point is found; otherwise\n *   `null`.\n */\nconst getInsertionFixForMissingNamedTypeImport = ({\n    fixer,\n    node,\n    replacementName,\n    sourceModuleName,\n}: Readonly<{\n    fixer: TSESLint.RuleFixer;\n    node: Readonly<TSESTree.Node>;\n    replacementName: string;\n    sourceModuleName: string;\n}>): null | TSESLint.RuleFix => {\n    const importDeclarationText = `import type { ${replacementName} } from \"${sourceModuleName}\";`;\n\n    return createImportInsertionFix({\n        fixer,\n        importDeclarationText,\n        moduleSpecifierHint: sourceModuleName,\n        referenceNode: node,\n    });\n};\n\n/**\n * Checks whether an ancestor node declares a type parameter with a specific\n * name.\n *\n * @param ancestor - Ancestor node to inspect.\n * @param parameterName - Type parameter name to detect.\n *\n * @returns `true` when the ancestor declares a matching type parameter.\n */\nconst ancestorDefinesTypeParameterNamed = (\n    ancestor: Readonly<TSESTree.Node>,\n    parameterName: string\n): boolean => {\n    if (!hasOptionalTypeParametersProperty(ancestor)) {\n        return false;\n    }\n\n    const typeParameterDeclaration = ancestor.typeParameters;\n    if (!typeParameterDeclaration) {\n        return false;\n    }\n\n    return typeParameterDeclaration.params.some(\n        (parameter) => parameter.name.name === parameterName\n    );\n};\n\n/**\n * Determine whether a type parameter name is shadowed by any enclosing generic\n * declaration.\n *\n * @param node - Node used as the starting point for ancestor traversal.\n * @param parameterName - Type parameter name to detect.\n *\n * @returns `true` when an ancestor declares a matching type parameter.\n */\nexport function isTypeParameterNameShadowed(\n    node: Readonly<TSESTree.Node>,\n    parameterName: string\n): boolean {\n    return isAnyLinkedStructureNodeMatching<Readonly<TSESTree.Node>>({\n        getNextNode: (\n            currentNode: Readonly<TSESTree.Node>\n        ): null | Readonly<TSESTree.Node> => getParentNode(currentNode) ?? null,\n        isMatch: (currentNode: Readonly<TSESTree.Node>) =>\n            ancestorDefinesTypeParameterNamed(currentNode, parameterName),\n        startNode: node,\n    });\n}\n\n/**\n * Build a replacement fixer that optionally inserts a missing named type import\n * before applying the replacement.\n *\n * @param options - Replacement strategy plus import/scope safety inputs.\n *\n * @returns Report fixer when replacement is scope-safe; otherwise `null`.\n */\nconst createTypeReplacementFix = ({\n    applyReplacement,\n    availableReplacementNames,\n    node,\n    replacementName,\n    reportFixIntent,\n    sourceModuleName,\n}: Readonly<{\n    applyReplacement: (fixer: Readonly<TSESLint.RuleFixer>) => TSESLint.RuleFix;\n    availableReplacementNames: ReadonlySet<string>;\n    node: Readonly<TSESTree.Node>;\n    replacementName: string;\n    reportFixIntent: ImportFixIntent;\n    sourceModuleName: string;\n}>): null | TSESLint.ReportFixFunction => {\n    if (isTypeParameterNameShadowed(node, replacementName)) {\n        return null;\n    }\n\n    const requiresImportInsertion = !setContainsValue(\n        availableReplacementNames,\n        replacementName\n    );\n    if (!requiresImportInsertion) {\n        return (fixer) => applyReplacement(fixer);\n    }\n\n    const importInsertionDecision = resolveImportInsertionDecisionForReportFix({\n        importBindingKind: \"type\",\n        importedName: replacementName,\n        referenceNode: node,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n    return (fixer) =>\n        createImportAwareFixes({\n            createImportFix: (importFixer) =>\n                getInsertionFixForMissingNamedTypeImport({\n                    fixer: importFixer,\n                    node,\n                    replacementName,\n                    sourceModuleName,\n                }),\n            createReplacementFix: applyReplacement,\n            fixer,\n            importInsertionDecision,\n            requiresImportInsertion,\n        });\n};\n\n/**\n * Build a safe type-reference replacement fixer.\n *\n * @param node - Type reference node to potentially fix.\n * @param replacementName - Replacement identifier text.\n * @param availableReplacementNames - Available direct imported replacement\n *   names.\n * @param sourceModuleName - Module source used when validating/adding imports.\n *\n * @returns Fix function when replacement/import insertion is scope-safe;\n *   otherwise `null`.\n */\nexport const createSafeTypeReferenceReplacementFix = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    replacementName: string,\n    availableReplacementNames: Readonly<ReadonlySet<string>>,\n    sourceModuleName: string = TYPE_FEST_MODULE_SOURCE,\n    reportFixIntent: ImportFixIntent = \"autofix\"\n): null | TSESLint.ReportFixFunction => {\n    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n        return null;\n    }\n\n    return createTypeReplacementFix({\n        applyReplacement: (fixer) =>\n            fixer.replaceText(node.typeName, replacementName),\n        availableReplacementNames,\n        node,\n        replacementName,\n        reportFixIntent,\n        sourceModuleName,\n    });\n};\n\n/**\n * Build a safe whole-type-node replacement fixer with custom replacement text.\n *\n * @param node - Type node to potentially replace.\n * @param replacementName - Replacement symbol name used for import/scope safety\n *   checks.\n * @param replacementText - Final replacement text to emit.\n * @param availableReplacementNames - Available direct imported replacement\n *   names.\n * @param sourceModuleName - Module source used when validating/adding imports.\n *\n * @returns Fix function when replacement/import insertion is scope-safe;\n *   otherwise `null`.\n */\nexport const createSafeTypeNodeTextReplacementFix = (\n    node: Readonly<TSESTree.Node>,\n    replacementName: string,\n    replacementText: string,\n    availableReplacementNames: Readonly<ReadonlySet<string>>,\n    sourceModuleName: string = TYPE_FEST_MODULE_SOURCE,\n    reportFixIntent: ImportFixIntent = \"autofix\"\n): null | TSESLint.ReportFixFunction =>\n    createTypeReplacementFix({\n        applyReplacement: (fixer) => fixer.replaceText(node, replacementText),\n        availableReplacementNames,\n        node,\n        replacementName,\n        reportFixIntent,\n        sourceModuleName,\n    });\n\n/**\n * Build a safe whole-type-node replacement fixer.\n *\n * @param node - Type node to potentially replace.\n * @param replacementName - Replacement identifier text.\n * @param availableReplacementNames - Available direct imported replacement\n *   names.\n * @param sourceModuleName - Module source used when validating/adding imports.\n *\n * @returns Fix function when replacement/import insertion is scope-safe;\n *   otherwise `null`.\n */\nexport const createSafeTypeNodeReplacementFix = (\n    node: Readonly<TSESTree.Node>,\n    replacementName: string,\n    availableReplacementNames: Readonly<ReadonlySet<string>>,\n    sourceModuleName: string = TYPE_FEST_MODULE_SOURCE,\n    reportFixIntent: ImportFixIntent = \"autofix\"\n): null | TSESLint.ReportFixFunction =>\n    createSafeTypeNodeTextReplacementFix(\n        node,\n        replacementName,\n        replacementName,\n        availableReplacementNames,\n        sourceModuleName,\n        reportFixIntent\n    );\n\n/**\n * Detects type nodes that explicitly encode readonly semantics.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` for `readonly` type operators and known readonly container\n *   references.\n */\nconst isExplicitReadonlyTypeNode = (node: Readonly<TSESTree.Node>): boolean => {\n    if (node.type === AST_NODE_TYPES.TSTypeOperator) {\n        return node.operator === \"readonly\";\n    }\n\n    if (\n        node.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.typeName.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return false;\n    }\n\n    return setContainsValue(READONLY_CONTAINER_TYPE_NAMES, node.typeName.name);\n};\n\n/**\n * Checks whether replacement text is already wrapped with `Readonly<...>`.\n */\nconst isReadonlyUtilityWrappedText = (replacementText: string): boolean =>\n    replacementText.trimStart().startsWith(`${READONLY_UTILITY_TYPE_NAME}<`);\n\n/**\n * Wraps replacement text in `Readonly<...>`.\n */\nconst toReadonlyUtilityWrappedText = (replacementText: string): string =>\n    `${READONLY_UTILITY_TYPE_NAME}<${replacementText}>`;\n\n/**\n * Build a safe whole-type-node replacement fixer that preserves explicit\n * readonly wrappers/operators from the original node.\n *\n * @param node - Type node to potentially replace.\n * @param replacementName - Replacement symbol name used for import/scope safety\n *   checks.\n * @param replacementText - Final replacement text before readonly-preservation\n *   adjustment.\n * @param availableReplacementNames - Available direct imported replacement\n *   names.\n * @param sourceModuleName - Module source used when validating/adding imports.\n *\n * @returns Fix function when replacement/import insertion is scope-safe;\n *   otherwise `null`.\n */\nexport const createSafeTypeNodeTextReplacementFixPreservingReadonly = (\n    node: Readonly<TSESTree.Node>,\n    replacementName: string,\n    replacementText: string,\n    availableReplacementNames: Readonly<ReadonlySet<string>>,\n    sourceModuleName: string = TYPE_FEST_MODULE_SOURCE,\n    reportFixIntent: ImportFixIntent = \"autofix\"\n): null | TSESLint.ReportFixFunction => {\n    const replacementTextWithReadonlyPreservation =\n        isExplicitReadonlyTypeNode(node) &&\n        !isReadonlyUtilityWrappedText(replacementText)\n            ? toReadonlyUtilityWrappedText(replacementText)\n            : replacementText;\n\n    return createSafeTypeNodeTextReplacementFix(\n        node,\n        replacementName,\n        replacementTextWithReadonlyPreservation,\n        availableReplacementNames,\n        sourceModuleName,\n        reportFixIntent\n    );\n};\n\n/**\n * Build a safe whole-type-node replacement fixer that preserves explicit\n * readonly wrappers/operators from the original node.\n *\n * @param node - Type node to potentially replace.\n * @param replacementName - Replacement identifier text.\n * @param availableReplacementNames - Available direct imported replacement\n *   names.\n * @param sourceModuleName - Module source used when validating/adding imports.\n *\n * @returns Fix function when replacement/import insertion is scope-safe;\n *   otherwise `null`.\n */\nexport const createSafeTypeNodeReplacementFixPreservingReadonly = (\n    node: Readonly<TSESTree.Node>,\n    replacementName: string,\n    availableReplacementNames: Readonly<ReadonlySet<string>>,\n    sourceModuleName: string = TYPE_FEST_MODULE_SOURCE,\n    reportFixIntent: ImportFixIntent = \"autofix\"\n): null | TSESLint.ReportFixFunction =>\n    createSafeTypeNodeTextReplacementFixPreservingReadonly(\n        node,\n        replacementName,\n        replacementName,\n        availableReplacementNames,\n        sourceModuleName,\n        reportFixIntent\n    );\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-assert-defined`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport {\n    getThrowStatementFromConsequent,\n    isThrowOnlyConsequent,\n} from \"../_internal/throw-consequent.js\";\nimport { getSingleGlobalTypeErrorArgument } from \"../_internal/throw-type-error.js\";\nimport {\n    createTypedRule,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Determine whether an expression references the global `undefined` value.\n *\n * @param context - Active rule context for scope resolution.\n * @param node - Expression to inspect.\n *\n * @returns `true` when the expression is an unshadowed `undefined` identifier.\n */\nconst isUndefinedExpression = ({\n    context,\n    node,\n}: Readonly<{\n    context: RuleContext;\n    node: Readonly<TSESTree.Expression>;\n}>): boolean => {\n    if (node.type !== AST_NODE_TYPES.Identifier || node.name !== \"undefined\") {\n        return false;\n    }\n\n    return isGlobalUndefinedIdentifier(context, node);\n};\n\n/**\n * Check whether the throw body matches the canonical assertDefined-equivalent\n * error shape.\n *\n * @param context - Active rule context for global-binding checks.\n * @param throwStatement - Throw statement extracted from the guard branch.\n *\n * @returns True when the throw is a TypeError whose message equals \"Expected a\n *   defined value, got undefined\".\n */\nconst isCanonicalAssertDefinedThrow = (\n    context: RuleContext,\n    throwStatement: Readonly<TSESTree.ThrowStatement>\n): boolean => {\n    const firstArgument = getSingleGlobalTypeErrorArgument({\n        context,\n        throwStatement,\n    });\n    if (firstArgument === null) {\n        return false;\n    }\n\n    return (\n        firstArgument.type === AST_NODE_TYPES.Literal &&\n        firstArgument.value === \"Expected a defined value, got `undefined`\"\n    );\n};\n\n/**\n * Extract the guarded expression from `x == undefined` / `undefined === x`\n * checks.\n *\n * @param test - Conditional test expression to inspect.\n * @param context - Active rule context for global-binding checks.\n *\n * @returns Guarded expression when the test is a supported undefined\n *   comparison; otherwise `null`.\n */\nconst extractDefinedGuardExpression = (\n    test: Readonly<TSESTree.Expression>,\n    context: RuleContext\n): null | TSESTree.Expression => {\n    if (\n        test.type !== AST_NODE_TYPES.BinaryExpression ||\n        (test.operator !== \"==\" && test.operator !== \"===\")\n    ) {\n        return null;\n    }\n\n    if (\n        isUndefinedExpression({\n            context,\n            node: test.left,\n        })\n    ) {\n        return test.right;\n    }\n\n    if (\n        isUndefinedExpression({\n            context,\n            node: test.right,\n        })\n    ) {\n        return test.left;\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-assert-defined`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasAssertDefinedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                IfStatement(node) {\n                    if (\n                        node.alternate !== null ||\n                        !isThrowOnlyConsequent(node.consequent)\n                    ) {\n                        return;\n                    }\n\n                    const guardExpression = extractDefinedGuardExpression(\n                        node.test,\n                        context\n                    );\n\n                    if (guardExpression === null) {\n                        return;\n                    }\n\n                    const throwStatement = getThrowStatementFromConsequent(\n                        node.consequent\n                    );\n                    const canAutofix =\n                        throwStatement !== null &&\n                        isCanonicalAssertDefinedThrow(context, throwStatement);\n                    const guardExpressionArgumentText =\n                        getFunctionCallArgumentText({\n                            argumentNode: guardExpression,\n                            sourceCode: context.sourceCode,\n                        });\n\n                    if (guardExpressionArgumentText === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertDefined\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"assertDefined\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) =>\n                                `${replacementName}(${guardExpressionArgumentText});`,\n                            reportFixIntent: canAutofix\n                                ? \"autofix\"\n                                : \"suggestion\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n\n                    if (replacementFix === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertDefined\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    if (canAutofix) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: replacementFix,\n                            messageId: \"preferTsExtrasAssertDefined\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferTsExtrasAssertDefined\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: replacementFix,\n                                    messageId: \"suggestTsExtrasAssertDefined\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras assertDefined over manual undefined-guard throw blocks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-defined\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasAssertDefined:\n                    \"Prefer `assertDefined` from `ts-extras` over manual undefined guard throw blocks.\",\n                suggestTsExtrasAssertDefined:\n                    \"Replace this manual guard with `assertDefined(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-assert-defined\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-assert-defined` rule module.\n */\nexport default preferTsExtrasAssertDefinedRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Shared helpers for extracting throw-only `if` consequents.\n */\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * Extract the single throw statement from a block consequent when present.\n *\n * @param node - Consequent statement candidate.\n *\n * @returns The throw statement when the consequent is exactly `{ throw ... }`;\n *   otherwise `null`.\n */\nconst getSingleThrowFromBlockConsequent = (\n    node: Readonly<TSESTree.Statement>\n): null | TSESTree.ThrowStatement => {\n    if (node.type !== AST_NODE_TYPES.BlockStatement || node.body.length !== 1) {\n        return null;\n    }\n\n    const firstStatement = arrayFirst(node.body);\n\n    if (firstStatement?.type !== AST_NODE_TYPES.ThrowStatement) {\n        return null;\n    }\n\n    return firstStatement;\n};\n\n/**\n * Check whether an `if` consequent contains only a throw statement.\n *\n * @param node - Consequent statement to inspect.\n *\n * @returns `true` for `throw ...` and `{ throw ... }` shapes.\n */\nexport const isThrowOnlyConsequent = (\n    node: Readonly<TSESTree.Statement>\n): boolean => {\n    if (node.type === AST_NODE_TYPES.ThrowStatement) {\n        return true;\n    }\n\n    /* v8 ignore next 2 -- defensive sparse-array guard for malformed synthetic AST nodes. */\n    return getSingleThrowFromBlockConsequent(node) !== null;\n};\n\n/**\n * Extract the throw statement from a throw-only consequent.\n *\n * @param node - Consequent statement to inspect.\n *\n * @returns Throw statement when present; otherwise `null`.\n */\nexport const getThrowStatementFromConsequent = (\n    node: Readonly<TSESTree.Statement>\n): null | TSESTree.ThrowStatement => {\n    if (node.type === AST_NODE_TYPES.ThrowStatement) {\n        return node;\n    }\n\n    /* v8 ignore next 2 -- guarded by isThrowOnlyConsequent before this helper is invoked in rule flow. */\n    return getSingleThrowFromBlockConsequent(node);\n};\n", "import type { UnknownArray } from \"type-fest\";\n\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Shared helpers for validating canonical `throw new TypeError(...)` shapes.\n */\nimport { isGlobalIdentifierNamed } from \"./typed-rule.js\";\n\n/**\n * Extract the single constructor argument from `throw new TypeError(...)`\n * statements when the constructor resolves to the global `TypeError` binding.\n *\n * @param options - Rule context and throw statement candidate.\n *\n * @returns The single non-spread constructor argument; otherwise `null`.\n */\nexport const getSingleGlobalTypeErrorArgument = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>({\n    context,\n    throwStatement,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>;\n    throwStatement: Readonly<TSESTree.ThrowStatement>;\n}>): null | TSESTree.Expression => {\n    if (\n        throwStatement.argument.type !== AST_NODE_TYPES.NewExpression ||\n        throwStatement.argument.callee.type !== AST_NODE_TYPES.Identifier ||\n        throwStatement.argument.callee.name !== \"TypeError\" ||\n        !isGlobalIdentifierNamed(\n            context,\n            throwStatement.argument.callee,\n            \"TypeError\"\n        ) ||\n        throwStatement.argument.arguments.length !== 1\n    ) {\n        return null;\n    }\n\n    const [firstArgument] = throwStatement.argument.arguments;\n    if (!firstArgument || firstArgument.type === AST_NODE_TYPES.SpreadElement) {\n        return null;\n    }\n\n    return firstArgument;\n};\n", "import type { UnknownArray } from \"type-fest\";\n\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-assert-error`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport { isThrowOnlyConsequent } from \"../_internal/throw-consequent.js\";\nimport {\n    createTypedRule,\n    isGlobalIdentifierNamed,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * Checks whether an expression is `<value> instanceof Error`.\n *\n * @param context - Rule context used to verify that `Error` resolves to the\n *   global constructor.\n * @param expression - Expression to inspect.\n *\n * @returns `true` when the expression is an `instanceof` check against the\n *   global `Error` symbol.\n */\nconst isErrorInstanceofExpression = (\n    context: Readonly<TSESLint.RuleContext<string, Readonly<UnknownArray>>>,\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.BinaryExpression => {\n    if (expression.type !== AST_NODE_TYPES.BinaryExpression) {\n        return false;\n    }\n\n    if (expression.operator !== \"instanceof\") {\n        return false;\n    }\n\n    if (expression.right.type !== AST_NODE_TYPES.Identifier) {\n        return false;\n    }\n\n    return isGlobalIdentifierNamed(context, expression.right, \"Error\");\n};\n\n/**\n * Extracts the guarded value from `!(value instanceof Error)` checks.\n *\n * @param context - Rule context used for global identifier resolution.\n * @param test - `IfStatement.test` expression to inspect.\n *\n * @returns The left-hand expression from `value instanceof Error` when the test\n *   shape is compatible with `assertError`; otherwise `null`.\n */\nconst extractAssertErrorTarget = (\n    context: Readonly<TSESLint.RuleContext<string, Readonly<UnknownArray>>>,\n    test: Readonly<TSESTree.Expression>\n): null | TSESTree.Expression => {\n    if (test.type !== AST_NODE_TYPES.UnaryExpression) {\n        return null;\n    }\n\n    if (test.operator !== \"!\") {\n        return null;\n    }\n\n    const { argument } = test;\n\n    if (!isErrorInstanceofExpression(context, argument)) {\n        return null;\n    }\n\n    /* V8 ignore next -- ESTree allows PrivateIdentifier here, but parsed\n       TS/JS `instanceof` left operands are expressions (e.g. `this.#value`),\n       not bare PrivateIdentifier nodes. */\n    if (argument.left.type === AST_NODE_TYPES.PrivateIdentifier) {\n        return null;\n    }\n\n    return argument.left;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-assert-error`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasAssertErrorRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                IfStatement(node) {\n                    if (\n                        node.alternate !== null ||\n                        !isThrowOnlyConsequent(node.consequent)\n                    ) {\n                        return;\n                    }\n\n                    const guardExpression = extractAssertErrorTarget(\n                        context,\n                        node.test\n                    );\n\n                    if (guardExpression === null) {\n                        return;\n                    }\n\n                    const guardExpressionArgumentText =\n                        getFunctionCallArgumentText({\n                            argumentNode: guardExpression,\n                            sourceCode: context.sourceCode,\n                        });\n\n                    if (guardExpressionArgumentText === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertError\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"assertError\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) =>\n                                `${replacementName}(${guardExpressionArgumentText});`,\n                            reportFixIntent: \"suggestion\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n\n                    if (replacementFix === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertError\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferTsExtrasAssertError\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: replacementFix,\n                                    messageId: \"suggestTsExtrasAssertError\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras assertError over manual instanceof Error throw guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-error\",\n            },\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasAssertError:\n                    \"Prefer `assertError` from `ts-extras` over manual `instanceof Error` throw guards.\",\n                suggestTsExtrasAssertError:\n                    \"Replace this manual guard with `assertError(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-assert-error\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-assert-error` rule module.\n */\nexport default preferTsExtrasAssertErrorRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-assert-never`.\n */\nimport { AST_NODE_TYPES } from \"@typescript-eslint/utils\";\n\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-assert-never`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasAssertNeverRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                VariableDeclaration(node) {\n                    // Only handle const statements with a single declarator\n                    if (\n                        node.kind !== \"const\" ||\n                        node.declarations.length !== 1\n                    ) {\n                        return;\n                    }\n\n                    const [declarator] = node.declarations;\n\n                    // Guard: declarator must exist and have an Identifier id\n                    if (declarator?.id.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    // Guard: the id must have a `never` type annotation\n                    const { typeAnnotation } = declarator.id;\n                    if (\n                        typeAnnotation?.typeAnnotation.type !==\n                        AST_NODE_TYPES.TSNeverKeyword\n                    ) {\n                        return;\n                    }\n\n                    // Guard: there must be an initializer\n                    const { init } = declarator;\n                    if (init === null) {\n                        return;\n                    }\n\n                    const initArgumentText = getFunctionCallArgumentText({\n                        argumentNode: init,\n                        sourceCode: context.sourceCode,\n                    });\n\n                    if (initArgumentText === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertNever\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"assertNever\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) =>\n                                `${replacementName}(${initArgumentText})`,\n                            reportFixIntent: \"suggestion\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n\n                    if (replacementFix === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertNever\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferTsExtrasAssertNever\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: replacementFix,\n                                    messageId: \"suggestTsExtrasAssertNever\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras assertNever over manual `const _: never = value` exhaustiveness checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-never\",\n            },\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasAssertNever:\n                    \"Prefer `assertNever` from `ts-extras` over a manual `const _: never` exhaustiveness assertion.\",\n                suggestTsExtrasAssertNever:\n                    \"Replace this manual exhaustiveness check with `assertNever(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-assert-never\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-assert-never` rule module.\n */\nexport default preferTsExtrasAssertNeverRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-assert-present`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport {\n    getThrowStatementFromConsequent,\n    isThrowOnlyConsequent,\n} from \"../_internal/throw-consequent.js\";\nimport { getSingleGlobalTypeErrorArgument } from \"../_internal/throw-type-error.js\";\nimport {\n    createTypedRule,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Determine whether an expression is the `null` literal.\n *\n * @param node - Expression to inspect.\n *\n * @returns `true` when the expression is `null`.\n */\nconst isNullExpression = (node: Readonly<TSESTree.Expression>): boolean =>\n    node.type === AST_NODE_TYPES.Literal && node.value === null;\n\n/**\n * Determine whether an expression references the global `undefined` value.\n *\n * @param context - Active rule context for scope resolution.\n * @param node - Expression to inspect.\n *\n * @returns `true` when the expression is an unshadowed `undefined` identifier.\n */\nconst isUndefinedExpression = ({\n    context,\n    node,\n}: Readonly<{\n    context: RuleContext;\n    node: Readonly<TSESTree.Expression>;\n}>): boolean => {\n    if (node.type !== AST_NODE_TYPES.Identifier || node.name !== \"undefined\") {\n        return false;\n    }\n\n    return isGlobalUndefinedIdentifier(context, node);\n};\n\n/**\n * Check whether a throw branch matches the canonical `assertPresent`-equivalent\n * TypeError template shape.\n */\nconst isCanonicalAssertPresentThrow = ({\n    context,\n    guardExpression,\n    throwStatement,\n}: Readonly<{\n    context: RuleContext;\n    guardExpression: TSESTree.Expression;\n    throwStatement: TSESTree.ThrowStatement;\n}>): boolean => {\n    const firstArgument = getSingleGlobalTypeErrorArgument({\n        context,\n        throwStatement,\n    });\n    if (firstArgument?.type !== AST_NODE_TYPES.TemplateLiteral) {\n        return false;\n    }\n\n    const [prefixQuasi, suffixQuasi] = firstArgument.quasis;\n    if (\n        !prefixQuasi ||\n        !suffixQuasi ||\n        firstArgument.expressions.length !== 1\n    ) {\n        return false;\n    }\n\n    const [templateExpression] = firstArgument.expressions;\n    /* v8 ignore next -- parser guarantees an element at index 0 when expressions.length is exactly 1. */\n    if (!templateExpression) {\n        return false;\n    }\n\n    return (\n        (prefixQuasi.value.cooked === \"Expected a present value, got `\" ||\n            prefixQuasi.value.cooked === \"Expected a present value, got \") &&\n        (suffixQuasi.value.cooked === \"`\" || suffixQuasi.value.cooked === \"\") &&\n        areEquivalentExpressions(templateExpression, guardExpression)\n    );\n};\n\n/**\n * Extract the guarded expression from `x == null` / `null == x` checks.\n *\n * @param test - Test expression to inspect.\n *\n * @returns Guarded expression when the check is supported; otherwise `null`.\n */\nconst extractEqNullGuardExpression = (\n    test: Readonly<TSESTree.Expression>\n): null | TSESTree.Expression => {\n    if (\n        test.type !== AST_NODE_TYPES.BinaryExpression ||\n        test.operator !== \"==\"\n    ) {\n        return null;\n    }\n\n    if (isNullExpression(test.left)) {\n        return test.right;\n    }\n\n    if (isNullExpression(test.right)) {\n        return test.left;\n    }\n\n    return null;\n};\n\n/**\n * Extract one nullish-equality comparison part from a binary expression.\n *\n * @param expression - Candidate comparison expression.\n * @param context - Active rule context for global-binding checks.\n *\n * @returns Matched comparison metadata; otherwise `null`.\n */\nconst extractNullishEqualityPart = (\n    expression: Readonly<TSESTree.Expression>,\n    context: RuleContext\n): null | {\n    expression: TSESTree.Expression;\n    kind: \"null\" | \"undefined\";\n} => {\n    if (\n        expression.type !== AST_NODE_TYPES.BinaryExpression ||\n        (expression.operator !== \"==\" && expression.operator !== \"===\")\n    ) {\n        return null;\n    }\n\n    if (isNullExpression(expression.left)) {\n        return {\n            expression: expression.right,\n            kind: \"null\",\n        };\n    }\n\n    if (isNullExpression(expression.right)) {\n        return {\n            expression: expression.left,\n            kind: \"null\",\n        };\n    }\n\n    if (\n        isUndefinedExpression({\n            context,\n            node: expression.left,\n        })\n    ) {\n        return {\n            expression: expression.right,\n            kind: \"undefined\",\n        };\n    }\n\n    if (\n        isUndefinedExpression({\n            context,\n            node: expression.right,\n        })\n    ) {\n        return {\n            expression: expression.left,\n            kind: \"undefined\",\n        };\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-assert-present`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasAssertPresentRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            /**\n             * Extracts the guarded expression from supported nullish-present\n             * checks used before throwing.\n             *\n             * @param test - If-statement test expression.\n             *\n             * @returns Guarded expression when the test matches `x == null` or\n             *   split null/undefined disjunction patterns; otherwise `null`.\n             */\n            const extractPresentGuardExpression = (\n                test: Readonly<TSESTree.Expression>\n            ): null | TSESTree.Expression => {\n                const eqNullExpression = extractEqNullGuardExpression(test);\n                if (eqNullExpression !== null) {\n                    return eqNullExpression;\n                }\n\n                if (\n                    test.type !== AST_NODE_TYPES.LogicalExpression ||\n                    test.operator !== \"||\"\n                ) {\n                    return null;\n                }\n\n                const leftPart = extractNullishEqualityPart(test.left, context);\n                const rightPart = extractNullishEqualityPart(\n                    test.right,\n                    context\n                );\n\n                if (\n                    leftPart === null ||\n                    rightPart === null ||\n                    leftPart.kind === rightPart.kind\n                ) {\n                    return null;\n                }\n\n                return areEquivalentExpressions(\n                    leftPart.expression,\n                    rightPart.expression\n                )\n                    ? leftPart.expression\n                    : null;\n            };\n\n            return {\n                IfStatement(node) {\n                    if (\n                        node.alternate !== null ||\n                        !isThrowOnlyConsequent(node.consequent)\n                    ) {\n                        return;\n                    }\n\n                    const guardExpression = extractPresentGuardExpression(\n                        node.test\n                    );\n\n                    if (guardExpression === null) {\n                        return;\n                    }\n\n                    const throwStatement = getThrowStatementFromConsequent(\n                        node.consequent\n                    );\n                    const canAutofix =\n                        throwStatement !== null &&\n                        isCanonicalAssertPresentThrow({\n                            context,\n                            guardExpression,\n                            throwStatement,\n                        });\n                    const guardExpressionArgumentText =\n                        getFunctionCallArgumentText({\n                            argumentNode: guardExpression,\n                            sourceCode: context.sourceCode,\n                        });\n\n                    if (guardExpressionArgumentText === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertPresent\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"assertPresent\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) =>\n                                `${replacementName}(${guardExpressionArgumentText});`,\n                            reportFixIntent: canAutofix\n                                ? \"autofix\"\n                                : \"suggestion\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n\n                    if (replacementFix === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasAssertPresent\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    if (canAutofix) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: replacementFix,\n                            messageId: \"preferTsExtrasAssertPresent\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferTsExtrasAssertPresent\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: replacementFix,\n                                    messageId: \"suggestTsExtrasAssertPresent\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras assertPresent over manual nullish-guard throw blocks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-assert-present\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasAssertPresent:\n                    \"Prefer `assertPresent` from `ts-extras` over manual nullish guard throw blocks.\",\n                suggestTsExtrasAssertPresent:\n                    \"Replace this manual guard with `assertPresent(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-assert-present\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-assert-present` rule module.\n */\nexport default preferTsExtrasAssertPresentRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Utilities for detecting nodes that live inside `.filter(...)` callbacks.\n */\nimport { arrayFirst } from \"ts-extras\";\n\nimport { getParentNode } from \"./ast-node.js\";\nimport { setContainsValue } from \"./set-membership.js\";\n\n/** Target method name used for callback-context detection. */\nconst FILTER_METHOD_NAME = \"filter\";\n\n/**\n * Narrows nodes to function-like callback expressions.\n */\nconst isFunctionCallbackNode = (\n    node: Readonly<TSESTree.Node>\n): node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression =>\n    node.type === AST_NODE_TYPES.ArrowFunctionExpression ||\n    node.type === AST_NODE_TYPES.FunctionExpression;\n\n/**\n * Narrows call expressions to direct `.filter(...)` calls.\n */\nexport const isFilterCallExpression = (\n    expression: Readonly<TSESTree.CallExpression>\n): expression is TSESTree.CallExpression & {\n    callee: TSESTree.MemberExpression & {\n        computed: false;\n        optional: false;\n        property: TSESTree.Identifier;\n    };\n    optional: false;\n} =>\n    !expression.optional &&\n    expression.callee.type === AST_NODE_TYPES.MemberExpression &&\n    !expression.callee.computed &&\n    !expression.callee.optional &&\n    expression.callee.property.type === AST_NODE_TYPES.Identifier &&\n    expression.callee.property.name === FILTER_METHOD_NAME;\n\n/**\n * Extract the first callback argument from a direct `.filter(...)` call.\n *\n * @param expression - Candidate call expression to inspect.\n *\n * @returns Callback expression when the call is a supported `.filter(...)`\n *   invocation and the first argument is an arrow/function expression;\n *   otherwise `null`.\n */\nexport const getFilterCallbackFunctionArgument = (\n    expression: Readonly<TSESTree.CallExpression>\n): null | Readonly<\n    TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n> => {\n    if (!isFilterCallExpression(expression)) {\n        return null;\n    }\n\n    const [firstArgument] = expression.arguments;\n    if (\n        !firstArgument ||\n        (firstArgument.type !== AST_NODE_TYPES.ArrowFunctionExpression &&\n            firstArgument.type !== AST_NODE_TYPES.FunctionExpression)\n    ) {\n        return null;\n    }\n\n    return firstArgument;\n};\n\n/**\n * Structured match for `.filter(...)` calls with a single identifier parameter\n * arrow callback that uses an expression body.\n */\nexport type SingleParameterExpressionArrowFilterCallbackMatch = Readonly<{\n    callback: TSESTree.ArrowFunctionExpression & {\n        body: TSESTree.Expression;\n        params: [TSESTree.Identifier];\n    };\n    parameter: TSESTree.Identifier;\n}>;\n\nconst isSingleParameterExpressionArrowFunction = (\n    callback: Readonly<TSESTree.ArrowFunctionExpression>\n): callback is TSESTree.ArrowFunctionExpression & {\n    body: TSESTree.Expression;\n    params: [TSESTree.Identifier];\n} => {\n    if (callback.params.length !== 1) {\n        return false;\n    }\n\n    if (callback.body.type === AST_NODE_TYPES.BlockStatement) {\n        return false;\n    }\n\n    const firstParameter = arrayFirst(callback.params);\n\n    return firstParameter?.type === AST_NODE_TYPES.Identifier;\n};\n\n/**\n * Extract a strict callback shape from direct `.filter(...)` calls.\n *\n * @param expression - Candidate call expression to inspect.\n *\n * @returns Structured callback match when supported; otherwise `null`.\n */\nexport const getSingleParameterExpressionArrowFilterCallback = (\n    expression: Readonly<TSESTree.CallExpression>\n): null | SingleParameterExpressionArrowFilterCallbackMatch => {\n    const callback = getFilterCallbackFunctionArgument(expression);\n    if (callback?.type !== AST_NODE_TYPES.ArrowFunctionExpression) {\n        return null;\n    }\n\n    if (!isSingleParameterExpressionArrowFunction(callback)) {\n        return null;\n    }\n\n    const [parameter] = callback.params;\n\n    return {\n        callback,\n        parameter,\n    };\n};\n\n/**\n * Checks whether a node appears inside a callback passed as the first argument\n * to a direct `.filter(...)` call.\n *\n * @param node - Node to inspect.\n *\n * @returns `true` when the node is inside a `.filter(...)` callback; otherwise\n *   `false`.\n */\nexport const isWithinFilterCallback = (\n    node: Readonly<TSESTree.Node>\n): boolean => {\n    let currentNode: TSESTree.Node | undefined = node;\n    const visitedNodes = new Set<TSESTree.Node>();\n\n    while (currentNode) {\n        if (setContainsValue(visitedNodes, currentNode)) {\n            return false;\n        }\n\n        visitedNodes.add(currentNode);\n\n        if (isFunctionCallbackNode(currentNode)) {\n            const callbackParent = getParentNode(currentNode);\n            if (callbackParent?.type !== AST_NODE_TYPES.CallExpression) {\n                currentNode = getParentNode(currentNode);\n                continue;\n            }\n\n            const [firstArgument] = callbackParent.arguments;\n\n            if (\n                firstArgument === currentNode &&\n                isFilterCallExpression(callbackParent)\n            ) {\n                return true;\n            }\n        }\n\n        currentNode = getParentNode(currentNode);\n    }\n\n    return false;\n};\n", "/**\n * @packageDocumentation\n * Shared helpers for parsing and flattening nullish comparison expressions.\n */\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\nimport { arrayIncludes, isDefined } from \"ts-extras\";\n\n/**\n * Normalized representation of one binary comparison against null/undefined.\n */\nexport type NullishComparison = Readonly<{\n    comparedExpression: TSESTree.Expression;\n    kind: NullishComparisonKind;\n    operator: NullishComparisonOperator;\n}>;\n\n/** Nullish literal kinds supported by comparison extraction. */\nexport type NullishComparisonKind = \"null\" | \"undefined\";\n\n/** Operators supported by nullish comparison extraction. */\nexport type NullishComparisonOperator = \"!=\" | \"!==\" | \"==\" | \"===\";\n\n/** Default accepted operators for nullish comparison parsing. */\nconst defaultNullishComparisonOperators = [\n    \"!=\",\n    \"!==\",\n    \"==\",\n    \"===\",\n] as const satisfies readonly NullishComparisonOperator[];\n\n/**\n * Flatten a logical-expression tree for one specific operator.\n *\n * @param options - Expression and logical operator to flatten.\n *\n * @returns Left-to-right list of terms participating in that operator chain.\n */\nexport const flattenLogicalTerms = ({\n    expression,\n    operator,\n}: Readonly<{\n    expression: Readonly<TSESTree.Expression>;\n    operator: \"&&\" | \"||\";\n}>): readonly TSESTree.Expression[] => {\n    const flattenedTerms: TSESTree.Expression[] = [];\n    const pendingTerms: TSESTree.Expression[] = [expression];\n\n    while (pendingTerms.length > 0) {\n        const currentTerm = pendingTerms.pop();\n\n        if (!currentTerm) {\n            continue;\n        }\n\n        if (\n            currentTerm.type === AST_NODE_TYPES.LogicalExpression &&\n            currentTerm.operator === operator\n        ) {\n            pendingTerms.push(currentTerm.right, currentTerm.left);\n            continue;\n        }\n\n        flattenedTerms.push(currentTerm);\n    }\n\n    return flattenedTerms;\n};\n\nconst STRICT_NULLISH_TERM_COUNT = 2 as const;\n\n/**\n * Narrow a list of expressions to an exact two-term tuple.\n */\nexport const isExpressionPair = (\n    terms: readonly Readonly<TSESTree.Expression>[]\n): terms is readonly [TSESTree.Expression, TSESTree.Expression] =>\n    terms.length === STRICT_NULLISH_TERM_COUNT;\n\n/**\n * Check whether an expression is the literal `null`.\n */\nconst isNullLiteral = (\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.Literal & { value: null } =>\n    expression.type === AST_NODE_TYPES.Literal && expression.value === null;\n\n/**\n * Check whether an expression is the string literal `\"undefined\"`.\n */\nconst isUndefinedStringLiteral = (\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.Literal & { value: \"undefined\" } =>\n    expression.type === AST_NODE_TYPES.Literal &&\n    expression.value === \"undefined\";\n\n/**\n * Check whether an expression is `typeof <identifierName>`.\n */\nconst isTypeofIdentifierExpression = (\n    expression: Readonly<TSESTree.Expression>,\n    identifierName: string\n): expression is TSESTree.UnaryExpression & { argument: TSESTree.Identifier } =>\n    expression.type === AST_NODE_TYPES.UnaryExpression &&\n    expression.operator === \"typeof\" &&\n    expression.argument.type === AST_NODE_TYPES.Identifier &&\n    expression.argument.name === identifierName;\n\n/**\n * Narrow a binary-operator string to supported nullish comparison operators.\n */\nconst isAllowedNullishComparisonOperator = (\n    operator: TSESTree.BinaryExpression[\"operator\"]\n): operator is NullishComparisonOperator =>\n    operator === \"!=\" ||\n    operator === \"!==\" ||\n    operator === \"==\" ||\n    operator === \"===\";\n\n/**\n * Narrow an ESTree expression-like union to regular expressions (excluding\n * private identifiers).\n */\nconst isExpressionNode = (\n    expression: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>\n): expression is TSESTree.Expression =>\n    expression.type !== AST_NODE_TYPES.PrivateIdentifier;\n\nconst getNullLiteralComparison = (\n    left: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>,\n    right: Readonly<TSESTree.Expression>,\n    operator: NullishComparisonOperator,\n    matchesComparedExpression: (\n        candidateExpression: Readonly<TSESTree.Expression>\n    ) => boolean\n): null | NullishComparison => {\n    if (\n        isNullLiteral(right) &&\n        isExpressionNode(left) &&\n        matchesComparedExpression(left)\n    ) {\n        return {\n            comparedExpression: left,\n            kind: \"null\",\n            operator,\n        };\n    }\n\n    if (\n        isExpressionNode(left) &&\n        isNullLiteral(left) &&\n        matchesComparedExpression(right)\n    ) {\n        return {\n            comparedExpression: right,\n            kind: \"null\",\n            operator,\n        };\n    }\n\n    return null;\n};\n\nconst getUndefinedIdentifierComparison = (\n    left: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>,\n    right: Readonly<TSESTree.Expression>,\n    operator: NullishComparisonOperator,\n    matchesComparedExpression: (\n        candidateExpression: Readonly<TSESTree.Expression>\n    ) => boolean,\n    isGlobalUndefinedIdentifier: (\n        expression: Readonly<TSESTree.Expression>\n    ) => boolean\n): null | NullishComparison => {\n    if (\n        right.type === AST_NODE_TYPES.Identifier &&\n        isGlobalUndefinedIdentifier(right) &&\n        isExpressionNode(left) &&\n        matchesComparedExpression(left)\n    ) {\n        return {\n            comparedExpression: left,\n            kind: \"undefined\",\n            operator,\n        };\n    }\n\n    if (\n        isExpressionNode(left) &&\n        left.type === AST_NODE_TYPES.Identifier &&\n        isGlobalUndefinedIdentifier(left) &&\n        matchesComparedExpression(right)\n    ) {\n        return {\n            comparedExpression: right,\n            kind: \"undefined\",\n            operator,\n        };\n    }\n\n    return null;\n};\n\nconst getTypeofUndefinedStringComparison = (\n    left: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>,\n    right: Readonly<TSESTree.Expression>,\n    operator: NullishComparisonOperator,\n    comparedIdentifierName: string\n): null | NullishComparison => {\n    if (\n        isExpressionNode(left) &&\n        isTypeofIdentifierExpression(left, comparedIdentifierName) &&\n        isUndefinedStringLiteral(right)\n    ) {\n        return {\n            comparedExpression: left.argument,\n            kind: \"undefined\",\n            operator,\n        };\n    }\n\n    if (\n        isExpressionNode(left) &&\n        isTypeofIdentifierExpression(right, comparedIdentifierName) &&\n        isUndefinedStringLiteral(left)\n    ) {\n        return {\n            comparedExpression: right.argument,\n            kind: \"undefined\",\n            operator,\n        };\n    }\n\n    return null;\n};\n\n/**\n * Extract a normalized nullish comparison from an expression.\n */\nexport const getNullishComparison = ({\n    allowedOperators = defaultNullishComparisonOperators,\n    allowTypeofComparedIdentifierForUndefined = false,\n    comparedIdentifierName,\n    expression,\n    isGlobalUndefinedIdentifier,\n}: Readonly<{\n    allowedOperators?: readonly NullishComparisonOperator[];\n    allowTypeofComparedIdentifierForUndefined?: boolean;\n    comparedIdentifierName?: string;\n    expression: Readonly<TSESTree.Expression>;\n    isGlobalUndefinedIdentifier: (\n        expression: Readonly<TSESTree.Expression>\n    ) => boolean;\n}>): null | NullishComparison => {\n    if (expression.type !== AST_NODE_TYPES.BinaryExpression) {\n        return null;\n    }\n\n    if (!isAllowedNullishComparisonOperator(expression.operator)) {\n        return null;\n    }\n\n    if (\n        allowedOperators !== defaultNullishComparisonOperators &&\n        !arrayIncludes(allowedOperators, expression.operator)\n    ) {\n        return null;\n    }\n\n    const matchesComparedExpression = (\n        candidateExpression: Readonly<TSESTree.Expression>\n    ): boolean =>\n        !isDefined(comparedIdentifierName) ||\n        (candidateExpression.type === AST_NODE_TYPES.Identifier &&\n            candidateExpression.name === comparedIdentifierName);\n\n    const nullLiteralComparison = getNullLiteralComparison(\n        expression.left,\n        expression.right,\n        expression.operator,\n        matchesComparedExpression\n    );\n    if (nullLiteralComparison !== null) {\n        return nullLiteralComparison;\n    }\n\n    const undefinedIdentifierComparison = getUndefinedIdentifierComparison(\n        expression.left,\n        expression.right,\n        expression.operator,\n        matchesComparedExpression,\n        isGlobalUndefinedIdentifier\n    );\n    if (undefinedIdentifierComparison !== null) {\n        return undefinedIdentifierComparison;\n    }\n\n    if (\n        !isDefined(comparedIdentifierName) ||\n        !allowTypeofComparedIdentifierForUndefined\n    ) {\n        return null;\n    }\n\n    return getTypeofUndefinedStringComparison(\n        expression.left,\n        expression.right,\n        expression.operator,\n        comparedIdentifierName\n    );\n};\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-defined-filter`.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getSingleParameterExpressionArrowFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueReferenceReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { getNullishComparison } from \"../_internal/nullish-comparison.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Check whether a callback body is a supported undefined guard expression.\n *\n * @param context - Active rule context for global-binding checks.\n * @param body - Callback body expression to inspect.\n * @param parameterName - Callback parameter name.\n *\n * @returns `true` when the body can be replaced with `isDefined`.\n */\nconst isUndefinedFilterGuardBody = (\n    context: RuleContext,\n    body: Readonly<TSESTree.Expression>,\n    parameterName: string\n): boolean => {\n    const comparison = getNullishComparison({\n        allowedOperators: [\"!=\", \"!==\"],\n        allowTypeofComparedIdentifierForUndefined: true,\n        comparedIdentifierName: parameterName,\n        expression: body,\n        isGlobalUndefinedIdentifier: (candidateExpression) =>\n            isGlobalUndefinedIdentifier(context, candidateExpression),\n    });\n\n    return comparison?.kind === \"undefined\";\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-defined-filter`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsDefinedFilterRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.property.type=\"Identifier\"][callee.property.name=\"filter\"]'(\n                    node\n                ) {\n                    const callbackMatch =\n                        getSingleParameterExpressionArrowFilterCallback(node);\n                    if (!callbackMatch) {\n                        return;\n                    }\n\n                    const { callback, parameter } = callbackMatch;\n\n                    if (\n                        !isUndefinedFilterGuardBody(\n                            context,\n                            callback.body,\n                            parameter.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createSafeValueReferenceReplacementFix({\n                            context,\n                            importedName: \"isDefined\",\n                            imports: tsExtrasImports,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: callback,\n                        }),\n                        messageId: \"preferTsExtrasIsDefinedFilter\",\n                        node: callback,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isDefined in Array.filter callbacks instead of inline undefined checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined-filter\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsDefinedFilter:\n                    \"Prefer `isDefined` from `ts-extras` in `filter(...)` callbacks over inline undefined comparisons.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-defined-filter\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-defined-filter` rule module.\n */\nexport default preferTsExtrasIsDefinedFilterRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-defined`.\n */\nimport { isWithinFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueArgumentFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { safeTypeOperation } from \"../_internal/safe-type-operation.js\";\nimport { getVariableInScopeChain } from \"../_internal/scope-variable.js\";\nimport { isTypePredicateExpressionAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServicesOrUndefined,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\nimport { createTypeScriptEslintNodeExpressionSkipChecker } from \"../_internal/typescript-eslint-node-autofix.js\";\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Matched undefined-comparison metadata used to produce the replacement.\n */\ninterface UndefinedComparisonMatch {\n    readonly comparedExpression: TSESTree.Expression;\n    readonly prefersNegatedHelper: boolean;\n}\n\n/**\n * Narrow an expression to an Identifier with an expected name.\n */\nconst isIdentifierWithName = (\n    expression: Readonly<TSESTree.Expression>,\n    name: string\n): expression is TSESTree.Identifier =>\n    expression.type === AST_NODE_TYPES.Identifier && expression.name === name;\n\n/**\n * Narrow an expression to a `typeof ...` unary expression.\n */\nconst isTypeofExpression = (\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.UnaryExpression & { argument: TSESTree.Expression } =>\n    expression.type === AST_NODE_TYPES.UnaryExpression &&\n    expression.operator === \"typeof\";\n\n/**\n * Check whether an identifier expression resolves to a bound symbol in scope.\n *\n * @remarks\n * This prevents rewriting `typeof` checks where the identifier would be treated\n * as an unbound global reference.\n */\nconst isBoundIdentifierReference = (\n    context: RuleContext,\n    expression: Readonly<TSESTree.Expression>\n): boolean => {\n    if (expression.type !== AST_NODE_TYPES.Identifier) {\n        return true;\n    }\n\n    const result = safeTypeOperation({\n        operation: () => {\n            const initialScope = context.sourceCode.getScope(expression);\n            const variable = getVariableInScopeChain(\n                initialScope,\n                expression.name\n            );\n\n            return variable !== null && variable.defs.length > 0;\n        },\n        reason: \"is-defined-scope-resolution-failed\",\n    });\n\n    if (!result.ok) {\n        return false;\n    }\n\n    return result.value;\n};\n\n/**\n * Narrow an expression to the string literal `\"undefined\"`.\n */\nconst isUndefinedStringLiteral = (\n    expression: Readonly<TSESTree.Expression>\n): expression is TSESTree.Literal & { value: \"undefined\" } =>\n    expression.type === AST_NODE_TYPES.Literal &&\n    expression.value === \"undefined\";\n\n/**\n * Determine whether an expression references the global `undefined` binding.\n *\n * @param context - Active rule context for scope resolution.\n * @param expression - Expression node to inspect.\n *\n * @returns `true` when the expression is an unshadowed `undefined` identifier.\n */\nconst isUndefinedIdentifier = (\n    context: RuleContext,\n    expression: Readonly<TSESTree.Expression>\n): boolean =>\n    isIdentifierWithName(expression, \"undefined\") &&\n    isGlobalUndefinedIdentifier(context, expression);\n\n/**\n * Match supported undefined-comparison patterns used by this rule.\n *\n * @param context - Active rule context for global-binding checks.\n * @param node - Binary expression to inspect.\n *\n * @returns Comparison metadata when the expression is supported; otherwise\n *   `null`.\n */\nconst getUndefinedComparisonMatch = (\n    context: RuleContext,\n    node: Readonly<TSESTree.BinaryExpression>\n): null | UndefinedComparisonMatch => {\n    const isPositiveComparison = node.operator === \"!==\";\n    const isNegativeComparison = node.operator === \"===\";\n\n    if (!isPositiveComparison && !isNegativeComparison) {\n        return null;\n    }\n\n    const prefersNegatedHelper = isNegativeComparison;\n\n    if (isUndefinedIdentifier(context, node.right)) {\n        return {\n            comparedExpression: node.left,\n            prefersNegatedHelper,\n        };\n    }\n\n    if (isUndefinedIdentifier(context, node.left)) {\n        return {\n            comparedExpression: node.right,\n            prefersNegatedHelper,\n        };\n    }\n\n    if (isTypeofExpression(node.left) && isUndefinedStringLiteral(node.right)) {\n        if (!isBoundIdentifierReference(context, node.left.argument)) {\n            return null;\n        }\n\n        return {\n            comparedExpression: node.left.argument,\n            prefersNegatedHelper,\n        };\n    }\n\n    if (isTypeofExpression(node.right) && isUndefinedStringLiteral(node.left)) {\n        if (!isBoundIdentifierReference(context, node.right.argument)) {\n            return null;\n        }\n\n        return {\n            comparedExpression: node.right.argument,\n            prefersNegatedHelper,\n        };\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-defined`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsDefinedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n            const typedServices = getTypedRuleServicesOrUndefined(context);\n            const shouldSkipComparedExpression =\n                createTypeScriptEslintNodeExpressionSkipChecker(\n                    context,\n                    typedServices\n                );\n\n            return {\n                BinaryExpression(node) {\n                    if (isWithinFilterCallback(node)) {\n                        return;\n                    }\n\n                    const match = getUndefinedComparisonMatch(context, node);\n                    if (!match) {\n                        return;\n                    }\n\n                    if (\n                        shouldSkipComparedExpression(match.comparedExpression)\n                    ) {\n                        return;\n                    }\n\n                    const canAutofix =\n                        isTypePredicateExpressionAutofixSafe(node);\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: canAutofix\n                            ? createSafeValueArgumentFunctionCallFix({\n                                  argumentNode: match.comparedExpression,\n                                  context,\n                                  importedName: \"isDefined\",\n                                  imports: tsExtrasImports,\n                                  negated: match.prefersNegatedHelper,\n                                  sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                                  targetNode: node,\n                              })\n                            : null,\n                        messageId: match.prefersNegatedHelper\n                            ? \"preferTsExtrasIsDefinedNegated\"\n                            : \"preferTsExtrasIsDefined\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isDefined over inline undefined comparisons outside filter callbacks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-defined\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsDefined:\n                    \"Prefer `isDefined(value)` from `ts-extras` over inline undefined comparisons.\",\n                preferTsExtrasIsDefinedNegated:\n                    \"Prefer `!isDefined(value)` from `ts-extras` over inline undefined comparisons.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-defined\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-defined` rule module.\n */\nexport default preferTsExtrasIsDefinedRule;\n", "import type { UnknownArray, UnknownRecord } from \"type-fest\";\nimport type ts from \"typescript\";\n\nimport parser from \"@typescript-eslint/parser\";\nimport {\n    isTypeAnyType,\n    isTypeUnknownType,\n} from \"@typescript-eslint/type-utils\";\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Shared type-aware guardrails for skipping risky rule reports/fixes on\n * `@typescript-eslint` AST-node expressions.\n */\nimport {\n    arrayIncludes,\n    isDefined,\n    objectHasOwn,\n    safeCastTo,\n    stringSplit,\n} from \"ts-extras\";\n\nimport type { TypedRuleServices } from \"./typed-rule.js\";\n\nimport { getBoundedCacheValue, setBoundedCacheValue } from \"./bounded-cache.js\";\nimport { getConstrainedTypeAtLocationWithFallback } from \"./constrained-type-at-location.js\";\nimport { TYPESCRIPT_ESLINT_UTILS_MODULE_SOURCE } from \"./module-source.js\";\nimport { safeTypeOperation } from \"./safe-type-operation.js\";\nimport { getVariableInScopeChain } from \"./scope-variable.js\";\nimport { setContainsValue } from \"./set-membership.js\";\nimport {\n    getTypeCheckerApparentType,\n    getTypeCheckerBaseConstraintType,\n    getTypeCheckerTypeArguments,\n} from \"./type-checker-compat.js\";\nimport { recordTypedPathPrefilterEvaluation } from \"./typed-path-telemetry.js\";\n\nconst TYPESCRIPT_ESLINT_PACKAGE_SEGMENT = \"@typescript-eslint\" as const;\nconst TSESTREE_NAMESPACE_NAME = \"TSESTree\" as const;\n\nconst isImportDeclarationNode = (\n    value: unknown\n): value is Readonly<TSESTree.ImportDeclaration> =>\n    typeof value === \"object\" &&\n    value !== null &&\n    Reflect.get(value, \"type\") === AST_NODE_TYPES.ImportDeclaration;\n\nconst addTypeScriptEslintNamespaceImportNames = (\n    statement: Readonly<TSESTree.ImportDeclaration>,\n    namespaceNames: Set<string>\n): void => {\n    if (statement.source.value !== TYPESCRIPT_ESLINT_UTILS_MODULE_SOURCE) {\n        return;\n    }\n\n    for (const specifier of statement.specifiers) {\n        if (specifier.type === AST_NODE_TYPES.ImportNamespaceSpecifier) {\n            namespaceNames.add(specifier.local.name);\n            continue;\n        }\n\n        if (\n            specifier.type === AST_NODE_TYPES.ImportSpecifier &&\n            specifier.imported.type === AST_NODE_TYPES.Identifier &&\n            specifier.imported.name === TSESTREE_NAMESPACE_NAME\n        ) {\n            namespaceNames.add(specifier.local.name);\n        }\n    }\n};\nconst PATH_SEPARATOR = \"/\" as const;\nconst ASCII_DIGIT_ZERO_CODE_POINT = 48 as const;\nconst ASCII_DIGIT_NINE_CODE_POINT = 57 as const;\nconst ASCII_UPPERCASE_A_CODE_POINT = 65 as const;\nconst ASCII_UPPERCASE_Z_CODE_POINT = 90 as const;\nconst ASCII_UNDERSCORE_CODE_POINT = 95 as const;\nconst ASCII_DOLLAR_SIGN_CODE_POINT = 36 as const;\nconst ASCII_LOWERCASE_A_CODE_POINT = 97 as const;\nconst ASCII_LOWERCASE_Z_CODE_POINT = 122 as const;\n\n/**\n * ESTree metadata keys that never contribute to semantic type-reference\n * detection during fallback node traversal.\n */\nconst IGNORED_TRAVERSAL_KEYS = new Set<string>([\n    \"comments\",\n    \"end\",\n    \"loc\",\n    \"parent\",\n    \"range\",\n    \"start\",\n    \"tokens\",\n]);\n\nconst namespaceImportNamesBySourceCode = new WeakMap<\n    Readonly<TSESLint.SourceCode>,\n    ReadonlySet<string>\n>();\n\nconst MAX_PARSED_DEFINITION_TEXT_CACHE_ENTRIES = 512 as const;\n\n/**\n * Upper bound for fallback definition text that may be reparsed as a synthetic\n * program.\n *\n * @remarks\n * Extremely large definition snippets provide little signal for this fallback\n * and can degrade lint latency in adversarial files.\n */\nconst MAX_DEFINITION_TEXT_PARSE_LENGTH = 16_384 as const;\n\nconst parsedDefinitionTextProgramBySourceText = new Map<\n    string,\n    null | Readonly<TSESTree.Program>\n>();\n\nconst cacheParsedDefinitionTextProgram = ({\n    cacheKey,\n    parsedProgram,\n}: Readonly<{\n    cacheKey: string;\n    parsedProgram: null | Readonly<TSESTree.Program>;\n}>): void => {\n    setBoundedCacheValue({\n        cache: parsedDefinitionTextProgramBySourceText,\n        key: cacheKey,\n        maxEntries: MAX_PARSED_DEFINITION_TEXT_CACHE_ENTRIES,\n        value: parsedProgram,\n    });\n};\n\n/**\n * Determine whether a code point is valid within an ASCII identifier token.\n */\nconst isAsciiIdentifierCodePoint = (codePoint: number): boolean =>\n    (codePoint >= ASCII_UPPERCASE_A_CODE_POINT &&\n        codePoint <= ASCII_UPPERCASE_Z_CODE_POINT) ||\n    (codePoint >= ASCII_LOWERCASE_A_CODE_POINT &&\n        codePoint <= ASCII_LOWERCASE_Z_CODE_POINT) ||\n    (codePoint >= ASCII_DIGIT_ZERO_CODE_POINT &&\n        codePoint <= ASCII_DIGIT_NINE_CODE_POINT) ||\n    codePoint === ASCII_UNDERSCORE_CODE_POINT ||\n    codePoint === ASCII_DOLLAR_SIGN_CODE_POINT;\n\n/**\n * Determine whether the code point at `index` is outside identifier syntax.\n */\nconst isIdentifierBoundaryAt = (text: string, index: number): boolean => {\n    if (index < 0 || index >= text.length) {\n        return true;\n    }\n\n    const codePoint = text.codePointAt(index);\n    if (!isDefined(codePoint)) {\n        return true;\n    }\n\n    return !isAsciiIdentifierCodePoint(codePoint);\n};\n\n/**\n * Advance an index over ASCII whitespace.\n */\nconst skipAsciiWhitespace = (text: string, startIndex: number): number => {\n    let index = startIndex;\n\n    while (index < text.length) {\n        const character = text.at(index);\n\n        if (\n            character !== \" \" &&\n            character !== \"\\n\" &&\n            character !== \"\\r\" &&\n            character !== \"\\t\"\n        ) {\n            break;\n        }\n\n        index += 1;\n    }\n\n    return index;\n};\n\nconst isTypeScriptEslintDeclarationPath = (fileName: string): boolean => {\n    const normalizedFileName = fileName.replaceAll(\"\\\\\", PATH_SEPARATOR);\n    const pathSegments = stringSplit(normalizedFileName, PATH_SEPARATOR).filter(\n        (segment) => segment.length > 0\n    );\n\n    const packagePathSegment: string = TYPESCRIPT_ESLINT_PACKAGE_SEGMENT;\n\n    return arrayIncludes(pathSegments, packagePathSegment);\n};\n\nconst isUnknownRecord = (value: unknown): value is UnknownRecord =>\n    typeof value === \"object\" && value !== null;\n\n/**\n * Return `true` when a record key should be excluded from semantic traversal.\n */\nconst shouldSkipTraversalKey = (key: string): boolean =>\n    setContainsValue(IGNORED_TRAVERSAL_KEYS, key);\n\nconst createDefinitionTextParseCandidates = (\n    definitionNodeText: string\n): readonly string[] => {\n    const trimmedText = definitionNodeText.trim();\n\n    if (\n        trimmedText.length === 0 ||\n        trimmedText.length > MAX_DEFINITION_TEXT_PARSE_LENGTH\n    ) {\n        return [];\n    }\n\n    const parseCandidates = new Set<string>([\n        `(${trimmedText});`,\n        `const ${trimmedText};`,\n        `type __typefest_tmp__ = ${trimmedText};`,\n        trimmedText,\n    ]);\n\n    return [...parseCandidates];\n};\n\nconst parseDefinitionTextProgram = (\n    definitionNodeText: string\n): null | Readonly<TSESTree.Program> => {\n    const cacheKey = definitionNodeText.trim();\n\n    if (cacheKey.length === 0) {\n        return null;\n    }\n\n    const cachedProgramLookup = getBoundedCacheValue(\n        parsedDefinitionTextProgramBySourceText,\n        cacheKey\n    );\n\n    if (cachedProgramLookup.found) {\n        return cachedProgramLookup.value;\n    }\n\n    const parseCandidates = createDefinitionTextParseCandidates(cacheKey);\n\n    for (const parseCandidate of parseCandidates) {\n        const parsedResult = safeTypeOperation({\n            operation: () =>\n                parser.parseForESLint(parseCandidate, {\n                    ecmaVersion: \"latest\",\n                    loc: false,\n                    range: false,\n                    sourceType: \"module\",\n                }),\n            reason: \"ts-eslint-node-autofix-parse-definition-candidate-failed\",\n        });\n\n        if (!parsedResult.ok) {\n            continue;\n        }\n\n        cacheParsedDefinitionTextProgram({\n            cacheKey,\n            parsedProgram: parsedResult.value.ast,\n        });\n\n        return parsedResult.value.ast;\n    }\n\n    cacheParsedDefinitionTextProgram({\n        cacheKey,\n        parsedProgram: null,\n    });\n\n    return null;\n};\n\nconst getTypeScriptEslintNamespaceImportNames = (\n    sourceCode: Readonly<TSESLint.SourceCode>\n): ReadonlySet<string> => {\n    const cachedNamespaceNames =\n        namespaceImportNamesBySourceCode.get(sourceCode);\n    if (isDefined(cachedNamespaceNames)) {\n        return cachedNamespaceNames;\n    }\n\n    const namespaceNames = new Set<string>();\n    const sourceCodeObject: object = sourceCode;\n    const ast: unknown = Reflect.get(sourceCodeObject, \"ast\");\n    const programStatements: unknown =\n        typeof ast === \"object\" && ast !== null\n            ? Reflect.get(ast, \"body\")\n            : undefined;\n\n    if (!Array.isArray(programStatements)) {\n        namespaceImportNamesBySourceCode.set(sourceCode, namespaceNames);\n\n        return namespaceNames;\n    }\n\n    const importCandidates: Readonly<UnknownArray> = programStatements;\n\n    for (const statement of importCandidates) {\n        if (!isImportDeclarationNode(statement)) {\n            continue;\n        }\n\n        addTypeScriptEslintNamespaceImportNames(statement, namespaceNames);\n    }\n\n    const readonlyNamespaceNames: ReadonlySet<string> = new Set(namespaceNames);\n\n    namespaceImportNamesBySourceCode.set(sourceCode, readonlyNamespaceNames);\n\n    return readonlyNamespaceNames;\n};\n\nconst isTypeScriptEslintQualifiedTypeName = (\n    typeName: unknown,\n    namespaceNames: ReadonlySet<string>\n): boolean => {\n    if (!isUnknownRecord(typeName) || typeName[\"type\"] !== \"TSQualifiedName\") {\n        return false;\n    }\n\n    const left = typeName[\"left\"];\n    const right = typeName[\"right\"];\n\n    return (\n        isUnknownRecord(left) &&\n        left[\"type\"] === \"Identifier\" &&\n        typeof left[\"name\"] === \"string\" &&\n        setContainsValue(namespaceNames, left[\"name\"]) &&\n        isUnknownRecord(right) &&\n        right[\"type\"] === \"Identifier\" &&\n        typeof right[\"name\"] === \"string\"\n    );\n};\n\nconst containsTypeScriptEslintTypeReference = (\n    rootNode: unknown,\n    namespaceNames: ReadonlySet<string>\n): boolean => {\n    if (namespaceNames.size === 0) {\n        return false;\n    }\n\n    const visitedNodes = new Set<UnknownRecord>();\n    const pendingNodes: unknown[] = [rootNode];\n\n    while (pendingNodes.length > 0) {\n        const currentNode = pendingNodes.pop();\n\n        if (\n            !isUnknownRecord(currentNode) ||\n            setContainsValue(visitedNodes, currentNode)\n        ) {\n            continue;\n        }\n\n        visitedNodes.add(currentNode);\n\n        if (\n            currentNode[\"type\"] === \"TSTypeReference\" &&\n            isTypeScriptEslintQualifiedTypeName(\n                currentNode[\"typeName\"],\n                namespaceNames\n            )\n        ) {\n            return true;\n        }\n\n        if (isTypeScriptEslintQualifiedTypeName(currentNode, namespaceNames)) {\n            return true;\n        }\n\n        for (const key in currentNode) {\n            if (\n                !objectHasOwn(currentNode, key) ||\n                shouldSkipTraversalKey(key)\n            ) {\n                continue;\n            }\n\n            const value = currentNode[key];\n\n            if (Array.isArray(value)) {\n                for (const entry of value) {\n                    pendingNodes.push(entry);\n                }\n                continue;\n            }\n\n            if (isUnknownRecord(value)) {\n                pendingNodes.push(value);\n            }\n        }\n    }\n\n    return false;\n};\n\nconst containsTypeScriptEslintTypeReferenceText = (\n    text: string,\n    namespaceNames: ReadonlySet<string>\n): boolean => {\n    if (namespaceNames.size === 0) {\n        return false;\n    }\n\n    let containsPotentialNamespaceTextReference = false;\n\n    for (const namespaceName of namespaceNames) {\n        let searchStartIndex = 0;\n\n        while (searchStartIndex < text.length) {\n            const namespaceIndex = text.indexOf(\n                namespaceName,\n                searchStartIndex\n            );\n\n            if (namespaceIndex === -1) {\n                break;\n            }\n\n            const afterNamespaceIndex = namespaceIndex + namespaceName.length;\n\n            if (\n                isIdentifierBoundaryAt(text, namespaceIndex - 1) &&\n                isIdentifierBoundaryAt(text, afterNamespaceIndex)\n            ) {\n                const nextTokenIndex = skipAsciiWhitespace(\n                    text,\n                    afterNamespaceIndex\n                );\n\n                if (text.at(nextTokenIndex) === \".\") {\n                    containsPotentialNamespaceTextReference = true;\n                    break;\n                }\n            }\n\n            searchStartIndex = afterNamespaceIndex;\n        }\n\n        if (containsPotentialNamespaceTextReference) {\n            break;\n        }\n    }\n\n    if (!containsPotentialNamespaceTextReference) {\n        return false;\n    }\n\n    const parsedProgram = parseDefinitionTextProgram(text);\n\n    if (parsedProgram === null) {\n        return false;\n    }\n\n    return containsTypeScriptEslintTypeReference(parsedProgram, namespaceNames);\n};\n\nconst createTypeScriptEslintNodeLikeExpressionByDefinitionChecker = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,\n    namespaceNames: ReadonlySet<string>\n): ((expression: Readonly<TSESTree.Expression>) => boolean) => {\n    const definitionNodeTextByNode = new WeakMap<\n        Readonly<TSESTree.Node>,\n        string\n    >();\n\n    const astNodeLikeByVariable = new WeakMap<\n        Readonly<TSESLint.Scope.Variable>,\n        boolean\n    >();\n\n    const sourceCode = context.sourceCode;\n\n    const getDefinitionNodeText = (\n        definitionNode: Readonly<TSESTree.Node>\n    ): string => {\n        const cachedText = definitionNodeTextByNode.get(definitionNode);\n        if (isDefined(cachedText)) {\n            return cachedText;\n        }\n\n        const definitionNodeText = sourceCode.getText(definitionNode);\n\n        definitionNodeTextByNode.set(definitionNode, definitionNodeText);\n\n        return definitionNodeText;\n    };\n\n    return (expression) => {\n        if (namespaceNames.size === 0) {\n            return false;\n        }\n\n        if (expression.type !== AST_NODE_TYPES.Identifier) {\n            return false;\n        }\n\n        const resolutionResult = safeTypeOperation({\n            operation: () => {\n                const currentScope = sourceCode.getScope(expression);\n                const variable = getVariableInScopeChain(\n                    currentScope,\n                    expression.name\n                );\n\n                if (variable === null) {\n                    return false;\n                }\n\n                const cachedVariableResult =\n                    astNodeLikeByVariable.get(variable);\n\n                if (isDefined(cachedVariableResult)) {\n                    return cachedVariableResult;\n                }\n\n                const visitedDefinitionNodes = new Set<TSESTree.Node>();\n                const pendingDefinitionNodes: TSESTree.Node[] = [];\n\n                const enqueueDefinitionNode = (\n                    node: null | Readonly<TSESTree.Node> | undefined\n                ): void => {\n                    if (node === null || !isDefined(node)) {\n                        return;\n                    }\n\n                    if (setContainsValue(visitedDefinitionNodes, node)) {\n                        return;\n                    }\n\n                    pendingDefinitionNodes.push(node);\n                };\n\n                for (const definition of variable.defs) {\n                    enqueueDefinitionNode(definition.node);\n                }\n\n                let variableReferencesTypeScriptEslintNode = false;\n\n                while (pendingDefinitionNodes.length > 0) {\n                    const definitionNode = pendingDefinitionNodes.pop();\n\n                    if (!isDefined(definitionNode)) {\n                        continue;\n                    }\n\n                    visitedDefinitionNodes.add(definitionNode);\n\n                    if (\n                        containsTypeScriptEslintTypeReference(\n                            definitionNode,\n                            namespaceNames\n                        )\n                    ) {\n                        variableReferencesTypeScriptEslintNode = true;\n                        break;\n                    }\n\n                    const definitionNodeText =\n                        getDefinitionNodeText(definitionNode);\n                    if (\n                        containsTypeScriptEslintTypeReferenceText(\n                            definitionNodeText,\n                            namespaceNames\n                        )\n                    ) {\n                        variableReferencesTypeScriptEslintNode = true;\n                        break;\n                    }\n\n                    if (\n                        definitionNode.type ===\n                            AST_NODE_TYPES.VariableDeclarator &&\n                        definitionNode.init !== null &&\n                        definitionNode.init.type ===\n                            AST_NODE_TYPES.MemberExpression &&\n                        definitionNode.init.object.type ===\n                            AST_NODE_TYPES.Identifier\n                    ) {\n                        const { object } = definitionNode.init;\n                        const objectVariable = getVariableInScopeChain(\n                            currentScope,\n                            object.name\n                        );\n\n                        if (objectVariable === null) {\n                            continue;\n                        }\n\n                        const cachedObjectVariableResult =\n                            astNodeLikeByVariable.get(objectVariable);\n\n                        if (cachedObjectVariableResult === true) {\n                            variableReferencesTypeScriptEslintNode = true;\n                            break;\n                        }\n\n                        for (const objectDefinition of objectVariable.defs) {\n                            enqueueDefinitionNode(objectDefinition.node);\n                        }\n                    }\n                }\n\n                astNodeLikeByVariable.set(\n                    variable,\n                    variableReferencesTypeScriptEslintNode\n                );\n\n                return variableReferencesTypeScriptEslintNode;\n            },\n            reason: \"ts-eslint-node-autofix-definition-fallback-failed\",\n        });\n\n        if (!resolutionResult.ok) {\n            return false;\n        }\n\n        return resolutionResult.value;\n    };\n};\n\nconst collectNestedTypeArguments = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): readonly ts.Type[] => {\n    const collectedTypes: ts.Type[] = [];\n\n    const aliasTypeArguments = safeCastTo<\n        Readonly<{\n            aliasTypeArguments?: readonly ts.Type[];\n        }>\n    >(type).aliasTypeArguments;\n\n    if (isDefined(aliasTypeArguments)) {\n        for (const aliasTypeArgument of aliasTypeArguments) {\n            collectedTypes.push(aliasTypeArgument);\n        }\n    }\n\n    const checkerTypeArgumentsResult = safeTypeOperation({\n        operation: () => getTypeCheckerTypeArguments(checker, type) ?? [],\n        reason: \"ts-eslint-node-autofix-get-type-arguments-failed\",\n    });\n\n    if (checkerTypeArgumentsResult.ok) {\n        for (const checkerTypeArgument of checkerTypeArgumentsResult.value) {\n            collectedTypes.push(checkerTypeArgument);\n        }\n    }\n\n    return collectedTypes;\n};\n\n/**\n * Determine whether a TypeScript type resolves to an `@typescript-eslint` AST\n * node type.\n *\n * @param checker - Type checker for symbol and declaration inspection.\n * @param type - Candidate type to inspect.\n *\n * @returns `true` when the candidate resolves to a `TSESTree` AST type.\n */\nexport const isTypeScriptEslintAstType = (\n    checker: Readonly<ts.TypeChecker>,\n    type: Readonly<ts.Type>\n): boolean => {\n    const visitedTypes = new Set<ts.Type>();\n    const pendingTypes: ts.Type[] = [safeCastTo(type)];\n\n    while (pendingTypes.length > 0) {\n        const currentType = pendingTypes.pop();\n\n        if (\n            !isDefined(currentType) ||\n            setContainsValue(visitedTypes, currentType)\n        ) {\n            continue;\n        }\n\n        visitedTypes.add(currentType);\n\n        if (isTypeAnyType(currentType) || isTypeUnknownType(currentType)) {\n            continue;\n        }\n\n        const symbol = currentType.aliasSymbol ?? currentType.getSymbol();\n\n        if (isDefined(symbol)) {\n            const declarations = symbol.getDeclarations() ?? [];\n\n            const hasTypeScriptEslintDeclaration = declarations.some(\n                (declaration) =>\n                    isTypeScriptEslintDeclarationPath(\n                        declaration.getSourceFile().fileName\n                    )\n            );\n\n            if (hasTypeScriptEslintDeclaration) {\n                return true;\n            }\n        }\n\n        if (currentType.isUnionOrIntersection()) {\n            for (const typePart of currentType.types) {\n                pendingTypes.push(typePart);\n            }\n        }\n\n        const nestedTypeArguments = collectNestedTypeArguments(\n            checker,\n            currentType\n        );\n        if (nestedTypeArguments.length > 0) {\n            for (const nestedTypeArgument of nestedTypeArguments) {\n                pendingTypes.push(nestedTypeArgument);\n            }\n        }\n\n        const apparentType = getTypeCheckerApparentType(checker, currentType);\n        if (isDefined(apparentType) && apparentType !== currentType) {\n            pendingTypes.push(apparentType);\n        }\n\n        const baseConstraintType = getTypeCheckerBaseConstraintType(\n            checker,\n            currentType\n        );\n        if (\n            isDefined(baseConstraintType) &&\n            baseConstraintType !== currentType\n        ) {\n            pendingTypes.push(baseConstraintType);\n        }\n    }\n\n    return false;\n};\n\n/**\n * Build a predicate that skips rule reporting/fixing when the compared\n * expression resolves to an `@typescript-eslint` AST node.\n *\n * @param context - Rule context for typed parser services.\n * @param typedServices - Prevalidated typed services. Pass `null`/`undefined`\n *   to run definition-only fallback logic with no checker calls.\n *\n * @returns Expression predicate that returns `true` when the current rule\n *   should skip reporting/fixing for the expression.\n */\nexport const createTypeScriptEslintNodeExpressionSkipChecker = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>(\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,\n    typedServices?: Readonly<TypedRuleServices>\n): ((expression: Readonly<TSESTree.Expression>) => boolean) => {\n    const shouldSkipExpressionCache = new WeakMap<\n        Readonly<TSESTree.Expression>,\n        boolean\n    >();\n\n    const namespaceNames = getTypeScriptEslintNamespaceImportNames(\n        context.sourceCode\n    );\n\n    const isTypeScriptEslintNodeLikeExpressionByDefinition =\n        createTypeScriptEslintNodeLikeExpressionByDefinitionChecker(\n            context,\n            namespaceNames\n        );\n    const telemetryFilePath = context.physicalFilename;\n\n    return (expression) => {\n        const cachedResult = shouldSkipExpressionCache.get(expression);\n\n        if (isDefined(cachedResult)) {\n            return cachedResult;\n        }\n\n        const shouldSkipByDefinition =\n            isTypeScriptEslintNodeLikeExpressionByDefinition(expression);\n\n        recordTypedPathPrefilterEvaluation({\n            filePath: telemetryFilePath,\n            prefilterHit: shouldSkipByDefinition,\n        });\n\n        if (shouldSkipByDefinition) {\n            shouldSkipExpressionCache.set(expression, true);\n\n            return true;\n        }\n\n        if (!isDefined(typedServices)) {\n            shouldSkipExpressionCache.set(expression, false);\n\n            return false;\n        }\n\n        const { checker, parserServices } = typedServices;\n\n        const isNodeTypedExpressionResult = safeTypeOperation({\n            operation: () => {\n                const expressionType = getConstrainedTypeAtLocationWithFallback(\n                    checker,\n                    expression,\n                    parserServices,\n                    \"ts-eslint-node-autofix-expression-type-resolution-failed\"\n                );\n\n                if (!isDefined(expressionType)) {\n                    return false;\n                }\n\n                return isTypeScriptEslintAstType(checker, expressionType);\n            },\n            reason: \"ts-eslint-node-autofix-expression-check-failed\",\n        });\n\n        if (\n            isNodeTypedExpressionResult.ok &&\n            isNodeTypedExpressionResult.value\n        ) {\n            shouldSkipExpressionCache.set(expression, true);\n\n            return true;\n        }\n\n        shouldSkipExpressionCache.set(expression, false);\n\n        return false;\n    };\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-empty`.\n */\nimport { createIsArrayLikeExpressionChecker } from \"../_internal/array-like-expression.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueArgumentFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\nimport { createTypeScriptEslintNodeExpressionSkipChecker } from \"../_internal/typescript-eslint-node-autofix.js\";\n\n/**\n * Checks whether an expression is the numeric literal `0`.\n *\n * @param node - Expression node to inspect.\n *\n * @returns `true` when the node is a `Literal` whose value is `0`.\n */\n\nconst isZeroLiteral = (node: Readonly<TSESTree.Expression>): boolean =>\n    node.type === AST_NODE_TYPES.Literal && node.value === 0;\n\n/**\n * Narrows expressions to direct `.length` member access.\n *\n * @param node - Expression node to inspect.\n *\n * @returns `true` when the node is a non-computed member expression whose\n *   property identifier is `length`.\n */\n\nconst isLengthMemberExpression = (\n    node: Readonly<TSESTree.Expression>\n): node is TSESTree.MemberExpression & { property: TSESTree.Identifier } =>\n    node.type === AST_NODE_TYPES.MemberExpression &&\n    !node.computed &&\n    node.property.type === AST_NODE_TYPES.Identifier &&\n    node.property.name === \"length\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-empty`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsEmptyRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const isArrayLikeExpression = createIsArrayLikeExpressionChecker({\n                checker,\n                parserServices,\n                telemetryFilePath: context.physicalFilename,\n                unionMatchMode: \"every\",\n            });\n            const shouldSkipComparedExpression =\n                createTypeScriptEslintNodeExpressionSkipChecker(context, {\n                    checker,\n                    parserServices,\n                });\n\n            return {\n                BinaryExpression(node) {\n                    if (node.operator !== \"==\" && node.operator !== \"===\") {\n                        return;\n                    }\n\n                    const isLeftLengthCheck =\n                        isLengthMemberExpression(node.left) &&\n                        isZeroLiteral(node.right);\n                    const isRightLengthCheck =\n                        isLengthMemberExpression(node.right) &&\n                        isZeroLiteral(node.left);\n\n                    if (!isLeftLengthCheck && !isRightLengthCheck) {\n                        return;\n                    }\n\n                    const lengthNode = isLeftLengthCheck\n                        ? node.left\n                        : node.right;\n\n                    if (!isLengthMemberExpression(lengthNode)) {\n                        return;\n                    }\n\n                    if (!isArrayLikeExpression(lengthNode.object)) {\n                        return;\n                    }\n\n                    if (shouldSkipComparedExpression(lengthNode.object)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createSafeValueArgumentFunctionCallFix({\n                            argumentNode: lengthNode.object,\n                            context,\n                            importedName: \"isEmpty\",\n                            imports: tsExtrasImports,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        }),\n                        messageId: \"preferTsExtrasIsEmpty\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isEmpty over direct array.length === 0 checks for consistent emptiness guards.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-empty\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsEmpty:\n                    \"Prefer `isEmpty` from `ts-extras` over direct `array.length === 0` checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-empty\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-empty` rule module.\n */\nexport default preferTsExtrasIsEmptyRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-equal-type`.\n */\nimport { isDefined } from \"ts-extras\";\n\nimport {\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n} from \"../_internal/imported-type-aliases.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport {\n    TS_EXTRAS_MODULE_SOURCE,\n    TYPE_FEST_MODULE_SOURCE,\n} from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst IS_EQUAL_TYPE_NAME = \"IsEqual\";\nconst IS_EQUAL_TYPE_FUNCTION_NAME = \"isEqualType\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-equal-type`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsEqualTypeRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const isEqualLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                IS_EQUAL_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            /**\n             * Resolve `IsEqual<...>` type references from direct or namespace\n             * imports.\n             */\n            const getIsEqualTypeReference = (\n                node: Readonly<TSESTree.TypeNode>\n            ): null | TSESTree.TSTypeReference => {\n                if (node.type !== AST_NODE_TYPES.TSTypeReference) {\n                    return null;\n                }\n\n                if (node.typeName.type === AST_NODE_TYPES.Identifier) {\n                    return setContainsValue(\n                        isEqualLocalNames,\n                        node.typeName.name\n                    )\n                        ? node\n                        : null;\n                }\n\n                if (node.typeName.type !== AST_NODE_TYPES.TSQualifiedName) {\n                    return null;\n                }\n\n                if (\n                    node.typeName.left.type === AST_NODE_TYPES.Identifier &&\n                    setContainsValue(\n                        typeFestNamespaceImportNames,\n                        node.typeName.left.name\n                    ) &&\n                    node.typeName.right.name === IS_EQUAL_TYPE_NAME\n                ) {\n                    return node;\n                }\n\n                return null;\n            };\n\n            return {\n                VariableDeclarator(node) {\n                    if (\n                        node.id.type !== AST_NODE_TYPES.Identifier ||\n                        !isDefined(node.id.typeAnnotation?.typeAnnotation) ||\n                        node.init?.type !== AST_NODE_TYPES.Literal ||\n                        typeof node.init.value !== \"boolean\"\n                    ) {\n                        return;\n                    }\n\n                    const isEqualTypeReference = getIsEqualTypeReference(\n                        node.id.typeAnnotation.typeAnnotation\n                    );\n\n                    if (!isEqualTypeReference) {\n                        return;\n                    }\n\n                    const typeArguments =\n                        isEqualTypeReference.typeArguments?.params ?? [];\n                    const identifierName = node.id.name;\n                    const initializerValue = node.init.value;\n                    const [leftType, rightType] = typeArguments;\n\n                    if (leftType === undefined || rightType === undefined) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasIsEqualType\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    const leftTypeText = context.sourceCode.getText(leftType);\n                    const rightTypeText = context.sourceCode.getText(rightType);\n                    const isEqualTypeSuggestionFix =\n                        createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: IS_EQUAL_TYPE_FUNCTION_NAME,\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) => {\n                                const callText = `${replacementName}<${leftTypeText}, ${rightTypeText}>()`;\n                                const runtimePreservingExpression =\n                                    initializerValue\n                                        ? `${callText} || true`\n                                        : `${callText} && false`;\n\n                                return `${identifierName} = ${runtimePreservingExpression}`;\n                            },\n                            reportFixIntent: \"suggestion\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n\n                    if (\n                        typeArguments.length !== 2 ||\n                        isEqualTypeSuggestionFix === null\n                    ) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasIsEqualType\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferTsExtrasIsEqualType\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: isEqualTypeSuggestionFix,\n                                    messageId: \"suggestTsExtrasIsEqualType\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isEqualType over IsEqual<T, U> boolean assertion variables.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: \"typefest.configs.all\",\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-equal-type\",\n            },\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasIsEqualType:\n                    \"Prefer `isEqualType<T, U>()` from `ts-extras` over `IsEqual<T, U>` boolean assertion variables.\",\n                suggestTsExtrasIsEqualType:\n                    \"Replace this boolean `IsEqual<...>` assertion variable with `isEqualType<...>()`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-equal-type\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-equal-type` rule module.\n */\nexport default preferTsExtrasIsEqualTypeRule;\n", "/**\n * @packageDocumentation\n * Helpers for matching static member calls that resolve to global bindings.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport {\n    getIdentifierMemberCall,\n    type IdentifierMemberCallExpression,\n} from \"./member-call.js\";\nimport { isGlobalIdentifierNamed } from \"./typed-rule.js\";\n\n/**\n * Match `GlobalName.memberName(...)` calls where `GlobalName` resolves to the\n * unshadowed global binding.\n *\n * @param options - Rule context and candidate call details.\n *\n * @returns Narrowed call expression when matched against the global binding;\n *   otherwise `null`.\n */\nexport const getGlobalIdentifierMemberCall = <\n    MessageIds extends string,\n    Options extends Readonly<UnknownArray>,\n>({\n    context,\n    memberName,\n    node,\n    objectName,\n}: Readonly<{\n    context: Readonly<TSESLint.RuleContext<MessageIds, Options>>;\n    memberName: string;\n    node: Readonly<TSESTree.CallExpression>;\n    objectName: string;\n}>): IdentifierMemberCallExpression | null => {\n    const memberCall = getIdentifierMemberCall({\n        memberName,\n        node,\n        objectName,\n    });\n\n    if (memberCall === null) {\n        return null;\n    }\n\n    return isGlobalIdentifierNamed(\n        context,\n        memberCall.callee.object,\n        objectName\n    )\n        ? memberCall\n        : null;\n};\n", "/**\n * @packageDocumentation\n * Shared reporting helper for ts-extras global static member-call replacement\n * rules.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport { getGlobalIdentifierMemberCall } from \"./global-identifier-member-call.js\";\nimport {\n    createSafeValueReferenceReplacementFix,\n    type ImportedValueAliasMap,\n} from \"./imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"./module-source.js\";\nimport {\n    reportResolvedAutofixOrSuggestionOutcome,\n    resolveAutofixOrSuggestionOutcome,\n} from \"./rule-reporting.js\";\n\n/** Direct named value imports collection type from shared import helper. */\ntype DirectNamedValueImports = ImportedValueAliasMap;\n\n/** Typed rule context shape for global-member call rules. */\ntype GlobalMemberRuleContext<MessageId extends string> = Readonly<\n    TSESLint.RuleContext<MessageId, Readonly<UnknownArray>>\n>;\n\n/**\n * Match `GlobalName.memberName(...)` calls that resolve to unshadowed globals\n * and report a standardized ts-extras replacement.\n */\nexport const reportTsExtrasGlobalMemberCall = <MessageId extends string>({\n    canAutofix,\n    context,\n    importedName,\n    imports,\n    memberName,\n    messageId,\n    minimumArgumentCount,\n    node,\n    objectName,\n    reportSuggestion,\n    suggestionMessageId,\n}: Readonly<{\n    canAutofix?: (node: Readonly<TSESTree.CallExpression>) => boolean;\n    context: GlobalMemberRuleContext<MessageId>;\n    importedName: string;\n    imports: DirectNamedValueImports;\n    memberName: string;\n    messageId: MessageId;\n    minimumArgumentCount?: number;\n    node: Readonly<TSESTree.CallExpression>;\n    objectName: string;\n    reportSuggestion?: (\n        input: Readonly<{\n            fix: TSESLint.ReportFixFunction;\n            messageId: MessageId;\n            node: Readonly<TSESTree.CallExpression>;\n            suggestionMessageId: MessageId;\n        }>\n    ) => void;\n    suggestionMessageId?: MessageId;\n}>): void => {\n    const globalMemberCall = getGlobalIdentifierMemberCall({\n        context,\n        memberName,\n        node,\n        objectName,\n    });\n\n    if (globalMemberCall === null) {\n        return;\n    }\n\n    if (\n        typeof minimumArgumentCount === \"number\" &&\n        node.arguments.length < minimumArgumentCount\n    ) {\n        return;\n    }\n\n    const shouldAutofix = canAutofix?.(node) ?? true;\n    const fix = createSafeValueReferenceReplacementFix({\n        context,\n        importedName,\n        imports,\n        sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n        targetNode: globalMemberCall.callee,\n    });\n\n    const outcome = resolveAutofixOrSuggestionOutcome({\n        canAutofix: shouldAutofix,\n        fix,\n    });\n\n    if (outcome.kind === \"suggestion\" && reportSuggestion !== undefined) {\n        reportSuggestion({\n            fix: outcome.fix,\n            messageId,\n            node,\n            suggestionMessageId: suggestionMessageId ?? messageId,\n        });\n\n        return;\n    }\n\n    reportResolvedAutofixOrSuggestionOutcome({\n        context,\n        messageId,\n        node,\n        outcome,\n        suggestionMessageId: suggestionMessageId ?? messageId,\n    });\n};\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-finite`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-finite`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsFiniteRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Number\"][callee.property.type=\"Identifier\"][callee.property.name=\"isFinite\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"isFinite\",\n                        imports: tsExtrasImports,\n                        memberName: \"isFinite\",\n                        messageId: \"preferTsExtrasIsFinite\",\n                        node,\n                        objectName: \"Number\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isFinite over Number.isFinite for consistent predicate helper usage.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-finite\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsFinite:\n                    \"Prefer `isFinite` from `ts-extras` over `Number.isFinite(...)`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-finite\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-finite` rule module.\n */\nexport default preferTsExtrasIsFiniteRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-infinite`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueArgumentFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServicesOrUndefined,\n    isGlobalIdentifierNamed,\n} from \"../_internal/typed-rule.js\";\nimport { createTypeScriptEslintNodeExpressionSkipChecker } from \"../_internal/typescript-eslint-node-autofix.js\";\n\n/**\n * Parsed infinity comparison extracted from a binary expression.\n */\ntype InfinityComparison = Readonly<{\n    comparedExpression: TSESTree.Expression;\n    kind: InfinityKind;\n    operator: \"==\" | \"===\";\n}>;\n\n/**\n * Infinity polarity represented by a reference expression.\n */\ntype InfinityKind = \"negative\" | \"positive\";\n\n/**\n * Concrete rule context type derived from `createTypedRule`.\n */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Classifies an expression as positive or negative infinity.\n *\n * @param context - Rule context used to validate global `Infinity`/`Number`\n *   bindings.\n * @param node - Expression to inspect.\n *\n * @returns The infinity kind when the expression is a supported infinity\n *   reference; otherwise `null`.\n */\nconst extractInfinityKind = (\n    context: RuleContext,\n    node: Readonly<TSESTree.Expression>\n): InfinityKind | null => {\n    if (isGlobalIdentifierNamed(context, node, \"Infinity\")) {\n        return \"positive\";\n    }\n\n    if (\n        node.type !== AST_NODE_TYPES.MemberExpression ||\n        node.computed ||\n        node.object.type !== AST_NODE_TYPES.Identifier ||\n        node.object.name !== \"Number\" ||\n        !isGlobalIdentifierNamed(context, node.object, \"Number\") ||\n        node.property.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return null;\n    }\n\n    if (node.property.name === \"POSITIVE_INFINITY\") {\n        return \"positive\";\n    }\n\n    if (node.property.name === \"NEGATIVE_INFINITY\") {\n        return \"negative\";\n    }\n\n    return null;\n};\n\n/**\n * Extracts a comparison where exactly one side references infinity.\n *\n * @param context - Rule context used to resolve global identifiers.\n * @param expression - Expression candidate.\n *\n * @returns Normalized comparison data when the expression matches value ===\n *   Infinity style checks; otherwise null.\n */\nconst extractInfinityComparison = (\n    context: RuleContext,\n    expression: Readonly<TSESTree.Expression>\n): InfinityComparison | null => {\n    if (\n        expression.type !== AST_NODE_TYPES.BinaryExpression ||\n        (expression.operator !== \"==\" && expression.operator !== \"===\")\n    ) {\n        return null;\n    }\n\n    const leftKind = extractInfinityKind(context, expression.left);\n    const rightKind = extractInfinityKind(context, expression.right);\n\n    if (leftKind && !rightKind) {\n        return {\n            comparedExpression: expression.right,\n            kind: leftKind,\n            operator: expression.operator,\n        };\n    }\n\n    if (!leftKind && rightKind) {\n        return {\n            comparedExpression: expression.left,\n            kind: rightKind,\n            operator: expression.operator,\n        };\n    }\n\n    return null;\n};\n\n/**\n * Extracts the shared target from strict disjunction checks against both\n * positive and negative infinity.\n *\n * @param context - Rule context used during infinity comparison extraction.\n * @param node - Logical expression candidate.\n *\n * @returns The compared expression from value === Infinity || value ===\n *   Number.NEGATIVE_INFINITY style patterns; otherwise null.\n */\nconst extractSafeInfinityDisjunctionTarget = (\n    context: RuleContext,\n    node: Readonly<TSESTree.LogicalExpression>\n): null | TSESTree.Expression => {\n    if (node.operator !== \"||\") {\n        return null;\n    }\n\n    const left = extractInfinityComparison(context, node.left);\n    const right = extractInfinityComparison(context, node.right);\n\n    if (!left || !right) {\n        return null;\n    }\n\n    if (left.operator !== \"===\" || right.operator !== \"===\") {\n        return null;\n    }\n\n    if (left.kind === right.kind) {\n        return null;\n    }\n\n    return areEquivalentExpressions(\n        left.comparedExpression,\n        right.comparedExpression\n    )\n        ? left.comparedExpression\n        : null;\n};\n\n/** Rule module definition for `prefer-ts-extras-is-infinite`. */\nconst preferTsExtrasIsInfiniteRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n            const typedServices = getTypedRuleServicesOrUndefined(context);\n            const shouldSkipComparedExpression =\n                createTypeScriptEslintNodeExpressionSkipChecker(\n                    context,\n                    typedServices\n                );\n\n            return {\n                BinaryExpression(node) {\n                    const parent = node.parent;\n                    if (\n                        parent.type === AST_NODE_TYPES.LogicalExpression &&\n                        extractSafeInfinityDisjunctionTarget(context, parent)\n                    ) {\n                        return;\n                    }\n\n                    if (node.operator !== \"==\" && node.operator !== \"===\") {\n                        return;\n                    }\n\n                    if (\n                        extractInfinityKind(context, node.left) === null &&\n                        extractInfinityKind(context, node.right) === null\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferTsExtrasIsInfinite\",\n                        node,\n                    });\n                },\n                LogicalExpression(node) {\n                    const comparedExpression =\n                        extractSafeInfinityDisjunctionTarget(context, node);\n\n                    if (!comparedExpression) {\n                        return;\n                    }\n\n                    if (shouldSkipComparedExpression(comparedExpression)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createSafeValueArgumentFunctionCallFix({\n                            argumentNode: comparedExpression,\n                            context,\n                            importedName: \"isInfinite\",\n                            imports: tsExtrasImports,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        }),\n                        messageId: \"preferTsExtrasIsInfinite\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isInfinite over direct Infinity equality checks for consistent predicate helper usage.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-infinite\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsInfinite:\n                    \"Prefer `isInfinite` from `ts-extras` over direct Infinity equality checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-infinite\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-infinite` rule module.\n */\nexport default preferTsExtrasIsInfiniteRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-integer`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-integer`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsIntegerRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Number\"][callee.property.type=\"Identifier\"][callee.property.name=\"isInteger\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"isInteger\",\n                        imports: tsExtrasImports,\n                        memberName: \"isInteger\",\n                        messageId: \"preferTsExtrasIsInteger\",\n                        node,\n                        objectName: \"Number\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isInteger over Number.isInteger for consistent predicate helper usage.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-integer\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsInteger:\n                    \"Prefer `isInteger` from `ts-extras` over `Number.isInteger(...)`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-integer\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-integer` rule module.\n */\nexport default preferTsExtrasIsIntegerRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-present-filter`.\n */\nimport { getSingleParameterExpressionArrowFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueReferenceReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport {\n    flattenLogicalTerms,\n    getNullishComparison,\n    isExpressionPair,\n} from \"../_internal/nullish-comparison.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * Normalized metadata for one nullish inequality comparison part.\n */\ninterface NullishInequalityPart {\n    readonly expression: TSESTree.Expression;\n    readonly kind: \"null\" | \"undefined\";\n    readonly operator: \"!=\" | \"!==\";\n}\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\nconst nullishInequalityOperators = [\"!=\", \"!==\"] as const;\n\n/**\n * Extract one nullish inequality comparison part from an expression.\n *\n * @param context - Active rule context for global-binding checks.\n * @param expression - Expression to inspect.\n * @param parameterName - Callback parameter name.\n *\n * @returns Comparison metadata when matched; otherwise `null`.\n */\nconst extractNullishInequalityPart = (\n    context: RuleContext,\n    expression: Readonly<TSESTree.Expression>,\n    parameterName: string\n): null | NullishInequalityPart => {\n    const comparison = getNullishComparison({\n        allowedOperators: nullishInequalityOperators,\n        allowTypeofComparedIdentifierForUndefined: true,\n        comparedIdentifierName: parameterName,\n        expression,\n        isGlobalUndefinedIdentifier: (candidateExpression) =>\n            isGlobalUndefinedIdentifier(context, candidateExpression),\n    });\n\n    if (!comparison) {\n        return null;\n    }\n\n    if (comparison.operator !== \"!=\" && comparison.operator !== \"!==\") {\n        return null;\n    }\n\n    return {\n        expression: comparison.comparedExpression,\n        kind: comparison.kind,\n        operator: comparison.operator,\n    };\n};\n\n/**\n * Check whether an expression contains a supported null-inequality comparison\n * part for the callback parameter.\n *\n * @param context - Active rule context for global-binding checks.\n * @param node - Expression to inspect.\n * @param parameterName - Callback parameter name.\n *\n * @returns `true` when the expression represents a null comparison.\n */\nconst isNullComparison = (\n    context: RuleContext,\n    node: Readonly<TSESTree.Expression>,\n    parameterName: string\n): node is TSESTree.BinaryExpression => {\n    const comparison = extractNullishInequalityPart(\n        context,\n        node,\n        parameterName\n    );\n\n    return comparison?.kind === \"null\";\n};\n\n/**\n * Check whether an expression contains a supported undefined-inequality\n * comparison part for the callback parameter.\n *\n * @param context - Active rule context for global-binding checks.\n * @param node - Expression to inspect.\n * @param parameterName - Callback parameter name.\n *\n * @returns `true` when the expression represents an undefined comparison.\n */\nconst isUndefinedComparison = (\n    context: RuleContext,\n    node: Readonly<TSESTree.Expression>,\n    parameterName: string\n): node is TSESTree.BinaryExpression => {\n    const comparison = extractNullishInequalityPart(\n        context,\n        node,\n        parameterName\n    );\n\n    return comparison?.kind === \"undefined\";\n};\n\n/**\n * Check whether a filter callback body is a supported nullish guard pattern.\n *\n * @param context - Active rule context for global-binding checks.\n * @param callback - Arrow callback to inspect.\n * @param parameterName - Callback parameter name.\n *\n * @returns `true` when the callback can be replaced by `isPresent` (with\n *   possible suggestion fallback based on strictness of operators).\n */\nconst isNullishFilterGuardBody = (\n    context: RuleContext,\n    callback: Readonly<\n        TSESTree.ArrowFunctionExpression & { body: TSESTree.Expression }\n    >,\n    parameterName: string\n): boolean => {\n    const { body } = callback;\n\n    if (\n        isNullComparison(context, body, parameterName) ||\n        isUndefinedComparison(context, body, parameterName)\n    ) {\n        if (body.operator === \"!=\") {\n            return true;\n        }\n\n        return (\n            callback.returnType?.typeAnnotation.type ===\n            AST_NODE_TYPES.TSTypePredicate\n        );\n    }\n\n    const andTerms = flattenLogicalTerms({\n        expression: body,\n        operator: \"&&\",\n    });\n\n    let hasNullComparison = false;\n    let hasUndefinedComparison = false;\n\n    for (const term of andTerms) {\n        const comparison = extractNullishInequalityPart(\n            context,\n            term,\n            parameterName\n        );\n\n        if (comparison) {\n            if (comparison.kind === \"null\") {\n                hasNullComparison = true;\n            }\n\n            if (comparison.kind === \"undefined\") {\n                hasUndefinedComparison = true;\n            }\n\n            if (hasNullComparison && hasUndefinedComparison) {\n                return true;\n            }\n        }\n    }\n\n    return hasNullComparison && hasUndefinedComparison;\n};\n\n/**\n * Check whether the callback is safe to auto-fix directly to `isPresent`.\n *\n * @param callback - Arrow callback to inspect.\n * @param context - Active rule context for global-binding checks.\n * @param parameterName - Callback parameter name.\n *\n * @returns `true` when the callback is safely auto-fixable; otherwise `false`.\n */\nconst isSafePresentFilterAutoFixableCallback = ({\n    callback,\n    context,\n    parameterName,\n}: Readonly<{\n    callback: TSESTree.ArrowFunctionExpression & { body: TSESTree.Expression };\n    context: RuleContext;\n    parameterName: string;\n}>): boolean => {\n    const { body } = callback;\n\n    const singlePart = extractNullishInequalityPart(\n        context,\n        body,\n        parameterName\n    );\n    if (singlePart?.operator === \"!=\") {\n        return true;\n    }\n\n    if (body.type !== AST_NODE_TYPES.LogicalExpression) {\n        return false;\n    }\n\n    /* v8 ignore start */\n    if (body.operator !== \"&&\") {\n        return false;\n    }\n    /* v8 ignore stop */\n\n    const andTerms = flattenLogicalTerms({\n        expression: body,\n        operator: \"&&\",\n    });\n    if (!isExpressionPair(andTerms)) {\n        return false;\n    }\n\n    const [firstTerm, secondTerm] = andTerms;\n\n    const first = extractNullishInequalityPart(\n        context,\n        firstTerm,\n        parameterName\n    );\n    const second = extractNullishInequalityPart(\n        context,\n        secondTerm,\n        parameterName\n    );\n\n    if (first?.operator !== \"!==\" || second?.operator !== \"!==\") {\n        return false;\n    }\n\n    return areEquivalentExpressions(first.expression, second.expression);\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-present-filter`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsPresentFilterRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.property.type=\"Identifier\"][callee.property.name=\"filter\"]'(\n                    node\n                ) {\n                    const callbackMatch =\n                        getSingleParameterExpressionArrowFilterCallback(node);\n                    if (!callbackMatch) {\n                        return;\n                    }\n\n                    const { callback: expressionCallback, parameter } =\n                        callbackMatch;\n\n                    if (\n                        !isNullishFilterGuardBody(\n                            context,\n                            expressionCallback,\n                            parameter.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const isAutoFixable =\n                        isSafePresentFilterAutoFixableCallback({\n                            callback: expressionCallback,\n                            context,\n                            parameterName: parameter.name,\n                        });\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: isAutoFixable\n                            ? createSafeValueReferenceReplacementFix({\n                                  context,\n                                  importedName: \"isPresent\",\n                                  imports: tsExtrasImports,\n                                  sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                                  targetNode: expressionCallback,\n                              })\n                            : null,\n                        messageId: \"preferTsExtrasIsPresentFilter\",\n                        node: expressionCallback,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isPresent in Array.filter callbacks instead of inline nullish checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present-filter\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsPresentFilter:\n                    \"Prefer `isPresent` from `ts-extras` in `filter(...)` callbacks over inline nullish comparisons.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-present-filter\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-present-filter` rule module.\n */\nexport default preferTsExtrasIsPresentFilterRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-present`.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isWithinFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueArgumentFunctionCallFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport {\n    flattenLogicalTerms,\n    getNullishComparison as getSharedNullishComparison,\n    isExpressionPair,\n} from \"../_internal/nullish-comparison.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isTypePredicateExpressionAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServicesOrUndefined,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\nimport { createTypeScriptEslintNodeExpressionSkipChecker } from \"../_internal/typescript-eslint-node-autofix.js\";\n\n/**\n * Concrete rule context type derived from `createTypedRule`.\n */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Adapter for shared nullish comparison parsing with this rule's context.\n */\nconst getRuleNullishComparison = (\n    context: RuleContext,\n    expression: Readonly<TSESTree.Expression>\n): ReturnType<typeof getSharedNullishComparison> =>\n    getSharedNullishComparison({\n        expression,\n        isGlobalUndefinedIdentifier: (candidateExpression) =>\n            isGlobalUndefinedIdentifier(context, candidateExpression),\n    });\n\n/**\n * Checks whether two expressions are syntactically equivalent targets.\n *\n * @param options - Pair of expressions to compare.\n *\n * @returns `true` when both expressions resolve to the same normalized text.\n */\n\nconst haveSameComparedExpression = ({\n    first,\n    second,\n}: Readonly<{\n    first: TSESTree.Expression;\n    second: TSESTree.Expression;\n}>): boolean => areEquivalentExpressions(first, second);\n\n/**\n * Detects the strict two-term present check pattern: value !== null && value\n * !== undefined.\n *\n * @param options - Context plus logical expression to inspect.\n *\n * @returns `true` when the logical expression is a strict present check.\n */\n\nconst isStrictPresentCheck = ({\n    context,\n    expression,\n}: Readonly<{\n    context: RuleContext;\n    expression: TSESTree.LogicalExpression;\n}>): boolean => {\n    if (expression.operator !== \"&&\") {\n        return false;\n    }\n\n    const terms = flattenLogicalTerms({\n        expression,\n        operator: \"&&\",\n    });\n\n    if (!isExpressionPair(terms)) {\n        return false;\n    }\n\n    const [firstTerm, secondTerm] = terms;\n\n    const first = getRuleNullishComparison(context, firstTerm);\n    const second = getRuleNullishComparison(context, secondTerm);\n\n    if (!first || !second) {\n        return false;\n    }\n\n    if (first.operator !== \"!==\" || second.operator !== \"!==\") {\n        return false;\n    }\n\n    if (first.kind === second.kind) {\n        return false;\n    }\n\n    return haveSameComparedExpression({\n        first: first.comparedExpression,\n        second: second.comparedExpression,\n    });\n};\n\n/**\n * Detects the strict two-term absent check pattern: value === null || value ===\n * undefined.\n *\n * @param options - Context plus logical expression to inspect.\n *\n * @returns `true` when the logical expression is a strict absent check.\n */\n\nconst isStrictAbsentCheck = ({\n    context,\n    expression,\n}: Readonly<{\n    context: RuleContext;\n    expression: TSESTree.LogicalExpression;\n}>): boolean => {\n    if (expression.operator !== \"||\") {\n        return false;\n    }\n\n    const terms = flattenLogicalTerms({\n        expression,\n        operator: \"||\",\n    });\n\n    if (!isExpressionPair(terms)) {\n        return false;\n    }\n\n    const [firstTerm, secondTerm] = terms;\n\n    const first = getRuleNullishComparison(context, firstTerm);\n    const second = getRuleNullishComparison(context, secondTerm);\n\n    if (!first || !second) {\n        return false;\n    }\n\n    if (first.operator !== \"===\" || second.operator !== \"===\") {\n        return false;\n    }\n\n    if (first.kind === second.kind) {\n        return false;\n    }\n\n    return haveSameComparedExpression({\n        first: first.comparedExpression,\n        second: second.comparedExpression,\n    });\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-present`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsPresentRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n            const typedServices = getTypedRuleServicesOrUndefined(context);\n            const shouldSkipComparedExpression =\n                createTypeScriptEslintNodeExpressionSkipChecker(\n                    context,\n                    typedServices\n                );\n\n            return {\n                BinaryExpression(node) {\n                    if (isWithinFilterCallback(node)) {\n                        return;\n                    }\n\n                    const comparison = getRuleNullishComparison(context, node);\n                    if (comparison?.kind !== \"null\") {\n                        return;\n                    }\n\n                    if (\n                        shouldSkipComparedExpression(\n                            comparison.comparedExpression\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const canAutofix =\n                        isTypePredicateExpressionAutofixSafe(node);\n\n                    if (comparison.operator === \"!=\") {\n                        reportWithOptionalFix({\n                            context,\n                            fix: canAutofix\n                                ? createSafeValueArgumentFunctionCallFix({\n                                      argumentNode:\n                                          comparison.comparedExpression,\n                                      context,\n                                      importedName: \"isPresent\",\n                                      imports: tsExtrasImports,\n                                      sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                                      targetNode: node,\n                                  })\n                                : null,\n                            messageId: \"preferTsExtrasIsPresent\",\n                            node,\n                        });\n                    }\n\n                    if (comparison.operator === \"==\") {\n                        reportWithOptionalFix({\n                            context,\n                            fix: canAutofix\n                                ? createSafeValueArgumentFunctionCallFix({\n                                      argumentNode:\n                                          comparison.comparedExpression,\n                                      context,\n                                      importedName: \"isPresent\",\n                                      imports: tsExtrasImports,\n                                      negated: true,\n                                      sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                                      targetNode: node,\n                                  })\n                                : null,\n                            messageId: \"preferTsExtrasIsPresentNegated\",\n                            node,\n                        });\n                    }\n                },\n                LogicalExpression(node) {\n                    if (isWithinFilterCallback(node)) {\n                        return;\n                    }\n\n                    if (\n                        isStrictPresentCheck({\n                            context,\n                            expression: node,\n                        })\n                    ) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasIsPresent\",\n                            node,\n                        });\n                        return;\n                    }\n\n                    if (\n                        isStrictAbsentCheck({\n                            context,\n                            expression: node,\n                        })\n                    ) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferTsExtrasIsPresentNegated\",\n                            node,\n                        });\n                    }\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isPresent over inline nullish comparisons outside filter callbacks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-present\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsPresent:\n                    \"Prefer `isPresent(value)` from `ts-extras` over inline nullish comparisons.\",\n                preferTsExtrasIsPresentNegated:\n                    \"Prefer `!isPresent(value)` from `ts-extras` over inline nullish comparisons.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-present\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-present` rule module.\n */\nexport default preferTsExtrasIsPresentRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-property-defined`.\n */\nimport { getSingleParameterExpressionArrowFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    isGlobalUndefinedIdentifier,\n} from \"../_internal/typed-rule.js\";\n\n/** Concrete rule context type inferred from `createTypedRule`. */\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Extract the property name from a `typeof param.prop !== \"undefined\"` (or\n * reversed) check, returning `null` when the shape does not match.\n *\n * @param typeofSide - Expected `typeof` unary expression side.\n * @param stringSide - Expected `\"undefined\"` string literal side.\n * @param operator - Binary expression operator.\n * @param paramName - Expected parameter identifier name.\n *\n * @returns Property name when matched; otherwise `null`.\n */\nconst extractTypeofPropertyDefinedCheck = (\n    typeofSide: Readonly<TSESTree.Expression>,\n    stringSide: Readonly<TSESTree.Expression>,\n    operator: string,\n    paramName: string\n): null | string => {\n    // Typeof checks are always strict\n    if (operator !== \"!==\") {\n        return null;\n    }\n\n    if (\n        typeofSide.type !== AST_NODE_TYPES.UnaryExpression ||\n        typeofSide.operator !== \"typeof\"\n    ) {\n        return null;\n    }\n\n    const { argument } = typeofSide;\n\n    if (\n        argument.type !== AST_NODE_TYPES.MemberExpression ||\n        argument.computed ||\n        argument.object.type !== AST_NODE_TYPES.Identifier ||\n        argument.object.name !== paramName ||\n        argument.property.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return null;\n    }\n\n    if (\n        stringSide.type !== AST_NODE_TYPES.Literal ||\n        stringSide.value !== \"undefined\"\n    ) {\n        return null;\n    }\n\n    return argument.property.name;\n};\n\n/**\n * Determine whether an arrow-callback body is a supported property-undefined\n * guard and, when matched, return the accessed property name.\n *\n * Recognized patterns:\n *\n * - `param.prop !== undefined`\n * - `undefined !== param.prop`\n * - `param.prop != undefined`\n * - `undefined != param.prop`\n * - `typeof param.prop !== \"undefined\"`\n * - `\"undefined\" !== typeof param.prop`\n *\n * @param context - Active rule context for global-binding checks.\n * @param body - Callback body expression to inspect.\n * @param paramName - Callback parameter identifier name.\n *\n * @returns Property name when the body is a supported guard; otherwise `null`.\n */\nconst extractPropertyDefinedGuardBody = (\n    context: RuleContext,\n    body: Readonly<TSESTree.Expression>,\n    paramName: string\n): null | string => {\n    if (body.type !== AST_NODE_TYPES.BinaryExpression) {\n        return null;\n    }\n\n    const { left, operator, right } = body;\n\n    if (operator !== \"!==\" && operator !== \"!=\") {\n        return null;\n    }\n\n    // Typeof form: `typeof param.prop !== \"undefined\"` or reversed\n    const typeofLeftResult = extractTypeofPropertyDefinedCheck(\n        left,\n        right,\n        operator,\n        paramName\n    );\n    if (typeofLeftResult !== null) {\n        return typeofLeftResult;\n    }\n\n    const typeofRightResult = extractTypeofPropertyDefinedCheck(\n        right,\n        left,\n        operator,\n        paramName\n    );\n    if (typeofRightResult !== null) {\n        return typeofRightResult;\n    }\n\n    // Standard binary: `param.prop !== undefined` or `undefined !== param.prop`\n    if (\n        left.type === AST_NODE_TYPES.MemberExpression &&\n        !left.computed &&\n        left.object.type === AST_NODE_TYPES.Identifier &&\n        left.object.name === paramName &&\n        left.property.type === AST_NODE_TYPES.Identifier &&\n        isGlobalUndefinedIdentifier(context, right)\n    ) {\n        return left.property.name;\n    }\n\n    if (\n        right.type === AST_NODE_TYPES.MemberExpression &&\n        !right.computed &&\n        right.object.type === AST_NODE_TYPES.Identifier &&\n        right.object.name === paramName &&\n        right.property.type === AST_NODE_TYPES.Identifier &&\n        isGlobalUndefinedIdentifier(context, left)\n    ) {\n        return right.property.name;\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-property-defined`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsPropertyDefinedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.property.type=\"Identifier\"][callee.property.name=\"filter\"]'(\n                    node\n                ) {\n                    const callbackMatch =\n                        getSingleParameterExpressionArrowFilterCallback(node);\n                    if (!callbackMatch) {\n                        return;\n                    }\n\n                    const { callback, parameter } = callbackMatch;\n\n                    const propName = extractPropertyDefinedGuardBody(\n                        context,\n                        callback.body,\n                        parameter.name\n                    );\n\n                    if (propName === null) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"isPropertyDefined\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (localName) =>\n                                `${localName}(${JSON.stringify(propName)})`,\n                            reportFixIntent: \"autofix\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: callback,\n                        }),\n                        messageId: \"preferTsExtrasIsPropertyDefined\",\n                        node: callback,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isPropertyDefined in Array.filter callbacks instead of inline property-undefined checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-property-defined\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsPropertyDefined:\n                    \"Prefer `isPropertyDefined` from `ts-extras` over an inline property-undefined filter callback.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-property-defined\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-property-defined` rule module.\n */\nexport default preferTsExtrasIsPropertyDefinedRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-property-present`.\n */\nimport { getSingleParameterExpressionArrowFilterCallback } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Determine whether an arrow-callback body is a supported property-nullish\n * guard and, when matched, return the accessed property name.\n *\n * Recognized patterns (loose equality against `null` catches both `null` and\n * `undefined`):\n *\n * - `param.prop != null`\n * - `null != param.prop`\n *\n * @param body - Callback body expression to inspect.\n * @param paramName - Callback parameter identifier name.\n *\n * @returns Property name when the body is a supported guard; otherwise `null`.\n */\nconst extractPropertyPresentGuardBody = (\n    body: Readonly<TSESTree.Expression>,\n    paramName: string\n): null | string => {\n    if (\n        body.type !== AST_NODE_TYPES.BinaryExpression ||\n        body.operator !== \"!=\"\n    ) {\n        return null;\n    }\n\n    const { left, right } = body;\n\n    // `param.prop != null`\n    if (\n        left.type === AST_NODE_TYPES.MemberExpression &&\n        !left.computed &&\n        left.object.type === AST_NODE_TYPES.Identifier &&\n        left.object.name === paramName &&\n        left.property.type === AST_NODE_TYPES.Identifier &&\n        right.type === AST_NODE_TYPES.Literal &&\n        right.value === null\n    ) {\n        return left.property.name;\n    }\n\n    // `null != param.prop`\n    if (\n        right.type === AST_NODE_TYPES.MemberExpression &&\n        !right.computed &&\n        right.object.type === AST_NODE_TYPES.Identifier &&\n        right.object.name === paramName &&\n        right.property.type === AST_NODE_TYPES.Identifier &&\n        left.type === AST_NODE_TYPES.Literal &&\n        left.value === null\n    ) {\n        return right.property.name;\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-property-present`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsPropertyPresentRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.property.type=\"Identifier\"][callee.property.name=\"filter\"]'(\n                    node\n                ) {\n                    const callbackMatch =\n                        getSingleParameterExpressionArrowFilterCallback(node);\n                    if (!callbackMatch) {\n                        return;\n                    }\n\n                    const { callback, parameter } = callbackMatch;\n\n                    const propName = extractPropertyPresentGuardBody(\n                        callback.body,\n                        parameter.name\n                    );\n\n                    if (propName === null) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"isPropertyPresent\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (localName) =>\n                                `${localName}(${JSON.stringify(propName)})`,\n                            reportFixIntent: \"autofix\",\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: callback,\n                        }),\n                        messageId: \"preferTsExtrasIsPropertyPresent\",\n                        node: callback,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isPropertyPresent in Array.filter callbacks instead of inline property-nullish checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-property-present\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsPropertyPresent:\n                    \"Prefer `isPropertyPresent` from `ts-extras` over an inline property-nullish filter callback.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-property-present\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-property-present` rule module.\n */\nexport default preferTsExtrasIsPropertyPresentRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-is-safe-integer`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-is-safe-integer`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasIsSafeIntegerRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Number\"][callee.property.type=\"Identifier\"][callee.property.name=\"isSafeInteger\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"isSafeInteger\",\n                        imports: tsExtrasImports,\n                        memberName: \"isSafeInteger\",\n                        messageId: \"preferTsExtrasIsSafeInteger\",\n                        node,\n                        objectName: \"Number\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras isSafeInteger over Number.isSafeInteger for consistent predicate helper usage.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-is-safe-integer\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasIsSafeInteger:\n                    \"Prefer `isSafeInteger` from `ts-extras` over `Number.isSafeInteger(...)`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-is-safe-integer\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-is-safe-integer` rule module.\n */\nexport default preferTsExtrasIsSafeIntegerRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-key-in`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { safeTypeOperation } from \"../_internal/safe-type-operation.js\";\nimport { getVariableInScopeChain } from \"../_internal/scope-variable.js\";\nimport { isTypePredicateExpressionAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\ntype RuleContext = Readonly<\n    Parameters<ReturnType<typeof createTypedRule>[\"create\"]>[0]\n>;\n\n/**\n * Determine whether a key expression can be safely reordered into `keyIn(...)`\n * argument position without changing side-effect semantics.\n */\nconst isAutofixSafeKeyExpression = (\n    context: RuleContext,\n    node: Readonly<TSESTree.Expression | TSESTree.PrivateIdentifier>\n): node is TSESTree.Expression => {\n    if (node.type === AST_NODE_TYPES.PrivateIdentifier) {\n        return false;\n    }\n\n    if (node.type === AST_NODE_TYPES.Identifier) {\n        const scopeResolutionResult = safeTypeOperation({\n            operation: () => {\n                const sourceScope = context.sourceCode.getScope(node);\n\n                return getVariableInScopeChain(sourceScope, node.name) !== null;\n            },\n            reason: \"key-in-autofix-key-scope-resolution-failed\",\n        });\n\n        if (!scopeResolutionResult.ok) {\n            return false;\n        }\n\n        return scopeResolutionResult.value;\n    }\n\n    if (node.type === AST_NODE_TYPES.Literal) {\n        return true;\n    }\n\n    if (node.type === AST_NODE_TYPES.TemplateLiteral) {\n        return node.expressions.length === 0;\n    }\n\n    if (\n        node.type === AST_NODE_TYPES.TSAsExpression ||\n        node.type === AST_NODE_TYPES.TSNonNullExpression ||\n        node.type === AST_NODE_TYPES.TSSatisfiesExpression ||\n        node.type === AST_NODE_TYPES.TSTypeAssertion\n    ) {\n        return isAutofixSafeKeyExpression(context, node.expression);\n    }\n\n    return false;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-key-in`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasKeyInRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            /**\n             * Build a safe fixer that rewrites `key in object` to\n             * `keyIn(object, key)` when key/object operand ordering is safe.\n             */\n            const createKeyInFix = (\n                node: Readonly<TSESTree.BinaryExpression>\n            ): null | TSESLint.ReportFixFunction => {\n                if (\n                    !isTypePredicateExpressionAutofixSafe(node) ||\n                    !isAutofixSafeKeyExpression(context, node.left)\n                ) {\n                    return null;\n                }\n\n                const keyText = getFunctionCallArgumentText({\n                    argumentNode: node.left,\n                    sourceCode: context.sourceCode,\n                });\n                const objectText = getFunctionCallArgumentText({\n                    argumentNode: node.right,\n                    sourceCode: context.sourceCode,\n                });\n\n                if (keyText === null || objectText === null) {\n                    return null;\n                }\n\n                return createSafeValueNodeTextReplacementFix({\n                    context,\n                    importedName: \"keyIn\",\n                    imports: tsExtrasImports,\n                    replacementTextFactory: (replacementName) =>\n                        `${replacementName}(${objectText}, ${keyText})`,\n                    sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                    targetNode: node,\n                });\n            };\n\n            return {\n                BinaryExpression(node) {\n                    if (node.operator !== \"in\") {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createKeyInFix(node),\n                        messageId: \"preferTsExtrasKeyIn\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras keyIn over `in` key checks for stronger narrowing.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-key-in\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasKeyIn:\n                    \"Prefer `keyIn` from `ts-extras` over `key in object` checks for stronger narrowing.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-key-in\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-key-in` rule module.\n */\nexport default preferTsExtrasKeyInRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-not`.\n */\nimport { getFilterCallbackFunctionArgument } from \"../_internal/filter-callback.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Checks whether a call argument refers to the callback parameter identifier.\n *\n * @param argument - Predicate call argument candidate.\n * @param parameterName - Callback parameter name expected by the rule.\n *\n * @returns `true` when the argument is the same identifier as the callback's\n *   sole parameter.\n */\n\nconst isTargetCallbackParameter = (\n    argument: Readonly<TSESTree.CallExpressionArgument>,\n    parameterName: string\n): boolean =>\n    argument.type === AST_NODE_TYPES.Identifier &&\n    argument.name === parameterName;\n\n/**\n * Extracts predicate calls from callbacks that negate a predicate call applied\n * to the callback parameter.\n *\n * @param callback - Filter callback candidate.\n *\n * @returns The inner predicate call when callback structure is compatible with\n *   `not(predicate)` replacement; otherwise `null`.\n */\n\nconst getNegatedPredicateCall = (\n    callback: Readonly<\n        TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n    >\n): null | TSESTree.CallExpression => {\n    if (callback.params.length !== 1) {\n        return null;\n    }\n\n    const [firstParameter] = callback.params;\n    if (firstParameter?.type !== AST_NODE_TYPES.Identifier) {\n        return null;\n    }\n\n    const callbackBody = callback.body;\n    if (\n        callbackBody.type !== AST_NODE_TYPES.UnaryExpression ||\n        callbackBody.operator !== \"!\" ||\n        callbackBody.argument.type !== AST_NODE_TYPES.CallExpression\n    ) {\n        return null;\n    }\n\n    const predicateCall = callbackBody.argument;\n    if (predicateCall.arguments.length !== 1) {\n        return null;\n    }\n\n    const [firstArgument] = predicateCall.arguments;\n    return firstArgument &&\n        isTargetCallbackParameter(firstArgument, firstParameter.name)\n        ? predicateCall\n        : null;\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-not`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasNotRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            /**\n             * Create a safe replacement fix that rewrites negated predicate\n             * callbacks into `not(predicate)`.\n             */\n            const createNotFilterCallbackFix = ({\n                callbackNode,\n                predicateCall,\n            }: Readonly<{\n                callbackNode:\n                    | TSESTree.ArrowFunctionExpression\n                    | TSESTree.FunctionExpression;\n                predicateCall: TSESTree.CallExpression;\n            }>): null | TSESLint.ReportFixFunction => {\n                if ((predicateCall.typeArguments?.params.length ?? 0) > 0) {\n                    return null;\n                }\n\n                if (\n                    predicateCall.optional ||\n                    predicateCall.callee.type !== AST_NODE_TYPES.Identifier\n                ) {\n                    return null;\n                }\n\n                const predicateText = context.sourceCode\n                    .getText(predicateCall.callee)\n                    .trim();\n\n                if (predicateText.length === 0) {\n                    return null;\n                }\n\n                return createSafeValueNodeTextReplacementFix({\n                    context,\n                    importedName: \"not\",\n                    imports: tsExtrasImports,\n                    replacementTextFactory: (replacementName) =>\n                        `${replacementName}(${predicateText})`,\n                    sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                    targetNode: callbackNode,\n                });\n            };\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.property.type=\"Identifier\"][callee.property.name=\"filter\"]'(\n                    node\n                ) {\n                    const callbackArgument =\n                        getFilterCallbackFunctionArgument(node);\n                    if (!callbackArgument) {\n                        return;\n                    }\n\n                    const negatedPredicateCall =\n                        getNegatedPredicateCall(callbackArgument);\n\n                    if (!negatedPredicateCall) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: createNotFilterCallbackFix({\n                            callbackNode: callbackArgument,\n                            predicateCall: negatedPredicateCall,\n                        }),\n                        messageId: \"preferTsExtrasNot\",\n                        node: callbackArgument,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras not helper over inline negated predicate callbacks in filter calls.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-not\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasNot:\n                    \"Prefer `not(<predicate>)` from `ts-extras` over inline `value => !predicate(value)` callbacks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-not\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-not` rule module.\n */\nexport default preferTsExtrasNotRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-entries`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-entries`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectEntriesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Object\"][callee.property.type=\"Identifier\"][callee.property.name=\"entries\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"objectEntries\",\n                        imports: tsExtrasImports,\n                        memberName: \"entries\",\n                        messageId: \"preferTsExtrasObjectEntries\",\n                        node,\n                        objectName: \"Object\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectEntries over Object.entries for stronger key/value inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-entries\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasObjectEntries:\n                    \"Prefer `objectEntries` from `ts-extras` over `Object.entries(...)` for stronger key and value inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-entries\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-entries` rule module.\n */\nexport default preferTsExtrasObjectEntriesRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-from-entries`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-from-entries`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectFromEntriesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Object\"][callee.property.type=\"Identifier\"][callee.property.name=\"fromEntries\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"objectFromEntries\",\n                        imports: tsExtrasImports,\n                        memberName: \"fromEntries\",\n                        messageId: \"preferTsExtrasObjectFromEntries\",\n                        node,\n                        objectName: \"Object\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectFromEntries over Object.fromEntries for stronger key/value inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-from-entries\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasObjectFromEntries:\n                    \"Prefer `objectFromEntries` from `ts-extras` over `Object.fromEntries(...)` for stronger key and value inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-from-entries\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-from-entries` rule module.\n */\nexport default preferTsExtrasObjectFromEntriesRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-has-in`.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithTypefestPolicy } from \"../_internal/rule-reporting.js\";\nimport { isTypePredicateExpressionAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-has-in`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectHasInRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Reflect\"][callee.property.type=\"Identifier\"][callee.property.name=\"has\"]'(\n                    node: TSESTree.CallExpression\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        canAutofix: isTypePredicateExpressionAutofixSafe,\n                        context,\n                        importedName: \"objectHasIn\",\n                        imports: tsExtrasImports,\n                        memberName: \"has\",\n                        messageId: \"preferTsExtrasObjectHasIn\",\n                        minimumArgumentCount: 2,\n                        node,\n                        objectName: \"Reflect\",\n                        reportSuggestion: ({ fix, node: suggestionNode }) => {\n                            reportWithTypefestPolicy({\n                                context,\n                                descriptor: {\n                                    messageId: \"preferTsExtrasObjectHasIn\",\n                                    node: suggestionNode,\n                                    suggest: [\n                                        {\n                                            fix,\n                                            messageId:\n                                                \"suggestTsExtrasObjectHasIn\",\n                                        },\n                                    ],\n                                },\n                            });\n                        },\n                        suggestionMessageId: \"suggestTsExtrasObjectHasIn\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectHasIn over Reflect.has for stronger key-in-object narrowing.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-in\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasObjectHasIn:\n                    \"Prefer `objectHasIn` from `ts-extras` over `Reflect.has` for better type narrowing.\",\n                suggestTsExtrasObjectHasIn:\n                    \"Replace this `Reflect.has(...)` call with `objectHasIn(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-has-in\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-has-in` rule module.\n */\nexport default preferTsExtrasObjectHasInRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-has-own`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithTypefestPolicy } from \"../_internal/rule-reporting.js\";\nimport { isTypePredicateExpressionAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-has-own`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectHasOwnRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Object\"][callee.property.type=\"Identifier\"][callee.property.name=\"hasOwn\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        canAutofix: isTypePredicateExpressionAutofixSafe,\n                        context,\n                        importedName: \"objectHasOwn\",\n                        imports: tsExtrasImports,\n                        memberName: \"hasOwn\",\n                        messageId: \"preferTsExtrasObjectHasOwn\",\n                        node,\n                        objectName: \"Object\",\n                        reportSuggestion: ({ fix, node: suggestionNode }) => {\n                            reportWithTypefestPolicy({\n                                context,\n                                descriptor: {\n                                    messageId: \"preferTsExtrasObjectHasOwn\",\n                                    node: suggestionNode,\n                                    suggest: [\n                                        {\n                                            fix,\n                                            messageId:\n                                                \"suggestTsExtrasObjectHasOwn\",\n                                        },\n                                    ],\n                                },\n                            });\n                        },\n                        suggestionMessageId: \"suggestTsExtrasObjectHasOwn\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectHasOwn over Object.hasOwn for own-property checks that should also narrow object types.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-has-own\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasObjectHasOwn:\n                    \"Prefer `objectHasOwn` from `ts-extras` over `Object.hasOwn` for own-property guards with stronger type narrowing.\",\n                suggestTsExtrasObjectHasOwn:\n                    \"Replace this `Object.hasOwn(...)` call with `objectHasOwn(...)` from `ts-extras`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-has-own\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-has-own` rule module.\n */\nexport default preferTsExtrasObjectHasOwnRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-keys`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-keys`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectKeysRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Object\"][callee.property.type=\"Identifier\"][callee.property.name=\"keys\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"objectKeys\",\n                        imports: tsExtrasImports,\n                        memberName: \"keys\",\n                        messageId: \"preferTsExtrasObjectKeys\",\n                        node,\n                        objectName: \"Object\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectKeys over Object.keys for stronger key inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-keys\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasObjectKeys:\n                    \"Prefer `objectKeys` from `ts-extras` over `Object.keys(...)` for stronger key inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-keys\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-keys` rule module.\n */\nexport default preferTsExtrasObjectKeysRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-map-values`.\n */\nimport {\n    collectDirectNamedValueImportsFromSource,\n    getSafeLocalNameForImportedValue,\n} from \"../_internal/imported-value-symbols.js\";\nimport { getIdentifierPropertyMemberCall } from \"../_internal/member-call.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentExpressions } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Extract the sole expression argument from a call expression.\n *\n * @param callExpression - Candidate call expression.\n *\n * @returns The single argument expression when present and non-spread;\n *   otherwise `null`.\n */\nconst getSingleExpressionArgument = (\n    callExpression: Readonly<TSESTree.CallExpression>\n): null | Readonly<TSESTree.Expression> => {\n    if (callExpression.arguments.length !== 1) {\n        return null;\n    }\n\n    const [argument] = callExpression.arguments;\n\n    if (!argument || argument.type === AST_NODE_TYPES.SpreadElement) {\n        return null;\n    }\n\n    return argument;\n};\n\n/**\n * Unwrap transparent TypeScript expression wrappers around an expression.\n *\n * @param expression - Candidate expression.\n *\n * @returns The innermost wrapped expression.\n */\nconst unwrapTransparentExpression = (\n    expression: Readonly<TSESTree.Expression>\n): Readonly<TSESTree.Expression> => {\n    let currentExpression = expression;\n\n    while (true) {\n        if (currentExpression.type === AST_NODE_TYPES.TSAsExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSNonNullExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSSatisfiesExpression) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        if (currentExpression.type === AST_NODE_TYPES.TSTypeAssertion) {\n            currentExpression = currentExpression.expression;\n            continue;\n        }\n\n        return currentExpression;\n    }\n};\n\n/**\n * Extract the returned expression from a supported arrow callback body.\n *\n * @param callback - Candidate arrow callback.\n *\n * @returns The returned expression when the callback body is an expression or a\n *   single `return` statement; otherwise `null`.\n */\nconst getReturnedExpression = (\n    callback: Readonly<TSESTree.ArrowFunctionExpression>\n): null | Readonly<TSESTree.Expression> => {\n    if (callback.body.type !== AST_NODE_TYPES.BlockStatement) {\n        return callback.body;\n    }\n\n    if (callback.body.body.length !== 1) {\n        return null;\n    }\n\n    const [statement] = callback.body.body;\n\n    if (statement?.type !== AST_NODE_TYPES.ReturnStatement) {\n        return null;\n    }\n\n    return statement.argument;\n};\n\n/**\n * Extract the first identifier from a strict `[key, value]` tuple parameter.\n *\n * @param parameter - Candidate callback parameter.\n *\n * @returns The key identifier when the parameter is a strict two-item array\n *   pattern of identifiers; otherwise `null`.\n */\nconst getKeyIdentifierFromEntriesTupleParameter = (\n    parameter: Readonly<TSESTree.Parameter>\n): null | Readonly<TSESTree.Identifier> => {\n    if (\n        parameter.type !== AST_NODE_TYPES.ArrayPattern ||\n        parameter.elements.length !== 2\n    ) {\n        return null;\n    }\n\n    const [firstElement, secondElement] = parameter.elements;\n\n    if (\n        firstElement?.type !== AST_NODE_TYPES.Identifier ||\n        secondElement?.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return null;\n    }\n\n    return firstElement;\n};\n\n/**\n * Check whether a callback returns a tuple that preserves the original key.\n *\n * @param returnedExpression - Returned callback expression.\n * @param keyIdentifier - Key identifier captured from `[key, value]`.\n *\n * @returns `true` when the callback returns `[key, mappedValue]`.\n */\nconst isKeyPreservingMappedTupleReturn = (\n    returnedExpression: Readonly<TSESTree.Expression>,\n    keyIdentifier: Readonly<TSESTree.Identifier>\n): boolean => {\n    const unwrappedExpression = unwrapTransparentExpression(returnedExpression);\n\n    if (\n        unwrappedExpression.type !== AST_NODE_TYPES.ArrayExpression ||\n        unwrappedExpression.elements.length !== 2\n    ) {\n        return false;\n    }\n\n    const [firstElement, secondElement] = unwrappedExpression.elements;\n\n    if (\n        !firstElement ||\n        !secondElement ||\n        firstElement.type === AST_NODE_TYPES.SpreadElement ||\n        secondElement.type === AST_NODE_TYPES.SpreadElement\n    ) {\n        return false;\n    }\n\n    return areEquivalentExpressions(firstElement, keyIdentifier);\n};\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-map-values`.\n *\n * @remarks\n * Defines metadata and diagnostics for the experimental `objectMapValues`\n * candidate migration.\n */\nconst preferTsExtrasObjectMapValuesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"Identifier\"]'(\n                    node: Readonly<TSESTree.CallExpression>\n                ) {\n                    if (\n                        node.optional ||\n                        node.callee.type !== AST_NODE_TYPES.Identifier\n                    ) {\n                        return;\n                    }\n\n                    const objectFromEntriesLocalName =\n                        getSafeLocalNameForImportedValue({\n                            context,\n                            importedName: \"objectFromEntries\",\n                            imports: tsExtrasImports,\n                            referenceNode: node,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                        });\n\n                    if (\n                        objectFromEntriesLocalName === null ||\n                        node.callee.name !== objectFromEntriesLocalName\n                    ) {\n                        return;\n                    }\n\n                    const mapCallExpression = getSingleExpressionArgument(node);\n\n                    if (\n                        mapCallExpression?.type !==\n                        AST_NODE_TYPES.CallExpression\n                    ) {\n                        return;\n                    }\n\n                    const mapMemberCall = getIdentifierPropertyMemberCall({\n                        memberName: \"map\",\n                        node: mapCallExpression,\n                    });\n\n                    if (mapMemberCall === null) {\n                        return;\n                    }\n\n                    const mapCallback =\n                        getSingleExpressionArgument(mapMemberCall);\n\n                    if (\n                        mapCallback?.type !==\n                        AST_NODE_TYPES.ArrowFunctionExpression\n                    ) {\n                        return;\n                    }\n\n                    const objectEntriesLocalName =\n                        getSafeLocalNameForImportedValue({\n                            context,\n                            importedName: \"objectEntries\",\n                            imports: tsExtrasImports,\n                            referenceNode: mapMemberCall,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                        });\n\n                    if (objectEntriesLocalName === null) {\n                        return;\n                    }\n\n                    const entriesCallExpression = mapMemberCall.callee.object;\n\n                    if (\n                        entriesCallExpression.type !==\n                            AST_NODE_TYPES.CallExpression ||\n                        entriesCallExpression.callee.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        entriesCallExpression.callee.name !==\n                            objectEntriesLocalName ||\n                        getSingleExpressionArgument(entriesCallExpression) ===\n                            null\n                    ) {\n                        return;\n                    }\n\n                    if (mapCallback.params.length !== 1) {\n                        return;\n                    }\n\n                    const [tupleParameter] = mapCallback.params;\n\n                    if (tupleParameter === undefined) {\n                        return;\n                    }\n\n                    const keyIdentifier =\n                        getKeyIdentifierFromEntriesTupleParameter(\n                            tupleParameter\n                        );\n\n                    if (keyIdentifier === null) {\n                        return;\n                    }\n\n                    const returnedExpression =\n                        getReturnedExpression(mapCallback);\n\n                    if (returnedExpression === null) {\n                        return;\n                    }\n\n                    if (\n                        !isKeyPreservingMappedTupleReturn(\n                            returnedExpression,\n                            keyIdentifier\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferTsExtrasObjectMapValues\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectMapValues over objectFromEntries(objectEntries(...).map(...)) chains that only remap values.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-map-values\",\n            },\n            messages: {\n                preferTsExtrasObjectMapValues:\n                    \"Prefer `objectMapValues` from `ts-extras` over `objectFromEntries(objectEntries(...).map(...))` when the map callback preserves keys and only remaps values.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-map-values\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-map-values` rule module.\n */\nexport default preferTsExtrasObjectMapValuesRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-object-values`.\n */\nimport { reportTsExtrasGlobalMemberCall } from \"../_internal/global-member-call-rule.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-ts-extras-object-values`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasObjectValuesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.object.type=\"Identifier\"][callee.object.name=\"Object\"][callee.property.type=\"Identifier\"][callee.property.name=\"values\"]'(\n                    node\n                ) {\n                    reportTsExtrasGlobalMemberCall({\n                        context,\n                        importedName: \"objectValues\",\n                        imports: tsExtrasImports,\n                        memberName: \"values\",\n                        messageId: \"preferTsExtrasObjectValues\",\n                        node,\n                        objectName: \"Object\",\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras objectValues over Object.values for stronger value inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-object-values\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasObjectValues:\n                    \"Prefer `objectValues` from `ts-extras` over `Object.values(...)` for stronger value inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-object-values\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-object-values` rule module.\n */\nexport default preferTsExtrasObjectValuesRule;\n", "import {\n    containsAllTypesByName,\n    isTypeAnyType,\n    isTypeNeverType,\n    isTypeUnknownType,\n} from \"@typescript-eslint/type-utils\";\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-safe-cast-to`.\n */\nimport { isDefined } from \"ts-extras\";\nimport ts from \"typescript\";\n\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport {\n    collectDirectNamedValueImportsFromSource,\n    createSafeValueNodeTextReplacementFix,\n    getFunctionCallArgumentText,\n} from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { safeTypeOperation } from \"../_internal/safe-type-operation.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n    isTypeAssignableTo,\n} from \"../_internal/typed-rule.js\";\n\n/**\n * Checks whether a type assertion target should be excluded from `safeCastTo`\n * suggestions.\n *\n * @param typeAnnotation - Asserted type annotation to inspect.\n *\n * @returns `true` for broad or intentionally unsafe targets (`any`, `unknown`,\n *   `never`, and `const` assertions) where replacement is not desirable.\n */\n\nconst isIgnoredTypeAnnotation = (\n    typeAnnotation: Readonly<TSESTree.TypeNode>\n): boolean =>\n    typeAnnotation.type === AST_NODE_TYPES.TSAnyKeyword ||\n    typeAnnotation.type === AST_NODE_TYPES.TSNeverKeyword ||\n    typeAnnotation.type === AST_NODE_TYPES.TSUnknownKeyword ||\n    (typeAnnotation.type === AST_NODE_TYPES.TSTypeReference &&\n        typeAnnotation.typeName.type === AST_NODE_TYPES.Identifier &&\n        typeAnnotation.typeName.name === \"const\");\n\nconst IGNORED_TARGET_TYPE_NAMES = new Set([\n    \"any\",\n    \"never\",\n    \"unknown\",\n]);\n\nconst resolvesToIgnoredTargetTypeName = (\n    targetType: Readonly<ts.Type>\n): boolean => {\n    const containsIgnoredTypeNameResult = safeTypeOperation({\n        operation: () =>\n            containsAllTypesByName(targetType, true, IGNORED_TARGET_TYPE_NAMES),\n        reason: \"safe-cast-to-ignored-target-name-check-failed\",\n    });\n\n    return (\n        containsIgnoredTypeNameResult.ok && containsIgnoredTypeNameResult.value\n    );\n};\n\n/**\n * Checks whether a resolved target type should be excluded from `safeCastTo`\n * suggestions.\n *\n * @param targetType - Resolved target type.\n *\n * @returns `true` for broad or intentionally unsafe targets (`any`, `unknown`,\n *   and `never`) including aliased forms.\n */\nconst isIgnoredTargetType = (targetType: Readonly<ts.Type>): boolean =>\n    isTypeAnyType(targetType) ||\n    isTypeNeverType(targetType) ||\n    isTypeUnknownType(targetType) ||\n    resolvesToIgnoredTargetTypeName(targetType);\n\n/**\n * ESLint rule definition for `prefer-ts-extras-safe-cast-to`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasSafeCastToRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n\n            /**\n             * Report assertions that can be replaced by `safeCastTo<T>(value)`\n             * without changing assignability behavior.\n             */\n            const reportIfSafeCastCandidate = ({\n                expression,\n                node,\n                typeAnnotation,\n            }: Readonly<{\n                expression: TSESTree.Expression;\n                node: TSESTree.Node;\n                typeAnnotation: TSESTree.TypeNode;\n            }>): void => {\n                if (isIgnoredTypeAnnotation(typeAnnotation)) {\n                    return;\n                }\n\n                const result = safeTypeOperation({\n                    operation: () => {\n                        const annotationTsNode =\n                            parserServices.esTreeNodeToTSNodeMap.get(\n                                typeAnnotation\n                            );\n\n                        if (!ts.isTypeNode(annotationTsNode)) {\n                            return null;\n                        }\n\n                        const sourceType =\n                            getConstrainedTypeAtLocationWithFallback(\n                                checker,\n                                expression,\n                                parserServices,\n                                \"safe-cast-to-source-type-resolution-failed\"\n                            );\n\n                        if (!isDefined(sourceType)) {\n                            return null;\n                        }\n\n                        const targetType =\n                            checker.getTypeFromTypeNode(annotationTsNode);\n\n                        if (isIgnoredTargetType(targetType)) {\n                            return null;\n                        }\n\n                        if (\n                            !isTypeAssignableTo(checker, sourceType, targetType)\n                        ) {\n                            return null;\n                        }\n\n                        const expressionArgumentText =\n                            getFunctionCallArgumentText({\n                                argumentNode: expression,\n                                sourceCode: context.sourceCode,\n                            });\n\n                        if (expressionArgumentText === null) {\n                            return null;\n                        }\n\n                        return createSafeValueNodeTextReplacementFix({\n                            context,\n                            importedName: \"safeCastTo\",\n                            imports: tsExtrasImports,\n                            replacementTextFactory: (replacementName) =>\n                                `${replacementName}<${context.sourceCode.getText(typeAnnotation)}>(${expressionArgumentText})`,\n                            sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n                            targetNode: node,\n                        });\n                    },\n                    reason: \"safe-cast-to-candidate-analysis-failed\",\n                });\n\n                if (!result.ok || result.value === null) {\n                    return;\n                }\n\n                reportWithOptionalFix({\n                    context,\n                    fix: result.value,\n                    messageId: \"preferTsExtrasSafeCastTo\",\n                    node,\n                });\n            };\n\n            return {\n                TSAsExpression(node) {\n                    reportIfSafeCastCandidate({\n                        expression: node.expression,\n                        node,\n                        typeAnnotation: node.typeAnnotation,\n                    });\n                },\n                TSTypeAssertion(node) {\n                    reportIfSafeCastCandidate({\n                        expression: node.expression,\n                        node,\n                        typeAnnotation: node.typeAnnotation,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras safeCastTo for assignable type assertions instead of direct `as` casts.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-safe-cast-to\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasSafeCastTo:\n                    \"Prefer `safeCastTo<T>(value)` from `ts-extras` over direct `as` assertions when the cast is already type-safe.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-safe-cast-to\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-safe-cast-to` rule module.\n */\nexport default preferTsExtrasSafeCastToRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-set-has`.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\nimport type { ArrayValues } from \"type-fest\";\n\nimport {\n    containsAllTypesByName,\n    getTypeName,\n    isBuiltinSymbolLike,\n    isTypeAnyType,\n    isTypeUnknownType,\n} from \"@typescript-eslint/type-utils\";\nimport { isDefined, isPresent } from \"ts-extras\";\nimport ts from \"typescript\";\n\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { getIdentifierPropertyMemberCall } from \"../_internal/member-call.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithTypefestPolicy } from \"../_internal/rule-reporting.js\";\nimport { safeTypeOperation } from \"../_internal/safe-type-operation.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport {\n    getTypeCheckerApparentType,\n    getTypeCheckerBaseTypes,\n} from \"../_internal/type-checker-compat.js\";\nimport { isTypePredicateAutofixSafe } from \"../_internal/type-predicate-autofix-safety.js\";\nimport { reportTsExtrasTypedMemberCall } from \"../_internal/typed-member-call-rule.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\nconst UNION_SET_MATCHING_MODE_ALL_BRANCHES = \"allBranches\";\nconst UNION_SET_MATCHING_MODE_ANY_BRANCH = \"anyBranch\";\nconst DEFAULT_UNION_SET_MATCHING_MODE = UNION_SET_MATCHING_MODE_ALL_BRANCHES;\nconst unionSetMatchingModeValues = [\n    UNION_SET_MATCHING_MODE_ALL_BRANCHES,\n    UNION_SET_MATCHING_MODE_ANY_BRANCH,\n] as const;\n\ntype PreferTsExtrasSetHasOption = Readonly<{\n    unionBranchMatchingMode?: UnionSetMatchingMode;\n}>;\n\ntype SetHasCallAnalysis = Readonly<{\n    canAutofix: boolean;\n    matchesDefaultUnionMode: boolean;\n}>;\n\ntype UnionSetMatchingMode = ArrayValues<typeof unionSetMatchingModeValues>;\n\nconst defaultOption = {\n    unionBranchMatchingMode: DEFAULT_UNION_SET_MATCHING_MODE,\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\nconst setTypeNameList = [\"ReadonlySet\", \"Set\"];\nconst setTypeNames = new Set(setTypeNameList);\n\n/**\n * ESLint rule definition for `prefer-ts-extras-set-has`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasSetHasRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<\n        readonly [PreferTsExtrasSetHasOption],\n        \"preferTsExtrasSetHas\" | \"suggestTsExtrasSetHas\"\n    >({\n        create(context, [options] = defaultOptions) {\n            const unionSetMatchingMode: UnionSetMatchingMode =\n                options.unionBranchMatchingMode ??\n                DEFAULT_UNION_SET_MATCHING_MODE;\n\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const program = parserServices.program;\n            const setTypeResolutionCaches: Readonly<\n                Record<UnionSetMatchingMode, Map<Readonly<ts.Type>, boolean>>\n            > = {\n                [UNION_SET_MATCHING_MODE_ALL_BRANCHES]: new Map<\n                    Readonly<ts.Type>,\n                    boolean\n                >(),\n                [UNION_SET_MATCHING_MODE_ANY_BRANCH]: new Map<\n                    Readonly<ts.Type>,\n                    boolean\n                >(),\n            };\n            const setLikeExpressionResolutionCache = new WeakMap<\n                Readonly<TSESTree.Expression>,\n                Partial<Record<UnionSetMatchingMode, boolean>>\n            >();\n            const setHasCallAnalysisCache = new WeakMap<\n                Readonly<TSESTree.CallExpression>,\n                SetHasCallAnalysis\n            >();\n\n            const hasClassOrInterfaceLikeDeclaration = (\n                candidateType: Readonly<ts.Type>\n            ): boolean => {\n                const declarations = candidateType.getSymbol()?.declarations;\n                if (!isDefined(declarations)) {\n                    return false;\n                }\n\n                return declarations.some(\n                    (declaration) =>\n                        declaration.kind === ts.SyntaxKind.ClassDeclaration ||\n                        declaration.kind === ts.SyntaxKind.InterfaceDeclaration\n                );\n            };\n\n            /**\n             * Determine whether a type resolves to `Set`/`ReadonlySet`,\n             * traversing unions, intersections, and apparent types.\n             */\n            const isSetType = (\n                type: Readonly<ts.Type>,\n                unionMatchingMode: UnionSetMatchingMode\n            ): boolean => {\n                const setTypeResolutionCache =\n                    setTypeResolutionCaches[unionMatchingMode];\n\n                const cachedRootResult = setTypeResolutionCache.get(type);\n                if (isDefined(cachedRootResult)) {\n                    return cachedRootResult;\n                }\n\n                const seenTypes = new Set<ts.Type>();\n\n                const cacheSetTypeResult = (\n                    candidateType: Readonly<ts.Type>,\n                    result: boolean\n                ): boolean => {\n                    setTypeResolutionCache.set(candidateType, result);\n\n                    return result;\n                };\n\n                const isSetTypeInternal = (\n                    candidateType: Readonly<ts.Type>\n                ): boolean => {\n                    const cachedResult =\n                        setTypeResolutionCache.get(candidateType);\n\n                    if (isDefined(cachedResult)) {\n                        return cachedResult;\n                    }\n\n                    if (setContainsValue(seenTypes, candidateType)) {\n                        return false;\n                    }\n\n                    seenTypes.add(candidateType);\n\n                    if (candidateType.isUnion()) {\n                        const isSetLike =\n                            unionMatchingMode ===\n                            UNION_SET_MATCHING_MODE_ALL_BRANCHES\n                                ? candidateType.types.every((partType) =>\n                                      isSetTypeInternal(partType)\n                                  )\n                                : candidateType.types.some((partType) =>\n                                      isSetTypeInternal(partType)\n                                  );\n\n                        return cacheSetTypeResult(candidateType, isSetLike);\n                    }\n\n                    if (candidateType.isIntersection()) {\n                        const isSetLike = candidateType.types.some((partType) =>\n                            isSetTypeInternal(partType)\n                        );\n\n                        return cacheSetTypeResult(candidateType, isSetLike);\n                    }\n\n                    if (\n                        isTypeAnyType(candidateType) ||\n                        isTypeUnknownType(candidateType)\n                    ) {\n                        return cacheSetTypeResult(candidateType, false);\n                    }\n\n                    const builtinSetLikeResult = safeTypeOperation({\n                        operation: () => {\n                            if (!isPresent(program)) {\n                                return false;\n                            }\n\n                            return isBuiltinSymbolLike(\n                                program,\n                                candidateType,\n                                setTypeNameList\n                            );\n                        },\n                        reason: \"set-has-builtin-symbol-analysis-failed\",\n                    });\n\n                    if (builtinSetLikeResult.ok && builtinSetLikeResult.value) {\n                        return cacheSetTypeResult(candidateType, true);\n                    }\n\n                    if (!isPresent(program)) {\n                        const candidateTypeNameResult = safeTypeOperation({\n                            operation: () =>\n                                getTypeName(checker, candidateType),\n                            reason: \"set-has-type-name-analysis-failed\",\n                        });\n\n                        const candidateTypeName = candidateTypeNameResult.ok\n                            ? candidateTypeNameResult.value\n                            : \"\";\n                        const candidateSymbolName = candidateType\n                            .getSymbol()\n                            ?.getName();\n\n                        if (\n                            candidateTypeName === \"ReadonlySet\" ||\n                            candidateTypeName === \"Set\" ||\n                            candidateSymbolName === \"ReadonlySet\" ||\n                            candidateSymbolName === \"Set\"\n                        ) {\n                            return cacheSetTypeResult(candidateType, true);\n                        }\n                    }\n\n                    const containsSetLikeResult = safeTypeOperation({\n                        operation: () =>\n                            isPresent(program)\n                                ? false\n                                : containsAllTypesByName(\n                                      candidateType,\n                                      true,\n                                      setTypeNames,\n                                      true\n                                  ),\n                        reason: \"set-has-contains-all-types-analysis-failed\",\n                    });\n\n                    if (\n                        containsSetLikeResult.ok &&\n                        containsSetLikeResult.value\n                    ) {\n                        return cacheSetTypeResult(candidateType, true);\n                    }\n\n                    const apparentType = getTypeCheckerApparentType(\n                        checker,\n                        candidateType\n                    );\n                    if (\n                        isDefined(apparentType) &&\n                        apparentType !== candidateType &&\n                        isSetTypeInternal(apparentType)\n                    ) {\n                        return cacheSetTypeResult(candidateType, true);\n                    }\n\n                    if (!hasClassOrInterfaceLikeDeclaration(candidateType)) {\n                        return cacheSetTypeResult(candidateType, false);\n                    }\n\n                    const baseTypesResult = safeTypeOperation({\n                        operation: () =>\n                            getTypeCheckerBaseTypes(checker, candidateType),\n                        reason: \"set-has-base-type-analysis-failed\",\n                    });\n\n                    if (!baseTypesResult.ok) {\n                        return cacheSetTypeResult(candidateType, false);\n                    }\n\n                    const baseTypes = baseTypesResult.value;\n\n                    const isSetLike =\n                        baseTypes?.some((baseType) =>\n                            isSetTypeInternal(baseType)\n                        ) ?? false;\n\n                    return cacheSetTypeResult(candidateType, isSetLike);\n                };\n\n                return isSetTypeInternal(type);\n            };\n\n            const isSetLikeExpression = (\n                expression: Readonly<TSESTree.Expression>,\n                unionMatchingMode: UnionSetMatchingMode\n            ): boolean => {\n                const cachedExpressionModes =\n                    setLikeExpressionResolutionCache.get(expression);\n                const cachedModeResult =\n                    cachedExpressionModes?.[unionMatchingMode];\n\n                if (isDefined(cachedModeResult)) {\n                    return cachedModeResult;\n                }\n\n                const result = safeTypeOperation({\n                    operation: () => {\n                        const objectType =\n                            getConstrainedTypeAtLocationWithFallback(\n                                checker,\n                                expression,\n                                parserServices,\n                                \"set-has-expression-type-resolution-failed\"\n                            );\n\n                        if (!isDefined(objectType)) {\n                            return false;\n                        }\n\n                        return isSetType(objectType, unionMatchingMode);\n                    },\n                    reason: \"set-has-type-analysis-failed\",\n                });\n\n                const isSetLike = result.ok && result.value;\n                const nextExpressionModes = {\n                    ...cachedExpressionModes,\n                    [unionMatchingMode]: isSetLike,\n                };\n\n                setLikeExpressionResolutionCache.set(\n                    expression,\n                    nextExpressionModes\n                );\n\n                return isSetLike;\n            };\n\n            const analyzeSetHasCall = (\n                node: Readonly<TSESTree.CallExpression>\n            ): SetHasCallAnalysis => {\n                const cachedAnalysis = setHasCallAnalysisCache.get(node);\n\n                if (isDefined(cachedAnalysis)) {\n                    return cachedAnalysis;\n                }\n\n                const receiverExpression = getIdentifierPropertyMemberCall({\n                    memberName: \"has\",\n                    node,\n                })?.callee.object;\n\n                if (!isDefined(receiverExpression)) {\n                    const notSetLikeAnalysis: SetHasCallAnalysis = {\n                        canAutofix: false,\n                        matchesDefaultUnionMode: false,\n                    };\n\n                    setHasCallAnalysisCache.set(node, notSetLikeAnalysis);\n\n                    return notSetLikeAnalysis;\n                }\n\n                const matchesConfiguredUnionMode = isSetLikeExpression(\n                    receiverExpression,\n                    unionSetMatchingMode\n                );\n                const matchesDefaultUnionMode =\n                    unionSetMatchingMode === DEFAULT_UNION_SET_MATCHING_MODE\n                        ? matchesConfiguredUnionMode\n                        : isSetLikeExpression(\n                              receiverExpression,\n                              DEFAULT_UNION_SET_MATCHING_MODE\n                          );\n\n                const analysis: SetHasCallAnalysis = {\n                    canAutofix:\n                        matchesDefaultUnionMode &&\n                        isTypePredicateAutofixSafe(node),\n                    matchesDefaultUnionMode,\n                };\n\n                setHasCallAnalysisCache.set(node, analysis);\n\n                return analysis;\n            };\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"has\"]'(\n                    node\n                ) {\n                    reportTsExtrasTypedMemberCall({\n                        canAutofix: (callNode) =>\n                            analyzeSetHasCall(callNode).canAutofix,\n                        context,\n                        importedName: \"setHas\",\n                        imports: tsExtrasImports,\n                        isMatchingObjectExpression: (expression) =>\n                            isSetLikeExpression(\n                                expression,\n                                unionSetMatchingMode\n                            ),\n                        memberName: \"has\",\n                        messageId: \"preferTsExtrasSetHas\",\n                        node,\n                        reportSuggestion: ({ fix, node: suggestionNode }) => {\n                            const callAnalysis =\n                                analyzeSetHasCall(suggestionNode);\n\n                            if (!callAnalysis.matchesDefaultUnionMode) {\n                                reportWithTypefestPolicy({\n                                    context,\n                                    descriptor: {\n                                        messageId: \"preferTsExtrasSetHas\",\n                                        node: suggestionNode,\n                                    },\n                                });\n\n                                return;\n                            }\n\n                            reportWithTypefestPolicy({\n                                context,\n                                descriptor: {\n                                    messageId: \"preferTsExtrasSetHas\",\n                                    node: suggestionNode,\n                                    suggest: [\n                                        {\n                                            fix,\n                                            messageId: \"suggestTsExtrasSetHas\",\n                                        },\n                                    ],\n                                },\n                            });\n                        },\n                        suggestionMessageId: \"suggestTsExtrasSetHas\",\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require direct ts-extras setHas over Set#has at membership call sites for stronger element narrowing.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.ts-extras/type-guards\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-set-has\",\n            },\n            fixable: \"code\",\n            hasSuggestions: true,\n            messages: {\n                preferTsExtrasSetHas:\n                    \"Prefer `setHas` from `ts-extras` over `set.has(...)` for stronger element narrowing.\",\n                suggestTsExtrasSetHas:\n                    \"Replace this `set.has(...)` call with `setHas(...)` from `ts-extras`.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for mixed-union matching in prefer-ts-extras-set-has.\",\n                    minProperties: 1,\n                    properties: {\n                        unionBranchMatchingMode: {\n                            description:\n                                \"How union-typed receivers are matched: allBranches requires every union branch to be Set-like, anyBranch reports when at least one branch is Set-like.\",\n                            enum: [...unionSetMatchingModeValues],\n                            type: \"string\",\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-set-has\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-set-has` rule module.\n */\nexport default preferTsExtrasSetHasRule;\n", "/**\n * @packageDocumentation\n * Shared reporting helper for typed ts-extras identifier-member call rules.\n */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport {\n    createMethodToFunctionCallFix,\n    type ImportedValueAliasMap,\n} from \"./imported-value-symbols.js\";\nimport { getIdentifierPropertyMemberCall } from \"./member-call.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"./module-source.js\";\nimport {\n    reportResolvedAutofixOrSuggestionOutcome,\n    resolveAutofixOrSuggestionOutcome,\n} from \"./rule-reporting.js\";\n\n/** Direct named value imports collection type from shared import helper. */\ntype DirectNamedValueImports = ImportedValueAliasMap;\n\n/** Typed rule context shape for typed member-call rules. */\ntype TypedMemberCallRuleContext<MessageId extends string> = Readonly<\n    TSESLint.RuleContext<MessageId, Readonly<UnknownArray>>\n>;\n\n/**\n * Match `<expr>.<memberName>(...)` and report a standardized ts-extras helper\n * replacement when the receiver expression satisfies a caller-provided type\n * predicate.\n */\nexport const reportTsExtrasTypedMemberCall = <MessageId extends string>({\n    canAutofix,\n    context,\n    importedName,\n    imports,\n    isMatchingObjectExpression,\n    memberName,\n    messageId,\n    node,\n    reportSuggestion,\n    suggestionMessageId,\n}: Readonly<{\n    canAutofix?: (node: Readonly<TSESTree.CallExpression>) => boolean;\n    context: TypedMemberCallRuleContext<MessageId>;\n    importedName: string;\n    imports: DirectNamedValueImports;\n    isMatchingObjectExpression: (\n        expression: Readonly<TSESTree.Expression>\n    ) => boolean;\n    memberName: string;\n    messageId: MessageId;\n    node: Readonly<TSESTree.CallExpression>;\n    reportSuggestion?: (\n        input: Readonly<{\n            fix: TSESLint.ReportFixFunction;\n            messageId: MessageId;\n            node: Readonly<TSESTree.CallExpression>;\n            suggestionMessageId: MessageId;\n        }>\n    ) => void;\n    suggestionMessageId?: MessageId;\n}>): void => {\n    const memberCall = getIdentifierPropertyMemberCall({\n        memberName,\n        node,\n    });\n\n    if (memberCall === null) {\n        return;\n    }\n\n    if (!isMatchingObjectExpression(memberCall.callee.object)) {\n        return;\n    }\n\n    const fix = createMethodToFunctionCallFix({\n        callNode: node,\n        context,\n        importedName,\n        imports,\n        sourceModuleName: TS_EXTRAS_MODULE_SOURCE,\n    });\n\n    const shouldAutofix = canAutofix?.(node) ?? true;\n\n    const outcome = resolveAutofixOrSuggestionOutcome({\n        canAutofix: shouldAutofix,\n        fix,\n    });\n\n    if (outcome.kind === \"suggestion\" && reportSuggestion !== undefined) {\n        reportSuggestion({\n            fix: outcome.fix,\n            messageId,\n            node,\n            suggestionMessageId: suggestionMessageId ?? messageId,\n        });\n\n        return;\n    }\n\n    reportResolvedAutofixOrSuggestionOutcome({\n        context,\n        messageId,\n        node,\n        outcome,\n        suggestionMessageId: suggestionMessageId ?? messageId,\n    });\n};\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-ts-extras-string-split`.\n */\nimport type ts from \"typescript\";\n\nimport {\n    containsAllTypesByName,\n    getTypeName,\n    isBuiltinSymbolLike,\n    isTypeAnyType,\n    isTypeUnknownType,\n} from \"@typescript-eslint/type-utils\";\nimport { isDefined, isPresent } from \"ts-extras\";\n\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport { memoizeExpressionBooleanPredicate } from \"../_internal/expression-boolean-memoizer.js\";\nimport { collectDirectNamedValueImportsFromSource } from \"../_internal/imported-value-symbols.js\";\nimport { TS_EXTRAS_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { safeTypeOperation } from \"../_internal/safe-type-operation.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport {\n    getTypeCheckerApparentType,\n    getTypeCheckerStringType,\n} from \"../_internal/type-checker-compat.js\";\nimport { reportTsExtrasTypedMemberCall } from \"../_internal/typed-member-call-rule.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n    isTypeAssignableTo,\n} from \"../_internal/typed-rule.js\";\n\nconst stringObjectTypeNames = new Set([\"String\"]);\n\n/**\n * ESLint rule definition for `prefer-ts-extras-string-split`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTsExtrasStringSplitRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const tsExtrasImports = collectDirectNamedValueImportsFromSource(\n                context.sourceCode,\n                TS_EXTRAS_MODULE_SOURCE\n            );\n\n            const { checker, parserServices } = getTypedRuleServices(context);\n            const program = parserServices.program;\n            const stringPrimitiveType = getTypeCheckerStringType(checker);\n            const stringTypeResolutionCache = new Map<\n                Readonly<ts.Type>,\n                boolean\n            >();\n\n            /**\n             * Determine whether a type behaves like a string, traversing\n             * unions/intersections and apparent types while guarding cycles.\n             */\n            const isStringLikeType = (\n                type: Readonly<ReturnType<typeof checker.getTypeAtLocation>>\n            ): boolean => {\n                const cachedRootResult = stringTypeResolutionCache.get(type);\n\n                if (isDefined(cachedRootResult)) {\n                    return cachedRootResult;\n                }\n\n                const seenTypes = new Set<ts.Type>();\n\n                const isStringLikeTypeInternal = (\n                    candidateType: Readonly<ts.Type>\n                ): boolean => {\n                    const cachedResult =\n                        stringTypeResolutionCache.get(candidateType);\n\n                    if (isDefined(cachedResult)) {\n                        return cachedResult;\n                    }\n\n                    if (setContainsValue(seenTypes, candidateType)) {\n                        return false;\n                    }\n\n                    seenTypes.add(candidateType);\n\n                    if (candidateType.isUnion()) {\n                        const isStringLike = candidateType.types.some(\n                            (partType) => isStringLikeTypeInternal(partType)\n                        );\n\n                        stringTypeResolutionCache.set(\n                            candidateType,\n                            isStringLike\n                        );\n\n                        return isStringLike;\n                    }\n\n                    if (candidateType.isIntersection()) {\n                        const isStringLike = candidateType.types.some(\n                            (partType) => isStringLikeTypeInternal(partType)\n                        );\n\n                        stringTypeResolutionCache.set(\n                            candidateType,\n                            isStringLike\n                        );\n\n                        return isStringLike;\n                    }\n\n                    if (\n                        isTypeAnyType(candidateType) ||\n                        isTypeUnknownType(candidateType)\n                    ) {\n                        stringTypeResolutionCache.set(candidateType, false);\n\n                        return false;\n                    }\n\n                    if (\n                        isDefined(stringPrimitiveType) &&\n                        isTypeAssignableTo(\n                            checker,\n                            candidateType,\n                            stringPrimitiveType\n                        )\n                    ) {\n                        stringTypeResolutionCache.set(candidateType, true);\n\n                        return true;\n                    }\n\n                    const builtinStringLikeResult = safeTypeOperation({\n                        operation: () => {\n                            if (!isPresent(program)) {\n                                return false;\n                            }\n\n                            return isBuiltinSymbolLike(\n                                program,\n                                candidateType,\n                                \"String\"\n                            );\n                        },\n                        reason: \"string-split-builtin-symbol-analysis-failed\",\n                    });\n\n                    if (\n                        builtinStringLikeResult.ok &&\n                        builtinStringLikeResult.value\n                    ) {\n                        stringTypeResolutionCache.set(candidateType, true);\n\n                        return true;\n                    }\n\n                    const shouldUseNameBasedFallback = !isPresent(program);\n\n                    if (shouldUseNameBasedFallback) {\n                        const candidateTypeNameResult = safeTypeOperation({\n                            operation: () =>\n                                getTypeName(checker, candidateType),\n                            reason: \"string-split-type-name-analysis-failed\",\n                        });\n\n                        if (\n                            candidateTypeNameResult.ok &&\n                            candidateTypeNameResult.value === \"String\"\n                        ) {\n                            stringTypeResolutionCache.set(candidateType, true);\n\n                            return true;\n                        }\n                    }\n\n                    const containsStringObjectLikeResult = safeTypeOperation({\n                        operation: () =>\n                            isPresent(program)\n                                ? false\n                                : containsAllTypesByName(\n                                      candidateType,\n                                      true,\n                                      stringObjectTypeNames,\n                                      true\n                                  ),\n                        reason: \"string-split-contains-all-types-analysis-failed\",\n                    });\n\n                    if (\n                        containsStringObjectLikeResult.ok &&\n                        containsStringObjectLikeResult.value\n                    ) {\n                        stringTypeResolutionCache.set(candidateType, true);\n\n                        return true;\n                    }\n\n                    const apparentType = getTypeCheckerApparentType(\n                        checker,\n                        candidateType\n                    );\n\n                    const isStringLike =\n                        !isDefined(apparentType) ||\n                        apparentType === candidateType\n                            ? false\n                            : isStringLikeTypeInternal(apparentType);\n\n                    stringTypeResolutionCache.set(candidateType, isStringLike);\n\n                    return isStringLike;\n                };\n\n                return isStringLikeTypeInternal(type);\n            };\n\n            const isStringLikeExpression = memoizeExpressionBooleanPredicate(\n                (expression): boolean => {\n                    const result = safeTypeOperation({\n                        operation: () => {\n                            const objectType =\n                                getConstrainedTypeAtLocationWithFallback(\n                                    checker,\n                                    expression,\n                                    parserServices,\n                                    \"string-split-expression-type-resolution-failed\"\n                                );\n\n                            if (!isDefined(objectType)) {\n                                return false;\n                            }\n\n                            return isStringLikeType(objectType);\n                        },\n                        reason: \"string-split-type-analysis-failed\",\n                    });\n\n                    return result.ok && result.value;\n                }\n            );\n\n            return {\n                'CallExpression[callee.type=\"MemberExpression\"][callee.computed=false][callee.property.type=\"Identifier\"][callee.property.name=\"split\"]'(\n                    node\n                ) {\n                    reportTsExtrasTypedMemberCall({\n                        context,\n                        importedName: \"stringSplit\",\n                        imports: tsExtrasImports,\n                        isMatchingObjectExpression: isStringLikeExpression,\n                        memberName: \"split\",\n                        messageId: \"preferTsExtrasStringSplit\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require ts-extras stringSplit over String#split for stronger tuple inference.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-ts-extras-string-split\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTsExtrasStringSplit:\n                    \"Prefer `stringSplit` from `ts-extras` over `string.split(...)` for stronger tuple inference.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-ts-extras-string-split\",\n    });\n\n/**\n * Default export for the `prefer-ts-extras-string-split` rule module.\n */\nexport default preferTsExtrasStringSplitRule;\n", "/**\n * @packageDocumentation\n * Shared helper for memoizing boolean expression predicates by ESTree node\n * identity.\n */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\n/**\n * Memoize a boolean expression predicate using a `WeakMap` keyed by expression\n * node identity.\n *\n * @param evaluate - Predicate to memoize.\n *\n * @returns Memoized predicate that reuses previous results for the same node\n *   object.\n */\nexport const memoizeExpressionBooleanPredicate = (\n    evaluate: (expression: Readonly<TSESTree.Expression>) => boolean\n): ((expression: Readonly<TSESTree.Expression>) => boolean) => {\n    const cache = new WeakMap<Readonly<TSESTree.Expression>, boolean>();\n\n    return (expression) => {\n        const cachedResult = cache.get(expression);\n\n        if (isDefined(cachedResult)) {\n            return cachedResult;\n        }\n\n        const result = evaluate(expression);\n\n        cache.set(expression, result);\n\n        return result;\n    };\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-absolute`.\n */\nimport { setHas } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Common alias names used for numeric absolute-value type utilities.\n */\nconst ABSOLUTE_ALIAS_NAMES: ReadonlySet<string> = new Set([\n    \"Abs\",\n    \"AbsoluteValue\",\n]);\n\n/**\n * ESLint rule definition for `prefer-type-fest-absolute`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestAbsoluteRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        !setHas(ABSOLUTE_ALIAS_NAMES, node.typeName.name)\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"Absolute\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: { aliasName: node.typeName.name },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferAbsolute\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest `Absolute` over common `Abs` or `AbsoluteValue` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-absolute\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferAbsolute:\n                    \"Prefer `Absolute` from type-fest over `{{aliasName}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-absolute\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-absolute` rule module.\n */\nexport default preferTypeFestAbsoluteRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-abstract-constructor`.\n */\nimport { arrayJoin, isDefined } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-abstract-constructor`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestAbstractConstructorRule: ReturnType<\n    typeof createTypedRule\n> = createTypedRule({\n    create(context) {\n        const typeFestDirectImports = collectDirectNamedImportsFromSource(\n            context.sourceCode,\n            TYPE_FEST_MODULE_SOURCE\n        );\n        const { sourceCode } = context;\n\n        return {\n            TSConstructorType(node) {\n                if (!node.abstract) {\n                    return;\n                }\n\n                const replacementFix =\n                    !isDefined(node.typeParameters) &&\n                    isDefined(node.returnType)\n                        ? createSafeTypeNodeTextReplacementFix(\n                              node,\n                              \"AbstractConstructor\",\n                              `AbstractConstructor<${sourceCode.getText(node.returnType.typeAnnotation)}, [${arrayJoin(\n                                  node.params.map((parameter) =>\n                                      sourceCode.getText(parameter)\n                                  ),\n                                  \", \"\n                              )}]>`,\n                              typeFestDirectImports\n                          )\n                        : null;\n\n                reportWithOptionalFix({\n                    context,\n                    fix: replacementFix,\n                    messageId: \"preferAbstractConstructorSignature\",\n                    node,\n                });\n            },\n        };\n    },\n    meta: {\n        docs: {\n            description:\n                \"require TypeFest AbstractConstructor over explicit `abstract new (...) => ...` signatures.\",\n            recommended: true,\n            requiresTypeChecking: false,\n            typefestConfigs: [\n                \"typefest.configs.recommended\",\n                \"typefest.configs.strict\",\n                \"typefest.configs.all\",\n                \"typefest.configs.type-fest/types\",\n            ],\n\n            url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-abstract-constructor\",\n        },\n        fixable: \"code\",\n        messages: {\n            preferAbstractConstructorSignature:\n                \"Prefer `AbstractConstructor<...>` from type-fest over explicit `abstract new (...) => ...` signatures.\",\n        },\n        schema: [],\n        type: \"suggestion\",\n    },\n    name: \"prefer-type-fest-abstract-constructor\",\n});\n\n/**\n * Default export for the `prefer-type-fest-abstract-constructor` rule module.\n */\nexport default preferTypeFestAbstractConstructorRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-and-all`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst ALL_EXTEND_TYPE_NAME = \"AllExtend\" as const;\nconst AND_ALL_TYPE_NAME = \"AndAll\" as const;\n\nconst isTrueLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === true;\n\n/**\n * ESLint rule definition for `prefer-type-fest-and-all`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestAndAllRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const allExtendLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                ALL_EXTEND_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const getAllExtendTupleArgumentText = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): null | string => {\n                const typeArguments = typeReference.typeArguments?.params ?? [];\n                const [tupleArgument, comparedType] = typeArguments;\n\n                if (\n                    !tupleArgument ||\n                    !comparedType ||\n                    !isTrueLiteralType(comparedType)\n                ) {\n                    return null;\n                }\n\n                if (typeArguments.length !== 2) {\n                    return null;\n                }\n\n                return context.sourceCode.getText(tupleArgument);\n            };\n\n            const reportIfAllExtendEquivalent = (\n                node: Readonly<TSESTree.TSTypeReference>\n            ): void => {\n                const tupleArgumentText = getAllExtendTupleArgumentText(node);\n\n                if (\n                    tupleArgumentText === null ||\n                    tupleArgumentText.trim().length === 0\n                ) {\n                    return;\n                }\n\n                const fix = createSafeTypeNodeTextReplacementFix(\n                    node,\n                    AND_ALL_TYPE_NAME,\n                    `${AND_ALL_TYPE_NAME}<${tupleArgumentText}>`,\n                    typeFestDirectImports\n                );\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferAndAll\",\n                    node,\n                });\n            };\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            allExtendLocalNames,\n                            typeReference.typeName.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportIfAllExtendEquivalent(typeReference);\n                },\n                'TSTypeReference[typeName.type=\"TSQualifiedName\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                        AST_NODE_TYPES.TSQualifiedName\n                    ) {\n                        return;\n                    }\n\n                    if (\n                        typeReference.typeName.left.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            typeFestNamespaceImportNames,\n                            typeReference.typeName.left.name\n                        ) ||\n                        typeReference.typeName.right.name !==\n                            ALL_EXTEND_TYPE_NAME\n                    ) {\n                        return;\n                    }\n\n                    reportIfAllExtendEquivalent(typeReference);\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest AndAll over `AllExtend<TTuple, true>` boolean-tuple checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-and-all\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferAndAll:\n                    \"Prefer `AndAll<TTuple>` from type-fest over `AllExtend<TTuple, true>` for boolean-tuple conjunction checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-and-all\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-and-all` rule module.\n */\nexport default preferTypeFestAndAllRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-and`.\n */\nimport { getTwoElementTupleArgumentText } from \"../_internal/boolean-pair-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst AND_ALL_TYPE_NAME = \"AndAll\" as const;\nconst AND_TYPE_NAME = \"And\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-and`. */\nconst preferTypeFestAndRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const andAllLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                AND_ALL_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const reportIfAndAllPair = (\n                node: Readonly<TSESTree.TSTypeReference>\n            ): void => {\n                const tupleArgumentText = getTwoElementTupleArgumentText(\n                    node,\n                    context.sourceCode\n                );\n\n                if (!tupleArgumentText) {\n                    return;\n                }\n\n                const replacementText = `${AND_TYPE_NAME}<${tupleArgumentText.leftTypeText}, ${tupleArgumentText.rightTypeText}>`;\n                const fix = createSafeTypeNodeTextReplacementFix(\n                    node,\n                    AND_TYPE_NAME,\n                    replacementText,\n                    typeFestDirectImports\n                );\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferAnd\",\n                    node,\n                });\n            };\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            andAllLocalNames,\n                            typeReference.typeName.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportIfAndAllPair(typeReference);\n                },\n                'TSTypeReference[typeName.type=\"TSQualifiedName\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.TSQualifiedName ||\n                        typeReference.typeName.left.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            typeFestNamespaceImportNames,\n                            typeReference.typeName.left.name\n                        ) ||\n                        typeReference.typeName.right.name !== AND_ALL_TYPE_NAME\n                    ) {\n                        return;\n                    }\n\n                    reportIfAndAllPair(typeReference);\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest And over two-element AndAll boolean tuple checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-and\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferAnd:\n                    \"Prefer `And<A, B>` from type-fest over `AndAll<[A, B]>` for two-value boolean conjunction checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-and\",\n    });\n\nexport default preferTypeFestAndRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Shared AST pattern helpers for boolean-pair TypeFest rules.\n */\n\n/**\n * Text for a two-element boolean tuple argument.\n */\nexport type BooleanPairTupleArgumentText = Readonly<{\n    leftTypeText: string;\n    rightTypeText: string;\n}>;\n\nconst getReadonlyTupleType = (\n    node: Readonly<TSESTree.TypeNode>\n): TSESTree.TSTupleType | undefined => {\n    if (node.type === AST_NODE_TYPES.TSTupleType) {\n        return node;\n    }\n\n    if (\n        node.type === AST_NODE_TYPES.TSTypeOperator &&\n        node.operator === \"readonly\" &&\n        node.typeAnnotation?.type === AST_NODE_TYPES.TSTupleType\n    ) {\n        return node.typeAnnotation;\n    }\n\n    return undefined;\n};\n\nconst isPlainTupleElementType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type !== AST_NODE_TYPES.TSNamedTupleMember &&\n    node.type !== AST_NODE_TYPES.TSOptionalType &&\n    node.type !== AST_NODE_TYPES.TSRestType;\n\n/**\n * Extract element text from a type reference whose only argument is a two-item\n * tuple.\n */\nexport const getTwoElementTupleArgumentText = (\n    typeReference: Readonly<TSESTree.TSTypeReference>,\n    sourceCode: Readonly<TSESLint.SourceCode>\n): BooleanPairTupleArgumentText | undefined => {\n    const typeArguments = typeReference.typeArguments?.params ?? [];\n    const [tupleArgument] = typeArguments;\n\n    if (!tupleArgument || typeArguments.length !== 1) {\n        return undefined;\n    }\n\n    const tupleType = getReadonlyTupleType(tupleArgument);\n\n    if (tupleType?.elementTypes.length !== 2) {\n        return undefined;\n    }\n\n    const [leftType, rightType] = tupleType.elementTypes;\n\n    if (\n        !leftType ||\n        !rightType ||\n        !isPlainTupleElementType(leftType) ||\n        !isPlainTupleElementType(rightType)\n    ) {\n        return undefined;\n    }\n\n    return {\n        leftTypeText: sourceCode.getText(leftType),\n        rightTypeText: sourceCode.getText(rightType),\n    };\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-array-element`.\n */\nimport { isArrayLikeType } from \"../_internal/array-like-expression.js\";\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\nconst ARRAY_ELEMENT_TYPE_NAME = \"ArrayElement\" as const;\n\nconst isNumberIndexType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSNumberKeyword;\n\n/**\n * ESLint rule definition for `prefer-type-fest-array-element`.\n *\n * @remarks\n * Defines metadata, diagnostics, and fixes for this rule.\n */\nconst preferTypeFestArrayElementRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const { checker, parserServices } = getTypedRuleServices(context);\n\n            return {\n                TSIndexedAccessType(node) {\n                    if (\n                        !isNumberIndexType(node.indexType) ||\n                        node.objectType.type === AST_NODE_TYPES.TSTypeQuery\n                    ) {\n                        return;\n                    }\n\n                    const objectType = getConstrainedTypeAtLocationWithFallback(\n                        checker,\n                        node.objectType,\n                        parserServices,\n                        \"prefer-type-fest-array-element-type-resolution-failed\"\n                    );\n\n                    if (\n                        !objectType ||\n                        !isArrayLikeType(checker, objectType, \"every\")\n                    ) {\n                        return;\n                    }\n\n                    const objectTypeText = context.sourceCode.getText(\n                        node.objectType\n                    );\n\n                    if (objectTypeText.trim().length === 0) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        ARRAY_ELEMENT_TYPE_NAME,\n                        `${ARRAY_ELEMENT_TYPE_NAME}<${objectTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferArrayElement\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ArrayElement over array and tuple `T[number]` element extraction.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-array-element\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferArrayElement:\n                    \"Prefer `ArrayElement<T>` from type-fest over array and tuple `T[number]` element extraction.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-array-element\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-array-element` rule module.\n */\nexport default preferTypeFestArrayElementRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-array-length`.\n */\nimport { isArrayLikeType } from \"../_internal/array-like-expression.js\";\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\nconst ARRAY_LENGTH_TYPE_NAME = \"ArrayLength\" as const;\n\nconst isLengthIndexType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === \"length\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-array-length`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestArrayLengthRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const { checker, parserServices } = getTypedRuleServices(context);\n\n            return {\n                TSIndexedAccessType(node) {\n                    if (!isLengthIndexType(node.indexType)) {\n                        return;\n                    }\n\n                    const objectType = getConstrainedTypeAtLocationWithFallback(\n                        checker,\n                        node.objectType,\n                        parserServices,\n                        \"prefer-type-fest-array-length-type-resolution-failed\"\n                    );\n\n                    if (\n                        !objectType ||\n                        !isArrayLikeType(checker, objectType, \"every\")\n                    ) {\n                        return;\n                    }\n\n                    const objectTypeText = context.sourceCode.getText(\n                        node.objectType\n                    );\n\n                    if (objectTypeText.trim().length === 0) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        ARRAY_LENGTH_TYPE_NAME,\n                        `${ARRAY_LENGTH_TYPE_NAME}<${objectTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferArrayLength\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    'require TypeFest ArrayLength over array and tuple `T[\"length\"]` type queries.',\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-array-length\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferArrayLength:\n                    'Prefer `ArrayLength<T>` from type-fest over array and tuple `T[\"length\"]` type queries.',\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-array-length\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-array-length` rule module.\n */\nexport default preferTypeFestArrayLengthRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-array-values`.\n */\nimport { isArrayLikeType } from \"../_internal/array-like-expression.js\";\nimport { getConstrainedTypeAtLocationWithFallback } from \"../_internal/constrained-type-at-location.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    createTypedRule,\n    getTypedRuleServices,\n} from \"../_internal/typed-rule.js\";\n\nconst ARRAY_VALUES_TYPE_NAME = \"ArrayValues\" as const;\n\nconst isNumberIndexType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSNumberKeyword;\n\n/**\n * ESLint rule definition for `prefer-type-fest-array-values`.\n *\n * @remarks\n * Defines metadata, diagnostics, and fixes for this rule.\n */\nconst preferTypeFestArrayValuesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const { checker, parserServices } = getTypedRuleServices(context);\n\n            return {\n                TSIndexedAccessType(node) {\n                    if (\n                        !isNumberIndexType(node.indexType) ||\n                        node.objectType.type !== AST_NODE_TYPES.TSTypeQuery\n                    ) {\n                        return;\n                    }\n\n                    const objectType = getConstrainedTypeAtLocationWithFallback(\n                        checker,\n                        node.objectType,\n                        parserServices,\n                        \"prefer-type-fest-array-values-type-resolution-failed\"\n                    );\n\n                    if (\n                        !objectType ||\n                        !isArrayLikeType(checker, objectType, \"every\")\n                    ) {\n                        return;\n                    }\n\n                    const objectTypeText = context.sourceCode.getText(\n                        node.objectType\n                    );\n\n                    if (objectTypeText.trim().length === 0) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        ARRAY_VALUES_TYPE_NAME,\n                        `${ARRAY_VALUES_TYPE_NAME}<${objectTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferArrayValues\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ArrayValues over `typeof values[number]` constant array value extraction.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: true,\n                typefestConfigs: [\n                    \"typefest.configs.recommended-type-checked\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-array-values\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferArrayValues:\n                    \"Prefer `ArrayValues<T>` from type-fest over `typeof values[number]` constant array value extraction.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-array-values\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-array-values` rule module.\n */\nexport default preferTypeFestArrayValuesRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-arrayable`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst ARRAY_TYPE_NAME = \"Array\";\n\n/**\n * Extract the element type from `Array<T>` type references.\n *\n * @param node - Type node to inspect.\n *\n * @returns Element type when the node is `Array<T>`; otherwise `null`.\n */\nconst getArrayTypeReferenceElementType = (\n    node: Readonly<TSESTree.TypeNode>\n): null | TSESTree.TypeNode => {\n    if (!isIdentifierTypeReference(node, ARRAY_TYPE_NAME)) {\n        return null;\n    }\n\n    const typeArguments = node.typeArguments?.params ?? [];\n    if (typeArguments.length !== 1) {\n        return null;\n    }\n\n    const [firstTypeArgument] = typeArguments;\n    return firstTypeArgument ?? null;\n};\n\n/**\n * Extract the scalar element type from `T | T[]` or `T | Array<T>` unions.\n *\n * @param node - Union type node to inspect.\n *\n * @returns The scalar `T` when the union matches an Arrayable pattern;\n *   otherwise `null`.\n */\nconst getArrayableElementType = (\n    node: Readonly<TSESTree.TSUnionType>\n): null | TSESTree.TypeNode => {\n    const unionTypes = node.types;\n    if (unionTypes.length !== 2) {\n        return null;\n    }\n\n    const [firstUnionType, secondUnionType] = unionTypes;\n    if (!firstUnionType || !secondUnionType) {\n        return null;\n    }\n\n    if (firstUnionType.type === AST_NODE_TYPES.TSArrayType) {\n        return areEquivalentTypeNodes(\n            firstUnionType.elementType,\n            secondUnionType\n        )\n            ? secondUnionType\n            : null;\n    }\n\n    if (secondUnionType.type === AST_NODE_TYPES.TSArrayType) {\n        return areEquivalentTypeNodes(\n            secondUnionType.elementType,\n            firstUnionType\n        )\n            ? firstUnionType\n            : null;\n    }\n\n    const firstArrayElementType =\n        getArrayTypeReferenceElementType(firstUnionType);\n    if (firstArrayElementType) {\n        return areEquivalentTypeNodes(firstArrayElementType, secondUnionType)\n            ? secondUnionType\n            : null;\n    }\n\n    const secondArrayElementType =\n        getArrayTypeReferenceElementType(secondUnionType);\n    if (secondArrayElementType) {\n        return areEquivalentTypeNodes(secondArrayElementType, firstUnionType)\n            ? firstUnionType\n            : null;\n    }\n\n    return null;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-arrayable`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestArrayableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const { sourceCode } = context;\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    const arrayableElementType = getArrayableElementType(node);\n\n                    if (!arrayableElementType) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        \"Arrayable\",\n                        `Arrayable<${sourceCode.getText(arrayableElementType)}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferArrayable\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Arrayable over T | T[] and T | Array<T> unions.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-arrayable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferArrayable:\n                    \"Prefer `Arrayable<T>` from type-fest over `T | T[]` or `T | Array<T>` unions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-arrayable\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-arrayable` rule module.\n */\nexport default preferTypeFestArrayableRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Predicate helpers for narrowing `TSTypeReference` nodes by identifier name.\n */\n\nconst TS_PARENTHESIZED_TYPE = \"TSParenthesizedType\";\n\nconst isTypeNodeLike = (value: unknown): value is Readonly<TSESTree.TypeNode> =>\n    typeof value === \"object\" &&\n    value !== null &&\n    typeof Reflect.get(value, \"type\") === \"string\";\n\n/**\n * Checks whether a type node is an identifier-based type reference with a\n * specific symbol name.\n *\n * @param node - Type node candidate.\n * @param identifierName - Expected referenced identifier name.\n *\n * @returns `true` when the node is `TSTypeReference` and the referenced\n *   `typeName` identifier matches exactly.\n */\nexport const isIdentifierTypeReference = (\n    node: Readonly<TSESTree.TypeNode>,\n    identifierName: string\n): node is TSESTree.TSTypeReference & { typeName: TSESTree.Identifier } =>\n    node.type === AST_NODE_TYPES.TSTypeReference &&\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    node.typeName.name === identifierName;\n\n/**\n * Unwrap transparent parenthesized type nodes.\n *\n * @param node - Type node to normalize.\n *\n * @returns The innermost non-parenthesized type node.\n */\nexport const unwrapParenthesizedTypeNode = (\n    node: Readonly<TSESTree.TypeNode>\n): Readonly<TSESTree.TypeNode> => {\n    const nodeObject: object = node;\n    const nodeType: unknown = Reflect.get(nodeObject, \"type\");\n\n    if (nodeType !== TS_PARENTHESIZED_TYPE) {\n        return node;\n    }\n\n    const typeAnnotation: unknown = Reflect.get(nodeObject, \"typeAnnotation\");\n\n    return isTypeNodeLike(typeAnnotation)\n        ? unwrapParenthesizedTypeNode(typeAnnotation)\n        : node;\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-async-return-type`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Built-in utility type used in verbose async return patterns. */\nconst AWAITED_TYPE_NAME = \"Awaited\";\n\n/** Built-in utility type nested inside awaited return compositions. */\nconst RETURN_TYPE_NAME = \"ReturnType\";\n\n/**\n * Extracts a single generic type argument from a type reference.\n *\n * @param node - Type reference node to inspect.\n *\n * @returns The only type argument when exactly one is present; otherwise\n *   `null`.\n */\n\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): null | TSESTree.TypeNode => {\n    const typeArguments = node.typeArguments?.params ?? [];\n\n    if (typeArguments.length !== 1) {\n        return null;\n    }\n\n    const [onlyTypeArgument] = typeArguments;\n    /* v8 ignore next -- defensive fallback for malformed synthetic AST arrays containing holes. */\n    return onlyTypeArgument ?? null;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-async-return-type`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestAsyncReturnTypeRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const { sourceCode } = context;\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (!isIdentifierTypeReference(node, AWAITED_TYPE_NAME)) {\n                        return;\n                    }\n\n                    const awaitedInnerType = getSingleTypeArgument(node);\n                    if (\n                        awaitedInnerType?.type !==\n                        AST_NODE_TYPES.TSTypeReference\n                    ) {\n                        return;\n                    }\n\n                    if (\n                        !isIdentifierTypeReference(\n                            awaitedInnerType,\n                            RETURN_TYPE_NAME\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const returnTypeArgument =\n                        getSingleTypeArgument(awaitedInnerType);\n\n                    if (returnTypeArgument === null) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        \"AsyncReturnType\",\n                        `AsyncReturnType<${sourceCode.getText(returnTypeArgument)}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferAsyncReturnType\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest AsyncReturnType over Awaited<ReturnType<T>> compositions for async return extraction.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-async-return-type\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferAsyncReturnType:\n                    \"Prefer `AsyncReturnType<T>` from type-fest over `Awaited<ReturnType<T>>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-async-return-type\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-async-return-type` rule module.\n */\nexport default preferTypeFestAsyncReturnTypeRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-asyncify`.\n */\nimport {\n    getParametersFunctionArgumentFromFunctionType,\n    isPromiseAwaitedReturnTypeReferenceForFunction,\n} from \"../_internal/function-type-reference-patterns.js\";\nimport { collectNamedImportLocalNamesFromSource } from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { unwrapParenthesizedTypeNode } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst isAsyncifyEquivalentSetReturnTypeReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    setReturnTypeLocalNames: ReadonlySet<string>\n): boolean => {\n    if (\n        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n        !setContainsValue(setReturnTypeLocalNames, node.typeName.name)\n    ) {\n        return false;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [functionType, returnType] = typeArguments;\n\n    return (\n        functionType !== undefined &&\n        returnType !== undefined &&\n        isPromiseAwaitedReturnTypeReferenceForFunction(returnType, functionType)\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-asyncify`.\n */\nconst preferTypeFestAsyncifyRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const setReturnTypeLocalNames =\n                collectNamedImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE,\n                    \"SetReturnType\"\n                );\n\n            return {\n                TSFunctionType(node) {\n                    const functionType =\n                        getParametersFunctionArgumentFromFunctionType(node);\n                    const returnType = node.returnType?.typeAnnotation;\n\n                    if (\n                        functionType === null ||\n                        returnType === undefined ||\n                        !isPromiseAwaitedReturnTypeReferenceForFunction(\n                            returnType,\n                            functionType\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferAsyncify\",\n                        node,\n                    });\n                },\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n                    if (\n                        normalizedNode.type !==\n                            AST_NODE_TYPES.TSTypeReference ||\n                        !isAsyncifyEquivalentSetReturnTypeReference(\n                            normalizedNode,\n                            setReturnTypeLocalNames\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferAsyncify\",\n                        node: normalizedNode,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Asyncify over async function-type wrappers built from Parameters + Promise<Awaited<ReturnType<...>>>.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-asyncify\",\n            },\n            messages: {\n                preferAsyncify:\n                    \"Prefer `Asyncify<Function>` from type-fest over manual async wrappers built from `Parameters<Function>` and `Promise<Awaited<ReturnType<Function>>>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-asyncify\",\n    });\n\nexport default preferTypeFestAsyncifyRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Shared matchers for function-type wrappers built from `Parameters`,\n * `ReturnType`, and async return boxing helpers.\n */\nimport { areEquivalentTypeNodes } from \"./normalize-expression-text.js\";\nimport {\n    isIdentifierTypeReference,\n    unwrapParenthesizedTypeNode,\n} from \"./type-reference-node.js\";\n\n/**\n * Extract the sole type argument from a type reference.\n *\n * @param node - Type reference to inspect.\n *\n * @returns The only type argument when exactly one is present; otherwise\n *   `null`.\n */\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): null | Readonly<TSESTree.TypeNode> => {\n    const typeArguments = node.typeArguments?.params ?? [];\n\n    if (typeArguments.length !== 1) {\n        return null;\n    }\n\n    const [onlyTypeArgument] = typeArguments;\n\n    return onlyTypeArgument ?? null;\n};\n\n/**\n * Read a normalized type annotation from a function parameter node.\n *\n * @param parameter - Parameter node to inspect.\n *\n * @returns The unwrapped type annotation when present; otherwise `null`.\n */\nconst getParameterTypeAnnotation = (\n    parameter: Readonly<TSESTree.Parameter>\n): null | Readonly<TSESTree.TypeNode> => {\n    if (parameter.type === AST_NODE_TYPES.Identifier) {\n        return parameter.typeAnnotation === undefined\n            ? null\n            : unwrapParenthesizedTypeNode(\n                  parameter.typeAnnotation.typeAnnotation\n              );\n    }\n\n    if (parameter.type !== AST_NODE_TYPES.RestElement) {\n        return null;\n    }\n\n    return parameter.typeAnnotation === undefined\n        ? null\n        : unwrapParenthesizedTypeNode(parameter.typeAnnotation.typeAnnotation);\n};\n\n/**\n * Match direct `(...args: Parameters<Function>) => ...` wrappers.\n *\n * @param node - Function type node to inspect.\n *\n * @returns The wrapped function type argument when the function has exactly one\n *   rest parameter typed as `Parameters<Function>`; otherwise `null`.\n */\nexport const getParametersFunctionArgumentFromFunctionType = (\n    node: Readonly<TSESTree.TSFunctionType>\n): null | Readonly<TSESTree.TypeNode> => {\n    if (node.params.length !== 1) {\n        return null;\n    }\n\n    const [onlyParameter] = node.params;\n\n    if (onlyParameter?.type !== AST_NODE_TYPES.RestElement) {\n        return null;\n    }\n\n    const restParameterType = getParameterTypeAnnotation(onlyParameter);\n\n    if (\n        restParameterType?.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(restParameterType, \"Parameters\")\n    ) {\n        return null;\n    }\n\n    return getSingleTypeArgument(restParameterType);\n};\n\n/**\n * Check whether a type node is `ReturnType<Function>` for a specific function.\n *\n * @param node - Candidate return type node.\n * @param functionType - Wrapped function type.\n *\n * @returns `true` when the node is `ReturnType<Function>`.\n */\nexport const isReturnTypeReferenceForFunction = (\n    node: Readonly<TSESTree.TypeNode>,\n    functionType: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedNode, \"ReturnType\")\n    ) {\n        return false;\n    }\n\n    const referencedFunctionType = getSingleTypeArgument(normalizedNode);\n\n    return (\n        referencedFunctionType !== null &&\n        areEquivalentTypeNodes(\n            unwrapParenthesizedTypeNode(referencedFunctionType),\n            unwrapParenthesizedTypeNode(functionType)\n        )\n    );\n};\n\n/**\n * Check whether a type node is `Promise<Awaited<ReturnType<Function>>>`.\n *\n * @param node - Candidate return type node.\n * @param functionType - Wrapped function type.\n *\n * @returns `true` when the node is the canonical asyncified return shape.\n */\nexport const isPromiseAwaitedReturnTypeReferenceForFunction = (\n    node: Readonly<TSESTree.TypeNode>,\n    functionType: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedNode, \"Promise\")\n    ) {\n        return false;\n    }\n\n    const promisedType = getSingleTypeArgument(normalizedNode);\n\n    if (\n        promisedType?.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(promisedType, \"Awaited\")\n    ) {\n        return false;\n    }\n\n    const awaitedInnerType = getSingleTypeArgument(promisedType);\n\n    return (\n        awaitedInnerType !== null &&\n        isReturnTypeReferenceForFunction(awaitedInnerType, functionType)\n    );\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-conditional-except`.\n */\nimport { collectNamedImportLocalNamesFromSource } from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { unwrapParenthesizedTypeNode } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\ntype ConditionalKeysReference = Readonly<TSESTree.TSTypeReference> & {\n    readonly typeName: Readonly<TSESTree.Identifier>;\n};\n\nconst isConditionalKeysReference = (\n    node: Readonly<TSESTree.TypeNode>,\n    conditionalKeysLocalNames: ReadonlySet<string>\n): node is ConditionalKeysReference =>\n    node.type === AST_NODE_TYPES.TSTypeReference &&\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(conditionalKeysLocalNames, node.typeName.name);\n\n/**\n * Detect whether a type reference matches `ConditionalKeys<Base, Condition>`\n * using currently imported local names.\n *\n * @param node - Candidate type node.\n * @param conditionalKeysLocalNames - In-scope local names bound to\n *   `ConditionalKeys`.\n *\n * @returns Matched `ConditionalKeys` reference when supported; otherwise\n *   `null`.\n */\nconst getConditionalKeysReference = (\n    node: Readonly<TSESTree.TypeNode>,\n    conditionalKeysLocalNames: ReadonlySet<string>\n): ConditionalKeysReference | null => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        !isConditionalKeysReference(normalizedNode, conditionalKeysLocalNames)\n    ) {\n        return null;\n    }\n\n    return normalizedNode;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-conditional-except`.\n */\nconst preferTypeFestConditionalExceptRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const exceptLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                \"Except\"\n            );\n            const conditionalKeysLocalNames =\n                collectNamedImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE,\n                    \"ConditionalKeys\"\n                );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(exceptLocalNames, node.typeName.name)\n                    ) {\n                        return;\n                    }\n\n                    const typeArguments = node.typeArguments?.params;\n                    if (typeArguments?.length !== 2) {\n                        return;\n                    }\n\n                    const [baseType, excludedKeysType] = typeArguments;\n\n                    if (\n                        baseType === undefined ||\n                        excludedKeysType === undefined\n                    ) {\n                        return;\n                    }\n\n                    const conditionalKeysReference =\n                        getConditionalKeysReference(\n                            excludedKeysType,\n                            conditionalKeysLocalNames\n                        );\n\n                    if (conditionalKeysReference === null) {\n                        return;\n                    }\n\n                    const conditionalKeysArguments =\n                        conditionalKeysReference.typeArguments?.params;\n\n                    if (conditionalKeysArguments?.length !== 2) {\n                        return;\n                    }\n\n                    const [conditionalBaseType] = conditionalKeysArguments;\n\n                    if (conditionalBaseType === undefined) {\n                        return;\n                    }\n\n                    if (\n                        !areEquivalentTypeNodes(baseType, conditionalBaseType)\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferConditionalExcept\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ConditionalExcept over Except<T, ConditionalKeys<T, Condition>> compositions.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-except\",\n            },\n            messages: {\n                preferConditionalExcept:\n                    \"Prefer `ConditionalExcept<Base, Condition>` from type-fest over `Except<Base, ConditionalKeys<Base, Condition>>` when excluding keys by value condition.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-conditional-except\",\n    });\n\nexport default preferTypeFestConditionalExceptRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-conditional-keys`.\n */\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { unwrapParenthesizedTypeNode } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst hasConditionalKeysKeyRemapShape = (\n    node: Readonly<TSESTree.TSTypeOperator>\n): boolean => {\n    if (node.operator !== \"keyof\" || node.typeAnnotation === undefined) {\n        return false;\n    }\n\n    const normalizedOperand = unwrapParenthesizedTypeNode(node.typeAnnotation);\n\n    if (normalizedOperand.type !== AST_NODE_TYPES.TSMappedType) {\n        return false;\n    }\n\n    const mappedKeyName = normalizedOperand.key.name;\n    const constraint = normalizedOperand.constraint;\n\n    if (\n        constraint.type !== AST_NODE_TYPES.TSTypeOperator ||\n        constraint.operator !== \"keyof\"\n    ) {\n        return false;\n    }\n\n    const constraintTypeAnnotation = constraint.typeAnnotation;\n    if (constraintTypeAnnotation === undefined) {\n        return false;\n    }\n\n    const baseType = unwrapParenthesizedTypeNode(constraintTypeAnnotation);\n    const keyRemapType = normalizedOperand.nameType;\n\n    if (keyRemapType?.type !== AST_NODE_TYPES.TSConditionalType) {\n        return false;\n    }\n\n    const checkedValueType = unwrapParenthesizedTypeNode(\n        keyRemapType.checkType\n    );\n\n    if (checkedValueType.type !== AST_NODE_TYPES.TSIndexedAccessType) {\n        return false;\n    }\n    if (\n        !areEquivalentTypeNodes(\n            unwrapParenthesizedTypeNode(checkedValueType.objectType),\n            baseType\n        )\n    ) {\n        return false;\n    }\n    const checkedIndexType = checkedValueType.indexType;\n    if (\n        checkedIndexType.type !== AST_NODE_TYPES.TSTypeReference ||\n        checkedIndexType.typeName.type !== AST_NODE_TYPES.Identifier ||\n        checkedIndexType.typeName.name !== mappedKeyName\n    ) {\n        return false;\n    }\n\n    return (\n        keyRemapType.trueType.type === AST_NODE_TYPES.TSTypeReference &&\n        keyRemapType.trueType.typeName.type === AST_NODE_TYPES.Identifier &&\n        keyRemapType.trueType.typeName.name === mappedKeyName &&\n        keyRemapType.falseType.type === AST_NODE_TYPES.TSNeverKeyword\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-conditional-keys`.\n */\nconst preferTypeFestConditionalKeysRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSTypeOperator(node) {\n                    if (!hasConditionalKeysKeyRemapShape(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferConditionalKeys\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ConditionalKeys over keyof-remapped mapped types that filter keys by value condition.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-keys\",\n            },\n            messages: {\n                preferConditionalKeys:\n                    \"Prefer `ConditionalKeys<Base, Condition>` from type-fest over manual `keyof { [K in keyof Base as Base[K] extends Condition ? K : never]: ... }` key filters.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-conditional-keys\",\n    });\n\nexport default preferTypeFestConditionalKeysRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-conditional-pick-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst conditionalPickDeepAliasReplacements = {\n    PickDeepByType: \"ConditionalPickDeep\",\n    PickDeepByTypes: \"ConditionalPickDeep\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-conditional-pick-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestConditionalPickDeepRule: ReturnType<\n    typeof createTypedRule\n> = createTypedRule({\n    create(context) {\n        const importedAliasMatches = collectImportedTypeAliasMatches(\n            context.sourceCode,\n            conditionalPickDeepAliasReplacements\n        );\n        const typeFestDirectImports = collectDirectNamedImportsFromSource(\n            context.sourceCode,\n            TYPE_FEST_MODULE_SOURCE\n        );\n\n        return {\n            'TSTypeReference[typeName.type=\"Identifier\"]'(\n                node: TSESTree.TSTypeReference\n            ) {\n                if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                    return;\n                }\n\n                const importedAliasMatch = importedAliasMatches.get(\n                    node.typeName.name\n                );\n                if (!importedAliasMatch) {\n                    return;\n                }\n\n                const aliasReplacementFix =\n                    createSafeTypeReferenceReplacementFix(\n                        node,\n                        importedAliasMatch.replacementName,\n                        typeFestDirectImports\n                    );\n\n                reportWithOptionalFix({\n                    context,\n                    data: {\n                        alias: importedAliasMatch.importedName,\n                        replacement: importedAliasMatch.replacementName,\n                    },\n                    fix: aliasReplacementFix,\n                    messageId: \"preferConditionalPickDeep\",\n                    node,\n                });\n            },\n        };\n    },\n    meta: {\n        deprecated: false,\n        docs: {\n            description:\n                \"require TypeFest ConditionalPickDeep over imported aliases such as PickDeepByTypes.\",\n            frozen: false,\n            recommended: true,\n            requiresTypeChecking: false,\n            typefestConfigs: [\n                \"typefest.configs.recommended\",\n                \"typefest.configs.strict\",\n                \"typefest.configs.all\",\n                \"typefest.configs.type-fest/types\",\n            ],\n            url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-pick-deep\",\n        },\n        fixable: \"code\",\n        messages: {\n            preferConditionalPickDeep:\n                \"Prefer `{{replacement}}` from type-fest for deep conditional property filtering instead of legacy alias `{{alias}}`.\",\n        },\n        schema: [],\n        type: \"suggestion\",\n    },\n    name: \"prefer-type-fest-conditional-pick-deep\",\n});\n\n/**\n * Default export for the `prefer-type-fest-conditional-pick-deep` rule module.\n */\nexport default preferTypeFestConditionalPickDeepRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-conditional-pick`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst conditionalPickAliasReplacements = {\n    PickByTypes: \"ConditionalPick\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-conditional-pick`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestConditionalPickRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                conditionalPickAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferConditionalPick\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ConditionalPick over imported aliases such as PickByTypes.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-conditional-pick\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferConditionalPick:\n                    \"Prefer `{{replacement}}` from type-fest to pick keys whose values match a condition instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-conditional-pick\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-conditional-pick` rule module.\n */\nexport default preferTypeFestConditionalPickRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-constructor`.\n */\nimport { arrayJoin, isDefined } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-constructor`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestConstructorRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const { sourceCode } = context;\n\n            return {\n                TSConstructorType(node) {\n                    if (node.abstract) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        !isDefined(node.typeParameters) &&\n                        isDefined(node.returnType)\n                            ? createSafeTypeNodeTextReplacementFix(\n                                  node,\n                                  \"Constructor\",\n                                  `Constructor<${sourceCode.getText(node.returnType.typeAnnotation)}, [${arrayJoin(\n                                      node.params.map((parameter) =>\n                                          sourceCode.getText(parameter)\n                                      ),\n                                      \", \"\n                                  )}]>`,\n                                  typeFestDirectImports\n                              )\n                            : null;\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferConstructorSignature\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Constructor over explicit `new (...) => ...` constructor signatures.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-constructor\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferConstructorSignature:\n                    \"Prefer `Constructor<...>` from type-fest over explicit `new (...) => ...` constructor signatures.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-constructor\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-constructor` rule module.\n */\nexport default preferTypeFestConstructorRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-distributed-omit`.\n */\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    isIdentifierTypeReference,\n    unwrapParenthesizedTypeNode,\n} from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst isDistributiveConditionalExtendsType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    return (\n        normalizedNode.type === AST_NODE_TYPES.TSAnyKeyword ||\n        normalizedNode.type === AST_NODE_TYPES.TSUnknownKeyword\n    );\n};\n\nconst isDistributedOmitEquivalent = (\n    node: Readonly<TSESTree.TSConditionalType>\n): boolean => {\n    if (\n        node.falseType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        !isDistributiveConditionalExtendsType(node.extendsType)\n    ) {\n        return false;\n    }\n\n    const normalizedTrueType = unwrapParenthesizedTypeNode(node.trueType);\n\n    if (\n        normalizedTrueType.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedTrueType, \"Omit\")\n    ) {\n        return false;\n    }\n\n    const typeArguments = normalizedTrueType.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [objectType] = typeArguments;\n\n    return (\n        objectType !== undefined &&\n        areEquivalentTypeNodes(\n            unwrapParenthesizedTypeNode(objectType),\n            unwrapParenthesizedTypeNode(node.checkType)\n        )\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-distributed-omit`.\n */\nconst preferTypeFestDistributedOmitRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSConditionalType(node) {\n                    if (!isDistributedOmitEquivalent(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferDistributedOmit\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest DistributedOmit over distributive conditional helpers of the form T extends unknown ? Omit<T, K> : never.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-distributed-omit\",\n            },\n            messages: {\n                preferDistributedOmit:\n                    \"Prefer `DistributedOmit<ObjectType, KeyType>` from type-fest over distributive conditional helpers like `T extends unknown ? Omit<T, K> : never`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-distributed-omit\",\n    });\n\nexport default preferTypeFestDistributedOmitRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-distributed-pick`.\n */\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    isIdentifierTypeReference,\n    unwrapParenthesizedTypeNode,\n} from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst isDistributiveConditionalExtendsType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    return (\n        normalizedNode.type === AST_NODE_TYPES.TSAnyKeyword ||\n        normalizedNode.type === AST_NODE_TYPES.TSUnknownKeyword\n    );\n};\n\nconst isKeyofBaseType = (\n    node: Readonly<TSESTree.TypeNode>,\n    baseType: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSTypeOperator ||\n        normalizedNode.operator !== \"keyof\" ||\n        normalizedNode.typeAnnotation === undefined\n    ) {\n        return false;\n    }\n\n    return areEquivalentTypeNodes(\n        unwrapParenthesizedTypeNode(normalizedNode.typeAnnotation),\n        unwrapParenthesizedTypeNode(baseType)\n    );\n};\n\nconst isExtractOverKeyofBaseType = (\n    node: Readonly<TSESTree.TypeNode>,\n    baseType: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedNode, \"Extract\")\n    ) {\n        return false;\n    }\n\n    const typeArguments = normalizedNode.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [, extractedFromType] = typeArguments;\n\n    return (\n        extractedFromType !== undefined &&\n        isKeyofBaseType(extractedFromType, baseType)\n    );\n};\n\nconst isDistributedPickEquivalent = (\n    node: Readonly<TSESTree.TSConditionalType>\n): boolean => {\n    if (\n        node.falseType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        !isDistributiveConditionalExtendsType(node.extendsType)\n    ) {\n        return false;\n    }\n\n    const normalizedTrueType = unwrapParenthesizedTypeNode(node.trueType);\n\n    if (\n        normalizedTrueType.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedTrueType, \"Pick\")\n    ) {\n        return false;\n    }\n\n    const typeArguments = normalizedTrueType.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [objectType, selectedKeysType] = typeArguments;\n\n    if (objectType === undefined || selectedKeysType === undefined) {\n        return false;\n    }\n\n    if (\n        !areEquivalentTypeNodes(\n            unwrapParenthesizedTypeNode(objectType),\n            unwrapParenthesizedTypeNode(node.checkType)\n        )\n    ) {\n        return false;\n    }\n\n    return (\n        !isIdentifierTypeReference(\n            unwrapParenthesizedTypeNode(selectedKeysType),\n            \"Extract\"\n        ) || isExtractOverKeyofBaseType(selectedKeysType, node.checkType)\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-distributed-pick`.\n */\nconst preferTypeFestDistributedPickRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSConditionalType(node) {\n                    if (!isDistributedPickEquivalent(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferDistributedPick\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest DistributedPick over distributive conditional helpers of the form T extends unknown ? Pick<T, K> : never.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-distributed-pick\",\n            },\n            messages: {\n                preferDistributedPick:\n                    \"Prefer `DistributedPick<ObjectType, KeyType>` from type-fest over distributive conditional helpers like `T extends unknown ? Pick<T, K> : never`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-distributed-pick\",\n    });\n\nexport default preferTypeFestDistributedPickRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * Shared AST matchers for object entry-pair type aliases.\n */\nimport { arrayAt, arrayFirst } from \"ts-extras\";\n\nimport { areEquivalentTypeNodes } from \"./normalize-expression-text.js\";\n\nconst ARRAY_TYPE_NAME = \"Array\";\n\nconst getKeyofTargetType = (\n    node: Readonly<TSESTree.TypeNode>\n): TSESTree.TypeNode | undefined =>\n    node.type === AST_NODE_TYPES.TSTypeOperator && node.operator === \"keyof\"\n        ? node.typeAnnotation\n        : undefined;\n\nconst getObjectEntryTargetType = (\n    node: Readonly<TSESTree.TSTupleType>\n): TSESTree.TypeNode | undefined => {\n    if (node.elementTypes.length !== 2) {\n        return undefined;\n    }\n\n    const keyElement = arrayFirst(node.elementTypes);\n    const valueElement = arrayAt(node.elementTypes, 1);\n\n    if (\n        !keyElement ||\n        valueElement?.type !== AST_NODE_TYPES.TSIndexedAccessType\n    ) {\n        return undefined;\n    }\n\n    const keyTargetType = getKeyofTargetType(keyElement);\n    const valueKeyTargetType = getKeyofTargetType(valueElement.indexType);\n\n    if (\n        !keyTargetType ||\n        !valueKeyTargetType ||\n        !areEquivalentTypeNodes(valueElement.objectType, keyTargetType) ||\n        !areEquivalentTypeNodes(valueKeyTargetType, keyTargetType)\n    ) {\n        return undefined;\n    }\n\n    return keyTargetType;\n};\n\n/**\n * Extract `T` from `[keyof T, T[keyof T]]`.\n */\nexport const getEntryEquivalentArgumentText = ({\n    node,\n    sourceCode,\n}: Readonly<{\n    node: Readonly<TSESTree.TypeNode>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    if (node.type !== AST_NODE_TYPES.TSTupleType) {\n        return null;\n    }\n\n    const targetType = getObjectEntryTargetType(node);\n\n    return targetType ? sourceCode.getText(targetType) : null;\n};\n\n/**\n * Extract `T` from `Array<[keyof T, T[keyof T]]>` or `[keyof T, T[keyof T]][]`.\n */\nexport const getEntriesEquivalentArgumentText = ({\n    node,\n    sourceCode,\n}: Readonly<{\n    node: Readonly<TSESTree.TypeNode>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    if (node.type === AST_NODE_TYPES.TSArrayType) {\n        return getEntryEquivalentArgumentText({\n            node: node.elementType,\n            sourceCode,\n        });\n    }\n\n    if (\n        node.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.typeName.name !== ARRAY_TYPE_NAME\n    ) {\n        return null;\n    }\n\n    const arrayElementType = arrayFirst(node.typeArguments?.params ?? []);\n\n    return arrayElementType\n        ? getEntryEquivalentArgumentText({\n              node: arrayElementType,\n              sourceCode,\n          })\n        : null;\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-entries`.\n */\nimport { getEntriesEquivalentArgumentText } from \"../_internal/entry-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst ENTRIES_TYPE_NAME = \"Entries\" as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-entries`.\n *\n * @remarks\n * Defines metadata, diagnostics, and fixes for this rule.\n */\nconst preferTypeFestEntriesRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const reportIfEntriesEquivalent = (\n                node: Readonly<TSESTree.TSArrayType | TSESTree.TSTypeReference>\n            ): void => {\n                const entriesArgumentText = getEntriesEquivalentArgumentText({\n                    node,\n                    sourceCode: context.sourceCode,\n                });\n\n                if (\n                    entriesArgumentText === null ||\n                    entriesArgumentText.trim().length === 0\n                ) {\n                    return;\n                }\n\n                const fix = createSafeTypeNodeTextReplacementFix(\n                    node,\n                    ENTRIES_TYPE_NAME,\n                    `${ENTRIES_TYPE_NAME}<${entriesArgumentText}>`,\n                    typeFestDirectImports\n                );\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferEntries\",\n                    node,\n                });\n            };\n\n            return {\n                TSArrayType(node) {\n                    reportIfEntriesEquivalent(node);\n                },\n                'TSTypeReference[typeName.type=\"Identifier\"][typeName.name=\"Array\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    reportIfEntriesEquivalent(node);\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Entries over manual arrays of `[keyof T, T[keyof T]]` object entry tuple types.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-entries\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferEntries:\n                    \"Prefer `Entries<T>` from type-fest over manual arrays of `[keyof T, T[keyof T]]` object entry tuple types.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-entries\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-entries` rule module.\n */\nexport default preferTypeFestEntriesRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-entry`.\n */\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\nimport { getParentNode } from \"../_internal/ast-node.js\";\nimport {\n    getEntriesEquivalentArgumentText,\n    getEntryEquivalentArgumentText,\n} from \"../_internal/entry-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst ENTRY_TYPE_NAME = \"Entry\" as const;\n\nconst isEntriesEquivalentAncestor = (\n    node: null | Readonly<TSESTree.Node> | undefined,\n    sourceCode: Readonly<TSESLint.SourceCode>\n): boolean =>\n    Boolean(\n        node &&\n        (node.type === AST_NODE_TYPES.TSArrayType ||\n            node.type === AST_NODE_TYPES.TSTypeReference) &&\n        getEntriesEquivalentArgumentText({\n            node,\n            sourceCode,\n        }) !== null\n    );\n\n/**\n * ESLint rule definition for `prefer-type-fest-entry`.\n *\n * @remarks\n * Defines metadata, diagnostics, and fixes for this rule.\n */\nconst preferTypeFestEntryRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSTupleType(node) {\n                    const parent = getParentNode(node);\n                    const grandparent = parent ? getParentNode(parent) : null;\n\n                    if (\n                        isEntriesEquivalentAncestor(\n                            parent,\n                            context.sourceCode\n                        ) ||\n                        isEntriesEquivalentAncestor(\n                            grandparent,\n                            context.sourceCode\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const entryArgumentText = getEntryEquivalentArgumentText({\n                        node,\n                        sourceCode: context.sourceCode,\n                    });\n\n                    if (\n                        entryArgumentText === null ||\n                        entryArgumentText.trim().length === 0\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        ENTRY_TYPE_NAME,\n                        `${ENTRY_TYPE_NAME}<${entryArgumentText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferEntry\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Entry over manual `[keyof T, T[keyof T]]` object entry tuple types.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-entry\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferEntry:\n                    \"Prefer `Entry<T>` from type-fest over manual `[keyof T, T[keyof T]]` object entry tuple types.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-entry\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-entry` rule module.\n */\nexport default preferTypeFestEntryRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-except`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\ntype PreferTypeFestExceptOption = Readonly<{\n    enforceBuiltinOmit?: boolean;\n}>;\n\nconst OMIT_TYPE_NAME = \"Omit\";\nconst exceptAliasReplacements = {\n    HomomorphicOmit: \"Except\",\n} as const;\n\nconst defaultOption = {\n    enforceBuiltinOmit: true,\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-except`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestExceptRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<readonly [PreferTypeFestExceptOption], \"preferExcept\">({\n        create(context, [options] = defaultOptions) {\n            const enforceBuiltinOmit = options.enforceBuiltinOmit ?? true;\n\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                exceptAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    const isBuiltinOmitReference = isIdentifierTypeReference(\n                        node,\n                        OMIT_TYPE_NAME\n                    );\n\n                    if (isBuiltinOmitReference) {\n                        if (!enforceBuiltinOmit) {\n                            return;\n                        }\n\n                        const typeArgumentCount =\n                            node.typeArguments?.params.length ?? 0;\n                        if (typeArgumentCount < 2) {\n                            return;\n                        }\n\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferExcept\",\n                            node,\n                        });\n                        return;\n                    }\n\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferExcept\",\n                        node,\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Except over Omit when removing properties from object types.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-except\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferExcept:\n                    \"Prefer `Except<T, K>` from type-fest over `Omit<T, K>` for stricter omitted-key modeling.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for builtin Omit enforcement in prefer-type-fest-except.\",\n                    minProperties: 1,\n                    properties: {\n                        enforceBuiltinOmit: {\n                            description:\n                                \"Whether to report builtin Omit<T, K> references in addition to imported legacy aliases.\",\n                            type: \"boolean\",\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-except\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-except` rule module.\n */\nexport default preferTypeFestExceptRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-extract-rest-element`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst EXTRACT_REST_ELEMENT_TYPE_NAME = \"ExtractRestElement\" as const;\nconst SPLIT_ON_REST_ELEMENT_TYPE_NAME = \"SplitOnRestElement\" as const;\n\nconst isNumberIndexType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSNumberKeyword;\n\nconst isNumericLiteralIndexType = (\n    node: Readonly<TSESTree.TypeNode>,\n    value: number\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === value;\n\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): TSESTree.TypeNode | undefined => {\n    const typeArguments = node.typeArguments?.params;\n\n    return typeArguments?.length === 1 ? arrayFirst(typeArguments) : undefined;\n};\n\nconst isDirectSplitOnRestElementReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    splitOnRestElementLocalNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(splitOnRestElementLocalNames, node.typeName.name);\n\nconst isNamespaceSplitOnRestElementReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.TSQualifiedName &&\n    node.typeName.left.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(typeFestNamespaceImportNames, node.typeName.left.name) &&\n    node.typeName.right.name === SPLIT_ON_REST_ELEMENT_TYPE_NAME;\n\nconst getSplitOnRestElementArgument = (\n    node: Readonly<TSESTree.TSIndexedAccessType>,\n    splitOnRestElementLocalNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !isNumericLiteralIndexType(node.indexType, 1) ||\n        node.objectType.type !== AST_NODE_TYPES.TSTypeReference ||\n        (!isDirectSplitOnRestElementReference(\n            node.objectType,\n            splitOnRestElementLocalNames\n        ) &&\n            !isNamespaceSplitOnRestElementReference(\n                node.objectType,\n                typeFestNamespaceImportNames\n            ))\n    ) {\n        return undefined;\n    }\n\n    return getSingleTypeArgument(node.objectType);\n};\n\nconst getExtractRestElementArgument = (\n    node: Readonly<TSESTree.TSIndexedAccessType>,\n    splitOnRestElementLocalNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): TSESTree.TypeNode | undefined =>\n    isNumberIndexType(node.indexType) &&\n    node.objectType.type === AST_NODE_TYPES.TSIndexedAccessType\n        ? getSplitOnRestElementArgument(\n              node.objectType,\n              splitOnRestElementLocalNames,\n              typeFestNamespaceImportNames\n          )\n        : undefined;\n\n/** ESLint rule definition for `prefer-type-fest-extract-rest-element`. */\nconst preferTypeFestExtractRestElementRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const splitOnRestElementLocalNames =\n                collectNamedImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE,\n                    SPLIT_ON_REST_ELEMENT_TYPE_NAME\n                );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            return {\n                TSIndexedAccessType(node) {\n                    const tupleType = getExtractRestElementArgument(\n                        node,\n                        splitOnRestElementLocalNames,\n                        typeFestNamespaceImportNames\n                    );\n\n                    if (!tupleType) {\n                        return;\n                    }\n\n                    const tupleTypeText = context.sourceCode.getText(tupleType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        EXTRACT_REST_ELEMENT_TYPE_NAME,\n                        `${EXTRACT_REST_ELEMENT_TYPE_NAME}<${tupleTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferExtractRestElement\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ExtractRestElement over SplitOnRestElement<T>[1][number] rest-element extraction.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-extract-rest-element\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferExtractRestElement:\n                    \"Prefer `ExtractRestElement<T>` from type-fest over `SplitOnRestElement<T>[1][number]`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-extract-rest-element\",\n    });\n\nexport default preferTypeFestExtractRestElementRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * Shared AST pattern helpers for TypeFest `Has*Keys` rules.\n */\nimport { setContainsValue } from \"./set-membership.js\";\nimport { hasFalseTrueBranches } from \"./type-guard-conditional-patterns.js\";\n\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): TSESTree.TypeNode | undefined => {\n    const typeArguments = node.typeArguments?.params;\n\n    return typeArguments?.length === 1 ? arrayFirst(typeArguments) : undefined;\n};\n\nconst isDirectKeysOfReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    keysOfLocalNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(keysOfLocalNames, node.typeName.name);\n\nconst isNamespaceKeysOfReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    keysOfTypeName: string\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.TSQualifiedName &&\n    node.typeName.left.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(typeFestNamespaceImportNames, node.typeName.left.name) &&\n    node.typeName.right.name === keysOfTypeName;\n\n/**\n * Extract `T` from `KeysOf<T> extends never ? false : true`.\n */\nexport const getHasKeysInputType = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    keysOfLocalNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    keysOfTypeName: string\n): TSESTree.TypeNode | undefined => {\n    if (\n        !hasFalseTrueBranches(node) ||\n        node.extendsType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        node.checkType.type !== AST_NODE_TYPES.TSTypeReference ||\n        (!isDirectKeysOfReference(node.checkType, keysOfLocalNames) &&\n            !isNamespaceKeysOfReference(\n                node.checkType,\n                typeFestNamespaceImportNames,\n                keysOfTypeName\n            ))\n    ) {\n        return undefined;\n    }\n\n    return getSingleTypeArgument(node.checkType);\n};\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\nimport { arrayFirst, assertNever } from \"ts-extras\";\n\ntype TupleWrappedGuardTarget = \"never\" | \"null\" | \"undefined\";\n\nconst isLiteralTypeWithValue = (\n    node: Readonly<TSESTree.TypeNode>,\n    value: boolean | number\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === value;\n\n/**\n * Determine whether a type node is the exact boolean literal type requested.\n */\nexport const isBooleanLiteralType = (\n    node: Readonly<TSESTree.TypeNode>,\n    value: boolean\n): boolean => isLiteralTypeWithValue(node, value);\n\nconst isNumericLiteralType = (\n    node: Readonly<TSESTree.TypeNode>,\n    value: number\n): boolean => isLiteralTypeWithValue(node, value);\n\n/**\n * Return the only tuple element type when the node is a single-element tuple.\n */\nexport const getSingleTupleElementType = (\n    node: Readonly<TSESTree.TypeNode>\n): TSESTree.TypeNode | undefined =>\n    node.type === AST_NODE_TYPES.TSTupleType && node.elementTypes.length === 1\n        ? arrayFirst(node.elementTypes)\n        : undefined;\n\nconst isTargetKeywordType = (\n    node: Readonly<TSESTree.TypeNode>,\n    target: TupleWrappedGuardTarget\n): boolean => {\n    switch (target) {\n        case \"never\": {\n            return node.type === AST_NODE_TYPES.TSNeverKeyword;\n        }\n        case \"null\": {\n            return node.type === AST_NODE_TYPES.TSNullKeyword;\n        }\n        case \"undefined\": {\n            return node.type === AST_NODE_TYPES.TSUndefinedKeyword;\n        }\n        default: {\n            return assertNever(target);\n        }\n    }\n};\n\n/**\n * Determine whether a conditional type has exact `true` then `false` branches.\n */\nexport const hasTrueFalseBranches = (\n    node: Readonly<TSESTree.TSConditionalType>\n): boolean =>\n    isBooleanLiteralType(node.trueType, true) &&\n    isBooleanLiteralType(node.falseType, false);\n\n/**\n * Determine whether a conditional type has exact `false` then `true` branches.\n */\nexport const hasFalseTrueBranches = (\n    node: Readonly<TSESTree.TSConditionalType>\n): boolean =>\n    isBooleanLiteralType(node.trueType, false) &&\n    isBooleanLiteralType(node.falseType, true);\n\nconst getNoInferTypeArgument = (\n    node: Readonly<TSESTree.TypeNode>\n): TSESTree.TypeNode | undefined => {\n    if (\n        node.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.typeName.name !== \"NoInfer\"\n    ) {\n        return undefined;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n\n    return typeArguments?.length === 1 ? arrayFirst(typeArguments) : undefined;\n};\n\n/**\n * Extract `T` from `[T] extends [Target] ? true : false`.\n */\nexport const getTupleWrappedTypeGuardInput = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    target: TupleWrappedGuardTarget\n): TSESTree.TypeNode | undefined => {\n    if (!hasTrueFalseBranches(node)) {\n        return undefined;\n    }\n\n    const checkedType = getSingleTupleElementType(node.checkType);\n    const extendsType = getSingleTupleElementType(node.extendsType);\n\n    if (\n        !checkedType ||\n        !extendsType ||\n        !isTargetKeywordType(extendsType, target)\n    ) {\n        return undefined;\n    }\n\n    return checkedType;\n};\n\n/**\n * Extract `T` from `0 extends 1 & T ? true : false`.\n */\nexport const getIsAnyTypeGuardInput = (\n    node: Readonly<TSESTree.TSConditionalType>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !hasTrueFalseBranches(node) ||\n        !isNumericLiteralType(node.checkType, 0) ||\n        node.extendsType.type !== AST_NODE_TYPES.TSIntersectionType ||\n        node.extendsType.types.length !== 2\n    ) {\n        return undefined;\n    }\n\n    const [leftType, rightType] = node.extendsType.types;\n\n    if (!leftType || !rightType || !isNumericLiteralType(leftType, 1)) {\n        return undefined;\n    }\n\n    return getNoInferTypeArgument(rightType) ?? rightType;\n};\n\n/**\n * Extract `T` from `number extends T[\"length\"] ? false : true`.\n */\nexport const getIsTupleTypeGuardInput = (\n    node: Readonly<TSESTree.TSConditionalType>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !hasFalseTrueBranches(node) ||\n        node.checkType.type !== AST_NODE_TYPES.TSNumberKeyword ||\n        node.extendsType.type !== AST_NODE_TYPES.TSIndexedAccessType\n    ) {\n        return undefined;\n    }\n\n    const indexType = node.extendsType.indexType;\n\n    return indexType.type === AST_NODE_TYPES.TSLiteralType &&\n        indexType.literal.type === AST_NODE_TYPES.Literal &&\n        indexType.literal.value === \"length\"\n        ? node.extendsType.objectType\n        : undefined;\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * Shared rule factory for `prefer-type-fest-has-*keys` rule modules.\n */\nimport { getHasKeysInputType } from \"./has-keys-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"./imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"./module-source.js\";\nimport { reportWithOptionalFix } from \"./rule-reporting.js\";\nimport { createTypedRule } from \"./typed-rule.js\";\n\ntype HasKeysRuleOptions = Readonly<{\n    hasKeysTypeName: string;\n    keysOfTypeName: string;\n    messageId: string;\n    ruleName: `prefer-type-fest-has-${string}-keys`;\n}>;\n\nconst toKeyKind = (keysOfTypeName: string): string => {\n    switch (keysOfTypeName) {\n        case \"OptionalKeysOf\": {\n            return \"optional\";\n        }\n        case \"ReadonlyKeysOf\": {\n            return \"readonly\";\n        }\n        case \"RequiredKeysOf\": {\n            return \"required\";\n        }\n        case \"WritableKeysOf\": {\n            return \"writable\";\n        }\n        default: {\n            return \"matching\";\n        }\n    }\n};\n\n/**\n * Create a rule that replaces `KeysOf<T> extends never ? false : true` with the\n * matching TypeFest `Has*Keys<T>` type.\n */\nexport const createPreferTypeFestHasKeysRule = ({\n    hasKeysTypeName,\n    keysOfTypeName,\n    messageId,\n    ruleName,\n}: HasKeysRuleOptions): ReturnType<typeof createTypedRule> => {\n    const keyKind = toKeyKind(keysOfTypeName);\n\n    return createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const keysOfLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                keysOfTypeName\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const inputType = getHasKeysInputType(\n                        node,\n                        keysOfLocalNames,\n                        typeFestNamespaceImportNames,\n                        keysOfTypeName\n                    );\n\n                    if (!inputType) {\n                        return;\n                    }\n\n                    const inputTypeText = context.sourceCode.getText(inputType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        hasKeysTypeName,\n                        `${hasKeysTypeName}<${inputTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId,\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description: `require TypeFest ${hasKeysTypeName} over ${keysOfTypeName}<T> emptiness checks.`,\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: `https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/${ruleName}`,\n            },\n            fixable: \"code\",\n            messages: {\n                [messageId]: `Prefer \\`${hasKeysTypeName}<T>\\` from type-fest over \\`${keysOfTypeName}<T> extends never ? false : true\\` ${keyKind}-key checks.`,\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: ruleName,\n    });\n};\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-has-optional-keys`.\n */\nimport { createPreferTypeFestHasKeysRule } from \"../_internal/prefer-type-fest-has-keys-rule.js\";\n\n/** ESLint rule definition for `prefer-type-fest-has-optional-keys`. */\nconst preferTypeFestHasOptionalKeysRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestHasKeysRule({\n    hasKeysTypeName: \"HasOptionalKeys\",\n    keysOfTypeName: \"OptionalKeysOf\",\n    messageId: \"preferHasOptionalKeys\",\n    ruleName: \"prefer-type-fest-has-optional-keys\",\n});\n\nexport default preferTypeFestHasOptionalKeysRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-has-readonly-keys`.\n */\nimport { createPreferTypeFestHasKeysRule } from \"../_internal/prefer-type-fest-has-keys-rule.js\";\n\n/** ESLint rule definition for `prefer-type-fest-has-readonly-keys`. */\nconst preferTypeFestHasReadonlyKeysRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestHasKeysRule({\n    hasKeysTypeName: \"HasReadonlyKeys\",\n    keysOfTypeName: \"ReadonlyKeysOf\",\n    messageId: \"preferHasReadonlyKeys\",\n    ruleName: \"prefer-type-fest-has-readonly-keys\",\n});\n\nexport default preferTypeFestHasReadonlyKeysRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-has-required-keys`.\n */\nimport { createPreferTypeFestHasKeysRule } from \"../_internal/prefer-type-fest-has-keys-rule.js\";\n\n/** ESLint rule definition for `prefer-type-fest-has-required-keys`. */\nconst preferTypeFestHasRequiredKeysRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestHasKeysRule({\n    hasKeysTypeName: \"HasRequiredKeys\",\n    keysOfTypeName: \"RequiredKeysOf\",\n    messageId: \"preferHasRequiredKeys\",\n    ruleName: \"prefer-type-fest-has-required-keys\",\n});\n\nexport default preferTypeFestHasRequiredKeysRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-has-writable-keys`.\n */\nimport { createPreferTypeFestHasKeysRule } from \"../_internal/prefer-type-fest-has-keys-rule.js\";\n\n/** ESLint rule definition for `prefer-type-fest-has-writable-keys`. */\nconst preferTypeFestHasWritableKeysRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestHasKeysRule({\n    hasKeysTypeName: \"HasWritableKeys\",\n    keysOfTypeName: \"WritableKeysOf\",\n    messageId: \"preferHasWritableKeys\",\n    ruleName: \"prefer-type-fest-has-writable-keys\",\n});\n\nexport default preferTypeFestHasWritableKeysRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-if`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Deprecated `If*` aliases mapped to preferred `Is*` counterparts. */\nconst ifAliasReplacements = {\n    IfAny: \"IsAny\",\n    IfEmptyObject: \"IsEmptyObject\",\n    IfNever: \"IsNever\",\n    IfNull: \"IsNull\",\n    IfUnknown: \"IsUnknown\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-if`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestIfRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                ifAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferTypeFestIf\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest If + Is* utilities over deprecated If* aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-if\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTypeFestIf:\n                    \"`{{alias}}` is deprecated in type-fest. Prefer `If` combined with `{{replacement}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-if\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-if` rule module.\n */\nexport default preferTypeFestIfRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-any`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { getIsAnyTypeGuardInput } from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsAny\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-is-any`. */\nconst preferTypeFestIsAnyRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getIsAnyTypeGuardInput(node);\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsAny\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsAny over manual `0 extends 1 & T` conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-any\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsAny:\n                    \"Prefer `IsAny<T>` from type-fest over manual `0 extends 1 & T` conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-any\",\n    });\n\nexport default preferTypeFestIsAnyRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-never`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { getTupleWrappedTypeGuardInput } from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsNever\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-is-never`. */\nconst preferTypeFestIsNeverRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getTupleWrappedTypeGuardInput(\n                        node,\n                        \"never\"\n                    );\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsNever\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsNever over manual tuple-wrapped never conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-never\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsNever:\n                    \"Prefer `IsNever<T>` from type-fest over manual tuple-wrapped never conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-never\",\n    });\n\nexport default preferTypeFestIsNeverRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-null`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { getTupleWrappedTypeGuardInput } from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsNull\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-is-null`. */\nconst preferTypeFestIsNullRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getTupleWrappedTypeGuardInput(\n                        node,\n                        \"null\"\n                    );\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsNull\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsNull over manual tuple-wrapped null conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-null\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsNull:\n                    \"Prefer `IsNull<T>` from type-fest over manual tuple-wrapped null conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-null\",\n    });\n\nexport default preferTypeFestIsNullRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-nullable`.\n */\nimport { arrayFirst } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport {\n    hasFalseTrueBranches,\n    isBooleanLiteralType,\n} from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst EXTRACT_TYPE_NAME = \"Extract\" as const;\nconst IS_ANY_TYPE_NAME = \"IsAny\" as const;\nconst TYPE_NAME = \"IsNullable\" as const;\n\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): TSESTree.TypeNode | undefined => {\n    const typeArguments = node.typeArguments?.params;\n\n    return typeArguments?.length === 1 ? arrayFirst(typeArguments) : undefined;\n};\n\nconst isNumericLiteralType = (\n    node: Readonly<TSESTree.TypeNode>,\n    value: number\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === value;\n\nconst isDirectTypeFestIsAnyReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    isAnyLocalNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(isAnyLocalNames, node.typeName.name);\n\nconst isNamespaceTypeFestIsAnyReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.TSQualifiedName &&\n    node.typeName.left.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(typeFestNamespaceImportNames, node.typeName.left.name) &&\n    node.typeName.right.name === IS_ANY_TYPE_NAME;\n\nconst getImportedIsAnyCheckInput = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    isAnyLocalNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !isBooleanLiteralType(node.extendsType, true) ||\n        node.checkType.type !== AST_NODE_TYPES.TSTypeReference ||\n        (!isDirectTypeFestIsAnyReference(node.checkType, isAnyLocalNames) &&\n            !isNamespaceTypeFestIsAnyReference(\n                node.checkType,\n                typeFestNamespaceImportNames\n            ))\n    ) {\n        return undefined;\n    }\n\n    return getSingleTypeArgument(node.checkType);\n};\n\nconst getManualIsAnyCheckInput = (\n    node: Readonly<TSESTree.TSConditionalType>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !isNumericLiteralType(node.checkType, 0) ||\n        node.extendsType.type !== AST_NODE_TYPES.TSIntersectionType ||\n        node.extendsType.types.length !== 2\n    ) {\n        return undefined;\n    }\n\n    const [leftType, rightType] = node.extendsType.types;\n\n    if (!leftType || !rightType || !isNumericLiteralType(leftType, 1)) {\n        return undefined;\n    }\n\n    return rightType;\n};\n\nconst getExtractNullCheckInput = (\n    node: Readonly<TSESTree.TSConditionalType>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !hasFalseTrueBranches(node) ||\n        node.extendsType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        node.checkType.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.checkType.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.checkType.typeName.name !== EXTRACT_TYPE_NAME\n    ) {\n        return undefined;\n    }\n\n    const typeArguments = node.checkType.typeArguments?.params;\n    const [inputType, extractedType] = typeArguments ?? [];\n\n    if (\n        typeArguments?.length !== 2 ||\n        !inputType ||\n        extractedType?.type !== AST_NODE_TYPES.TSNullKeyword\n    ) {\n        return undefined;\n    }\n\n    return inputType;\n};\n\nconst getIsNullableTypeGuardInput = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    isAnyLocalNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>\n): TSESTree.TypeNode | undefined => {\n    if (\n        !isBooleanLiteralType(node.trueType, true) ||\n        node.falseType.type !== AST_NODE_TYPES.TSConditionalType\n    ) {\n        return undefined;\n    }\n\n    const outerInput =\n        getImportedIsAnyCheckInput(\n            node,\n            isAnyLocalNames,\n            typeFestNamespaceImportNames\n        ) ?? getManualIsAnyCheckInput(node);\n    const innerInput = getExtractNullCheckInput(node.falseType);\n\n    if (\n        !outerInput ||\n        !innerInput ||\n        !areEquivalentTypeNodes(outerInput, innerInput)\n    ) {\n        return undefined;\n    }\n\n    return outerInput;\n};\n\n/** ESLint rule definition for `prefer-type-fest-is-nullable`. */\nconst preferTypeFestIsNullableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const isAnyLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                IS_ANY_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getIsNullableTypeGuardInput(\n                        node,\n                        isAnyLocalNames,\n                        typeFestNamespaceImportNames\n                    );\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsNullable\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsNullable over equivalent any-safe nullable conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-nullable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsNullable:\n                    \"Prefer `IsNullable<T>` from type-fest over equivalent any-safe nullable conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-nullable\",\n    });\n\nexport default preferTypeFestIsNullableRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-tuple`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { getIsTupleTypeGuardInput } from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsTuple\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-is-tuple`. */\nconst preferTypeFestIsTupleRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getIsTupleTypeGuardInput(node);\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsTuple\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsTuple over manual length-based tuple conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-tuple\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsTuple:\n                    \"Prefer `IsTuple<T>` from type-fest over manual length-based tuple conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-tuple\",\n    });\n\nexport default preferTypeFestIsTupleRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-undefined`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { getTupleWrappedTypeGuardInput } from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsUndefined\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-is-undefined`. */\nconst preferTypeFestIsUndefinedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getTupleWrappedTypeGuardInput(\n                        node,\n                        \"undefined\"\n                    );\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsUndefined\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsUndefined over manual tuple-wrapped undefined conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-undefined\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsUndefined:\n                    \"Prefer `IsUndefined<T>` from type-fest over manual tuple-wrapped undefined conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-undefined\",\n    });\n\nexport default preferTypeFestIsUndefinedRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-is-unknown`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    getSingleTupleElementType,\n    hasFalseTrueBranches,\n} from \"../_internal/type-guard-conditional-patterns.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst TYPE_NAME = \"IsUnknown\" as const;\n\nconst getIsUnknownTypeGuardInput = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    sourceCode: Readonly<TSESLint.SourceCode>\n): TSESTree.TypeNode | undefined => {\n    if (\n        node.checkType.type !== AST_NODE_TYPES.TSUnknownKeyword ||\n        node.trueType.type !== AST_NODE_TYPES.TSConditionalType ||\n        !hasFalseTrueBranches(node.trueType) ||\n        node.falseType.type !== AST_NODE_TYPES.TSLiteralType ||\n        node.falseType.literal.type !== AST_NODE_TYPES.Literal ||\n        node.falseType.literal.value !== false\n    ) {\n        return undefined;\n    }\n\n    const innerCheckedType = getSingleTupleElementType(node.trueType.checkType);\n    const innerExtendsType = getSingleTupleElementType(\n        node.trueType.extendsType\n    );\n\n    if (!innerCheckedType) {\n        return undefined;\n    }\n\n    if (\n        innerExtendsType?.type !== AST_NODE_TYPES.TSNullKeyword ||\n        sourceCode.getText(innerCheckedType) !==\n            sourceCode.getText(node.extendsType)\n    ) {\n        return undefined;\n    }\n\n    return node.extendsType;\n};\n\n/** ESLint rule definition for `prefer-type-fest-is-unknown`. */\nconst preferTypeFestIsUnknownRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const checkedType = getIsUnknownTypeGuardInput(\n                        node,\n                        context.sourceCode\n                    );\n\n                    if (!checkedType) {\n                        return;\n                    }\n\n                    const checkedTypeText =\n                        context.sourceCode.getText(checkedType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        TYPE_NAME,\n                        `${TYPE_NAME}<${checkedTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferIsUnknown\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IsUnknown over manual unknown conditional type guards.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-is-unknown\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIsUnknown:\n                    \"Prefer `IsUnknown<T>` from type-fest over manual unknown conditional type guards.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-is-unknown\",\n    });\n\nexport default preferTypeFestIsUnknownRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-iterable-element`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst iterableElementAliasReplacements = {\n    SetElement: \"IterableElement\",\n    SetEntry: \"IterableElement\",\n    SetValues: \"IterableElement\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-iterable-element`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestIterableElementRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                iterableElementAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferIterableElement\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest IterableElement over imported aliases such as SetElement/SetEntry/SetValues.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-iterable-element\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferIterableElement:\n                    \"Prefer `{{replacement}}` from type-fest to extract element types from iterable containers instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-iterable-element\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-iterable-element` rule module.\n */\nexport default preferTypeFestIterableElementRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-json-array`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Built-in generic array type name. */\nconst ARRAY_TYPE_NAME = \"Array\";\n\n/** TypeFest JSON value alias used by supported union patterns. */\nconst JSON_VALUE_TYPE_NAME = \"JsonValue\";\n\n/** Built-in readonly generic array type name. */\nconst READONLY_ARRAY_TYPE_NAME = \"ReadonlyArray\";\n\nconst isSingleTypeNodeTuple = (\n    nodes: readonly TSESTree.TypeNode[] | undefined\n): nodes is readonly [TSESTree.TypeNode] => nodes?.length === 1;\n\nconst isTypeNodePair = (\n    nodes: readonly TSESTree.TypeNode[]\n): nodes is readonly [TSESTree.TypeNode, TSESTree.TypeNode] =>\n    nodes.length === 2;\n\n/**\n * Checks whether a node references `JsonValue`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is the identifier type reference `JsonValue`.\n */\n\nconst isJsonValueType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isIdentifierTypeReference(node, JSON_VALUE_TYPE_NAME);\n\n/**\n * Checks whether a node is `JsonValue[]`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is an array type whose element type is\n *   `JsonValue`.\n */\n\nconst isJsonValueArrayType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSArrayType &&\n    isJsonValueType(node.elementType);\n\n/**\n * Checks whether a node is `readonly JsonValue[]`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is a readonly type operator wrapping a\n *   `JsonValue[]` array.\n */\n\nconst isReadonlyJsonValueArrayType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    if (\n        node.type !== AST_NODE_TYPES.TSTypeOperator ||\n        node.operator !== \"readonly\"\n    ) {\n        return false;\n    }\n\n    const { typeAnnotation } = node;\n    if (typeAnnotation?.type !== AST_NODE_TYPES.TSArrayType) {\n        return false;\n    }\n\n    return isJsonValueType(typeAnnotation.elementType);\n};\n\n/**\n * Checks whether a node is `Array<JsonValue>`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is the generic `Array` reference with\n *   `JsonValue` as its single type argument.\n */\n\nconst isGenericJsonValueArrayType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    if (!isIdentifierTypeReference(node, ARRAY_TYPE_NAME)) {\n        return false;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n    if (!isSingleTypeNodeTuple(typeArguments)) {\n        return false;\n    }\n\n    const [firstTypeArgument] = typeArguments;\n\n    return isJsonValueType(firstTypeArgument);\n};\n\n/**\n * Checks whether a node is `ReadonlyArray<JsonValue>`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is the generic `ReadonlyArray` reference with\n *   `JsonValue` as its single type argument.\n */\n\nconst isGenericReadonlyJsonValueArrayType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    if (!isIdentifierTypeReference(node, READONLY_ARRAY_TYPE_NAME)) {\n        return false;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n    if (!isSingleTypeNodeTuple(typeArguments)) {\n        return false;\n    }\n\n    const [firstTypeArgument] = typeArguments;\n\n    return isJsonValueType(firstTypeArgument);\n};\n\n/**\n * Determines whether a union matches one of the explicit JSON array forms this\n * rule can replace.\n *\n * @param node - Union node to inspect.\n *\n * @returns `true` for two-member unions equivalent to either JsonValue[] |\n *   readonly JsonValue[]`or`Array<JsonValue> | ReadonlyArray<JsonValue>.\n */\n\nconst hasJsonArrayUnionShape = (\n    node: Readonly<TSESTree.TSUnionType>\n): boolean => {\n    if (!isTypeNodePair(node.types)) {\n        return false;\n    }\n\n    const [firstType, secondType] = node.types;\n\n    const isNativePair = (\n        leftType: Readonly<TSESTree.TypeNode>,\n        rightType: Readonly<TSESTree.TypeNode>\n    ): boolean =>\n        isJsonValueArrayType(leftType) &&\n        isReadonlyJsonValueArrayType(rightType);\n    const isGenericPair = (\n        leftType: Readonly<TSESTree.TypeNode>,\n        rightType: Readonly<TSESTree.TypeNode>\n    ): boolean =>\n        isGenericJsonValueArrayType(leftType) &&\n        isGenericReadonlyJsonValueArrayType(rightType);\n\n    if (\n        isNativePair(firstType, secondType) ||\n        isNativePair(secondType, firstType)\n    ) {\n        return true;\n    }\n\n    return (\n        isGenericPair(firstType, secondType) ||\n        isGenericPair(secondType, firstType)\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-json-array`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestJsonArrayRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    if (!hasJsonArrayUnionShape(node)) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeReplacementFix(\n                        node,\n                        \"JsonArray\",\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferJsonArray\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest JsonArray over explicit JsonValue[] | readonly JsonValue[] style unions.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-array\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferJsonArray:\n                    \"Prefer `JsonArray` from type-fest over explicit JsonValue array unions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-json-array\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-json-array` rule module.\n */\nexport default preferTypeFestJsonArrayRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-json-object`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** TypeFest JSON value alias used in equivalent object shapes. */\nconst JSON_VALUE_TYPE_NAME = \"JsonValue\";\n\n/** Built-in object utility type used by explicit JSON object aliases. */\nconst RECORD_TYPE_NAME = \"Record\";\n\nconst isTypeNodePair = (\n    nodes: readonly TSESTree.TypeNode[] | undefined\n): nodes is readonly [TSESTree.TypeNode, TSESTree.TypeNode] =>\n    nodes?.length === 2;\n\n/**\n * Checks whether a type node represents a string index key.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` for `string` keyword nodes and literal `'string'` aliases.\n */\n\nconst isStringKeyType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSStringKeyword ||\n    (node.type === AST_NODE_TYPES.TSLiteralType &&\n        node.literal.type === AST_NODE_TYPES.Literal &&\n        node.literal.value === \"string\");\n\n/**\n * Checks whether a node references `JsonValue`.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is the identifier type reference `JsonValue`.\n */\n\nconst isJsonValueType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isIdentifierTypeReference(node, JSON_VALUE_TYPE_NAME);\n\n/**\n * Detects `Record<string, JsonValue>` style aliases.\n *\n * @param node - Type reference to inspect.\n *\n * @returns `true` when the node is a two-argument `Record` whose key type is\n *   string and value type is `JsonValue`.\n */\n\nconst isRecordJsonValueReference = (\n    node: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    if (!isIdentifierTypeReference(node, RECORD_TYPE_NAME)) {\n        return false;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n    if (!isTypeNodePair(typeArguments)) {\n        return false;\n    }\n\n    const [keyType, valueType] = typeArguments;\n\n    return isStringKeyType(keyType) && isJsonValueType(valueType);\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-json-object`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestJsonObjectRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (!isRecordJsonValueReference(node)) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeReplacementFix(\n                        node,\n                        \"JsonObject\",\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferJsonObject\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest JsonObject over equivalent Record<string, JsonValue> object aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-object\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferJsonObject:\n                    \"Prefer `JsonObject` from type-fest over equivalent explicit JSON-object type shapes.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-json-object\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-json-object` rule module.\n */\nexport default preferTypeFestJsonObjectRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-json-primitive`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Narrows a type node to JSON-primitive keyword members.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` when the node is one of `boolean`, `null`, `number`, or\n *   `string` keyword types.\n */\n\nconst isJsonPrimitiveKeywordNode = (\n    node: Readonly<TSESTree.TypeNode>\n): node is\n    | TSESTree.TSBooleanKeyword\n    | TSESTree.TSNullKeyword\n    | TSESTree.TSNumberKeyword\n    | TSESTree.TSStringKeyword =>\n    node.type === AST_NODE_TYPES.TSBooleanKeyword ||\n    node.type === AST_NODE_TYPES.TSNullKeyword ||\n    node.type === AST_NODE_TYPES.TSNumberKeyword ||\n    node.type === AST_NODE_TYPES.TSStringKeyword;\n\n/**\n * Detects explicit JSON primitive unions that can be replaced with\n * `JsonPrimitive`.\n *\n * @param node - Union node to inspect.\n *\n * @returns `true` when the union contains exactly the four JSON primitive\n *   keyword members, regardless of order.\n */\n\nconst hasJsonPrimitiveUnionShape = (\n    node: Readonly<TSESTree.TSUnionType>\n): boolean => {\n    if (node.types.length !== 4) {\n        return false;\n    }\n\n    let hasBoolean = false;\n    let hasNull = false;\n    let hasNumber = false;\n    let hasString = false;\n\n    for (const typeNode of node.types) {\n        if (!isJsonPrimitiveKeywordNode(typeNode)) {\n            return false;\n        }\n\n        if (typeNode.type === AST_NODE_TYPES.TSBooleanKeyword) {\n            hasBoolean = true;\n            continue;\n        }\n\n        if (typeNode.type === AST_NODE_TYPES.TSNullKeyword) {\n            hasNull = true;\n            continue;\n        }\n\n        if (typeNode.type === AST_NODE_TYPES.TSNumberKeyword) {\n            hasNumber = true;\n            continue;\n        }\n\n        hasString = true;\n    }\n\n    return hasBoolean && hasNull && hasNumber && hasString;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-json-primitive`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestJsonPrimitiveRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    if (!hasJsonPrimitiveUnionShape(node)) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeReplacementFix(\n                        node,\n                        \"JsonPrimitive\",\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferJsonPrimitive\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest JsonPrimitive over explicit null|boolean|number|string unions.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-primitive\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferJsonPrimitive:\n                    \"Prefer `JsonPrimitive` from type-fest over explicit primitive JSON keyword unions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-json-primitive\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-json-primitive` rule module.\n */\nexport default preferTypeFestJsonPrimitiveRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-json-value`.\n */\nimport { isDefined } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport {\n    reportWithOptionalFix,\n    reportWithTypefestPolicy,\n} from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Checks whether a key type is compatible with string-indexed JSON records.\n *\n * @param node - Type node to inspect.\n *\n * @returns `true` for `string` keyword and `'string'` literal key aliases.\n */\nconst isStringLikeKeyType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSStringKeyword ||\n    (node.type === AST_NODE_TYPES.TSLiteralType &&\n        node.literal.type === AST_NODE_TYPES.Literal &&\n        node.literal.value === \"string\");\n\n/**\n * Detects `Record<string, unknown|any>` patterns targeted by this rule.\n *\n * @param typeNode - Type reference candidate.\n *\n * @returns `true` when the type reference matches a string-keyed record with\n *   `unknown` or `any` value type.\n */\nconst isRecordLikeUnknownOrAny = (\n    typeNode: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    if (\n        typeNode.typeName.type !== AST_NODE_TYPES.Identifier ||\n        typeNode.typeName.name !== \"Record\" ||\n        typeNode.typeArguments?.params.length !== 2\n    ) {\n        return false;\n    }\n\n    const [keyType, valueType] = typeNode.typeArguments.params;\n\n    return (\n        isDefined(keyType) &&\n        isDefined(valueType) &&\n        isStringLikeKeyType(keyType) &&\n        (valueType.type === AST_NODE_TYPES.TSUnknownKeyword ||\n            valueType.type === AST_NODE_TYPES.TSAnyKeyword)\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-json-value`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestJsonValueRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (!isRecordLikeUnknownOrAny(node)) {\n                        return;\n                    }\n\n                    const jsonObjectSuggestionFix =\n                        createSafeTypeNodeReplacementFix(\n                            node,\n                            \"JsonObject\",\n                            typeFestDirectImports,\n                            TYPE_FEST_MODULE_SOURCE,\n                            \"suggestion\"\n                        );\n\n                    if (jsonObjectSuggestionFix === null) {\n                        reportWithOptionalFix({\n                            context,\n                            fix: null,\n                            messageId: \"preferJsonValue\",\n                            node,\n                        });\n\n                        return;\n                    }\n\n                    reportWithTypefestPolicy({\n                        context,\n                        descriptor: {\n                            messageId: \"preferJsonValue\",\n                            node,\n                            suggest: [\n                                {\n                                    fix: jsonObjectSuggestionFix,\n                                    messageId: \"suggestJsonObject\",\n                                },\n                            ],\n                        },\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest JsonObject for string-keyed JSON record contract types in serialization boundaries.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-json-value\",\n            },\n            hasSuggestions: true,\n            messages: {\n                preferJsonValue:\n                    \"Use `JsonObject` from type-fest for string-keyed JSON record contracts in serialization boundaries instead of Record<string, unknown|any>.\",\n                suggestJsonObject:\n                    \"Replace with `JsonObject` from type-fest (review value constraints, this may narrow accepted shapes).\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-json-value\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-json-value` rule module.\n */\nexport default preferTypeFestJsonValueRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-keys-of-union`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst keysOfUnionAliasReplacements = {\n    AllKeys: \"KeysOfUnion\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-keys-of-union`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestKeysOfUnionRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                keysOfUnionAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferKeysOfUnion\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest KeysOfUnion over imported aliases such as AllKeys.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-keys-of-union\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferKeysOfUnion:\n                    \"Prefer `{{replacement}}` from type-fest to derive keys from union members instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-keys-of-union\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-keys-of-union` rule module.\n */\nexport default preferTypeFestKeysOfUnionRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-less-than-or-equal`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst GREATER_THAN_TYPE_NAME = \"GreaterThan\" as const;\nconst LESS_THAN_OR_EQUAL_TYPE_NAME = \"LessThanOrEqual\" as const;\n\nconst isLiteralBooleanType = (\n    node: Readonly<TSESTree.TypeNode>,\n    expectedBooleanValue: boolean\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === expectedBooleanValue;\n\nconst isFalseLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isLiteralBooleanType(node, false);\n\nconst isTrueLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isLiteralBooleanType(node, true);\n\ntype ComparatorTypeArgumentTexts = Readonly<{\n    leftTypeText: string;\n    rightTypeText: string;\n}>;\n\n/**\n * ESLint rule definition for `prefer-type-fest-less-than-or-equal`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestLessThanOrEqualRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const greaterThanLocalNames =\n                collectNamedImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE,\n                    GREATER_THAN_TYPE_NAME\n                );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const getComparatorTypeArgumentTexts = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): ComparatorTypeArgumentTexts | null => {\n                const typeArguments = typeReference.typeArguments?.params ?? [];\n                const [leftType, rightType] = typeArguments;\n\n                if (!leftType || !rightType || typeArguments.length !== 2) {\n                    return null;\n                }\n\n                return {\n                    leftTypeText: context.sourceCode.getText(leftType),\n                    rightTypeText: context.sourceCode.getText(rightType),\n                };\n            };\n\n            const isGreaterThanTypeReference = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): boolean => {\n                if (typeReference.typeName.type === AST_NODE_TYPES.Identifier) {\n                    return setContainsValue(\n                        greaterThanLocalNames,\n                        typeReference.typeName.name\n                    );\n                }\n\n                if (\n                    typeReference.typeName.type !==\n                    AST_NODE_TYPES.TSQualifiedName\n                ) {\n                    return false;\n                }\n\n                return (\n                    typeReference.typeName.left.type ===\n                        AST_NODE_TYPES.Identifier &&\n                    setContainsValue(\n                        typeFestNamespaceImportNames,\n                        typeReference.typeName.left.name\n                    ) &&\n                    typeReference.typeName.right.name === GREATER_THAN_TYPE_NAME\n                );\n            };\n\n            const getComparatorTypeArgumentTextsFromTypeNode = (\n                typeNode: Readonly<TSESTree.TypeNode>\n            ): ComparatorTypeArgumentTexts | null => {\n                if (typeNode.type !== AST_NODE_TYPES.TSTypeReference) {\n                    return null;\n                }\n\n                if (!isGreaterThanTypeReference(typeNode)) {\n                    return null;\n                }\n\n                return getComparatorTypeArgumentTexts(typeNode);\n            };\n\n            const getDirectLessThanOrEqualReplacement = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): ComparatorTypeArgumentTexts | null => {\n                const comparatorTypeArgumentTexts =\n                    getComparatorTypeArgumentTextsFromTypeNode(\n                        conditionalTypeNode.checkType\n                    );\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                if (\n                    !isTrueLiteralType(conditionalTypeNode.extendsType) ||\n                    !isFalseLiteralType(conditionalTypeNode.trueType) ||\n                    !isTrueLiteralType(conditionalTypeNode.falseType)\n                ) {\n                    return null;\n                }\n\n                return comparatorTypeArgumentTexts;\n            };\n\n            const getInferWrappedLessThanOrEqualReplacement = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): ComparatorTypeArgumentTexts | null => {\n                const comparatorTypeArgumentTexts =\n                    getComparatorTypeArgumentTextsFromTypeNode(\n                        conditionalTypeNode.checkType\n                    );\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                if (\n                    conditionalTypeNode.extendsType.type !==\n                        AST_NODE_TYPES.TSInferType ||\n                    conditionalTypeNode.falseType.type !==\n                        AST_NODE_TYPES.TSNeverKeyword ||\n                    conditionalTypeNode.trueType.type !==\n                        AST_NODE_TYPES.TSConditionalType\n                ) {\n                    return null;\n                }\n\n                const inferIdentifierName =\n                    conditionalTypeNode.extendsType.typeParameter.name.name;\n                const innerConditionalTypeNode = conditionalTypeNode.trueType;\n\n                if (\n                    innerConditionalTypeNode.checkType.type !==\n                        AST_NODE_TYPES.TSTypeReference ||\n                    innerConditionalTypeNode.checkType.typeName.type !==\n                        AST_NODE_TYPES.Identifier ||\n                    innerConditionalTypeNode.checkType.typeName.name !==\n                        inferIdentifierName ||\n                    innerConditionalTypeNode.checkType.typeArguments !==\n                        undefined ||\n                    !isTrueLiteralType(innerConditionalTypeNode.extendsType) ||\n                    !isFalseLiteralType(innerConditionalTypeNode.trueType) ||\n                    !isTrueLiteralType(innerConditionalTypeNode.falseType)\n                ) {\n                    return null;\n                }\n\n                return comparatorTypeArgumentTexts;\n            };\n\n            const getLessThanOrEqualReplacementText = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): null | string => {\n                const comparatorTypeArgumentTexts =\n                    getDirectLessThanOrEqualReplacement(conditionalTypeNode) ??\n                    getInferWrappedLessThanOrEqualReplacement(\n                        conditionalTypeNode\n                    );\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                return `${LESS_THAN_OR_EQUAL_TYPE_NAME}<${comparatorTypeArgumentTexts.leftTypeText}, ${comparatorTypeArgumentTexts.rightTypeText}>`;\n            };\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const replacementText =\n                        getLessThanOrEqualReplacementText(node);\n\n                    if (\n                        replacementText === null ||\n                        replacementText.length === 0\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        LESS_THAN_OR_EQUAL_TYPE_NAME,\n                        replacementText,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferLessThanOrEqual\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest LessThanOrEqual over `GreaterThan<A, B> extends true ? false : true` wrappers.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-less-than-or-equal\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferLessThanOrEqual:\n                    \"Prefer `LessThanOrEqual<A, B>` from type-fest over wrappers built from `GreaterThan<A, B>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-less-than-or-equal\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-less-than-or-equal` rule module.\n */\nexport default preferTypeFestLessThanOrEqualRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-less-than`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst GREATER_THAN_OR_EQUAL_TYPE_NAME = \"GreaterThanOrEqual\" as const;\nconst LESS_THAN_TYPE_NAME = \"LessThan\" as const;\n\nconst isLiteralBooleanType = (\n    node: Readonly<TSESTree.TypeNode>,\n    expectedBooleanValue: boolean\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === expectedBooleanValue;\n\nconst isFalseLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isLiteralBooleanType(node, false);\n\nconst isTrueLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    isLiteralBooleanType(node, true);\n\ntype ComparatorTypeArgumentTexts = Readonly<{\n    leftTypeText: string;\n    rightTypeText: string;\n}>;\n\n/**\n * ESLint rule definition for `prefer-type-fest-less-than`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestLessThanRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const greaterThanOrEqualLocalNames =\n                collectNamedImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE,\n                    GREATER_THAN_OR_EQUAL_TYPE_NAME\n                );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const getComparatorTypeArgumentTexts = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): ComparatorTypeArgumentTexts | null => {\n                const typeArguments = typeReference.typeArguments?.params ?? [];\n                const [leftType, rightType] = typeArguments;\n\n                if (!leftType || !rightType || typeArguments.length !== 2) {\n                    return null;\n                }\n\n                return {\n                    leftTypeText: context.sourceCode.getText(leftType),\n                    rightTypeText: context.sourceCode.getText(rightType),\n                };\n            };\n\n            const isGreaterThanOrEqualTypeReference = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): boolean => {\n                if (typeReference.typeName.type === AST_NODE_TYPES.Identifier) {\n                    return setContainsValue(\n                        greaterThanOrEqualLocalNames,\n                        typeReference.typeName.name\n                    );\n                }\n\n                if (\n                    typeReference.typeName.type !==\n                    AST_NODE_TYPES.TSQualifiedName\n                ) {\n                    return false;\n                }\n\n                return (\n                    typeReference.typeName.left.type ===\n                        AST_NODE_TYPES.Identifier &&\n                    setContainsValue(\n                        typeFestNamespaceImportNames,\n                        typeReference.typeName.left.name\n                    ) &&\n                    typeReference.typeName.right.name ===\n                        GREATER_THAN_OR_EQUAL_TYPE_NAME\n                );\n            };\n\n            const getComparatorTypeArgumentTextsFromTypeNode = (\n                typeNode: Readonly<TSESTree.TypeNode>\n            ): ComparatorTypeArgumentTexts | null => {\n                if (typeNode.type !== AST_NODE_TYPES.TSTypeReference) {\n                    return null;\n                }\n\n                if (!isGreaterThanOrEqualTypeReference(typeNode)) {\n                    return null;\n                }\n\n                return getComparatorTypeArgumentTexts(typeNode);\n            };\n\n            const getDirectLessThanReplacement = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): ComparatorTypeArgumentTexts | null => {\n                const comparatorTypeArgumentTexts =\n                    getComparatorTypeArgumentTextsFromTypeNode(\n                        conditionalTypeNode.checkType\n                    );\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                if (\n                    !isTrueLiteralType(conditionalTypeNode.extendsType) ||\n                    !isFalseLiteralType(conditionalTypeNode.trueType) ||\n                    !isTrueLiteralType(conditionalTypeNode.falseType)\n                ) {\n                    return null;\n                }\n\n                return comparatorTypeArgumentTexts;\n            };\n\n            const getInferWrappedLessThanReplacement = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): ComparatorTypeArgumentTexts | null => {\n                const comparatorTypeArgumentTexts =\n                    getComparatorTypeArgumentTextsFromTypeNode(\n                        conditionalTypeNode.checkType\n                    );\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                if (\n                    conditionalTypeNode.extendsType.type !==\n                        AST_NODE_TYPES.TSInferType ||\n                    conditionalTypeNode.falseType.type !==\n                        AST_NODE_TYPES.TSNeverKeyword ||\n                    conditionalTypeNode.trueType.type !==\n                        AST_NODE_TYPES.TSConditionalType\n                ) {\n                    return null;\n                }\n\n                const inferIdentifierName =\n                    conditionalTypeNode.extendsType.typeParameter.name.name;\n                const innerConditionalTypeNode = conditionalTypeNode.trueType;\n\n                if (\n                    innerConditionalTypeNode.checkType.type !==\n                        AST_NODE_TYPES.TSTypeReference ||\n                    innerConditionalTypeNode.checkType.typeName.type !==\n                        AST_NODE_TYPES.Identifier ||\n                    innerConditionalTypeNode.checkType.typeName.name !==\n                        inferIdentifierName ||\n                    innerConditionalTypeNode.checkType.typeArguments !==\n                        undefined ||\n                    !isTrueLiteralType(innerConditionalTypeNode.extendsType) ||\n                    !isFalseLiteralType(innerConditionalTypeNode.trueType) ||\n                    !isTrueLiteralType(innerConditionalTypeNode.falseType)\n                ) {\n                    return null;\n                }\n\n                return comparatorTypeArgumentTexts;\n            };\n\n            const getLessThanReplacementText = (\n                conditionalTypeNode: Readonly<TSESTree.TSConditionalType>\n            ): null | string => {\n                const comparatorTypeArgumentTexts =\n                    getDirectLessThanReplacement(conditionalTypeNode) ??\n                    getInferWrappedLessThanReplacement(conditionalTypeNode);\n\n                if (!comparatorTypeArgumentTexts) {\n                    return null;\n                }\n\n                return `${LESS_THAN_TYPE_NAME}<${comparatorTypeArgumentTexts.leftTypeText}, ${comparatorTypeArgumentTexts.rightTypeText}>`;\n            };\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const replacementText = getLessThanReplacementText(node);\n\n                    if (\n                        replacementText === null ||\n                        replacementText.length === 0\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        LESS_THAN_TYPE_NAME,\n                        replacementText,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferLessThan\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest LessThan over `GreaterThanOrEqual<A, B> extends true ? false : true` wrappers.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-less-than\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferLessThan:\n                    \"Prefer `LessThan<A, B>` from type-fest over wrappers built from `GreaterThanOrEqual<A, B>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-less-than\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-less-than` rule module.\n */\nexport default preferTypeFestLessThanRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-literal-union`.\n */\nimport { arrayFirst, arrayJoin, safeCastTo } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Primitive families supported by TypeFest `LiteralUnion`.\n */\ntype LiteralUnionFamily = \"bigint\" | \"boolean\" | \"number\" | \"string\";\n\n/**\n * Ordered family candidates evaluated when scanning union members.\n */\nconst literalUnionFamilies = [\n    \"bigint\",\n    \"boolean\",\n    \"number\",\n    \"string\",\n] as const satisfies readonly LiteralUnionFamily[];\n\n/**\n * Checks whether a union member is the primitive keyword for a family.\n *\n * @param node - Member node to inspect.\n * @param family - Primitive family currently being matched.\n *\n * @returns `true` when the node is the corresponding keyword type.\n */\nconst isKeywordMemberForFamily = (\n    node: Readonly<TSESTree.TypeNode>,\n    family: LiteralUnionFamily\n): boolean => {\n    if (family === \"bigint\") {\n        return node.type === AST_NODE_TYPES.TSBigIntKeyword;\n    }\n\n    if (family === \"boolean\") {\n        return node.type === AST_NODE_TYPES.TSBooleanKeyword;\n    }\n\n    if (family === \"number\") {\n        return node.type === AST_NODE_TYPES.TSNumberKeyword;\n    }\n\n    return node.type === AST_NODE_TYPES.TSStringKeyword;\n};\n\n/**\n * Checks whether a union member is a literal of the requested primitive family.\n *\n * @param node - Member node to inspect.\n * @param family - Primitive family currently being matched.\n *\n * @returns `true` when the node is a literal member compatible with the family\n *   (including bigint parser variants).\n */\nconst isLiteralMemberForFamily = (\n    node: Readonly<TSESTree.TypeNode>,\n    family: LiteralUnionFamily\n): boolean => {\n    if (\n        node.type !== AST_NODE_TYPES.TSLiteralType ||\n        node.literal.type !== AST_NODE_TYPES.Literal\n    ) {\n        return false;\n    }\n\n    if (family === \"bigint\") {\n        if (typeof node.literal.value === \"bigint\") {\n            return true;\n        }\n\n        const literalWithPotentialBigInt = safeCastTo<\n            TSESTree.Literal & {\n                readonly bigint?: unknown;\n            }\n        >(node.literal);\n\n        return typeof literalWithPotentialBigInt.bigint === \"string\";\n    }\n\n    if (family === \"boolean\") {\n        return typeof node.literal.value === \"boolean\";\n    }\n\n    if (family === \"number\") {\n        return typeof node.literal.value === \"number\";\n    }\n\n    return typeof node.literal.value === \"string\";\n};\n\n/**\n * Resolves which primitive family a replaceable literal union belongs to.\n *\n * @param node - Union node to inspect.\n *\n * @returns The matching family when the union has a `LiteralUnion`-compatible\n *   shape; otherwise `null`.\n */\nconst getLiteralUnionFamily = (\n    node: Readonly<TSESTree.TSUnionType>\n): LiteralUnionFamily | null => {\n    for (const family of literalUnionFamilies) {\n        let allMembersAreFamilyMembers = true;\n        let hasKeywordMember = false;\n        let hasLiteralMember = false;\n\n        for (const unionMember of node.types) {\n            if (isKeywordMemberForFamily(unionMember, family)) {\n                hasKeywordMember = true;\n                continue;\n            }\n\n            if (isLiteralMemberForFamily(unionMember, family)) {\n                hasLiteralMember = true;\n                continue;\n            }\n\n            allMembersAreFamilyMembers = false;\n            break;\n        }\n\n        if (\n            allMembersAreFamilyMembers &&\n            hasKeywordMember &&\n            hasLiteralMember\n        ) {\n            return family;\n        }\n    }\n\n    return null;\n};\n\n/**\n * Builds `LiteralUnion<...>` text for a matched family.\n *\n * @param sourceCode - Source code instance used to preserve original literal\n *   formatting.\n * @param node - Union node being replaced.\n * @param family - Primitive family for the replacement's second generic\n *   argument.\n *\n * @returns Replacement text when at least one literal member exists; otherwise\n *   `null`.\n */\nconst getLiteralUnionReplacementText = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    node: Readonly<TSESTree.TSUnionType>,\n    family: LiteralUnionFamily\n): null | string => {\n    const literalMembers = node.types.filter((member) =>\n        isLiteralMemberForFamily(member, family)\n    );\n\n    if (literalMembers.length === 0) {\n        return null;\n    }\n\n    const literalText =\n        literalMembers.length === 1\n            ? sourceCode.getText(arrayFirst(literalMembers))\n            : arrayJoin(\n                  literalMembers.map((member) => sourceCode.getText(member)),\n                  \" | \"\n              );\n\n    return `LiteralUnion<${literalText}, ${family}>`;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-literal-union`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestLiteralUnionRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    const family = getLiteralUnionFamily(node);\n\n                    if (!family) {\n                        return;\n                    }\n\n                    const replacementText = getLiteralUnionReplacementText(\n                        context.sourceCode,\n                        node,\n                        family\n                    );\n\n                    if (\n                        replacementText === null ||\n                        replacementText.length === 0\n                    ) {\n                        return;\n                    }\n\n                    const familyAtReportTime = getLiteralUnionFamily(node);\n                    if (familyAtReportTime !== family) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        \"LiteralUnion\",\n                        replacementText,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferLiteralUnion\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest LiteralUnion over unions that combine primitive keywords with same-family literal members.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-literal-union\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferLiteralUnion:\n                    \"Prefer `LiteralUnion<...>` from type-fest over unions that mix primitive keywords and same-family literal members.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-literal-union\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-literal-union` rule module.\n */\nexport default preferTypeFestLiteralUnionRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-merge-exclusive`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-merge-exclusive`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestMergeExclusiveRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        node.typeName.name !== \"XOR\"\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"MergeExclusive\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferMergeExclusive\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest MergeExclusive over `XOR` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-merge-exclusive\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferMergeExclusive:\n                    \"Prefer `MergeExclusive` from type-fest over `XOR`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-merge-exclusive\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-merge-exclusive` rule module.\n */\nexport default preferTypeFestMergeExclusiveRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-merge`.\n */\nimport { collectNamedImportLocalNamesFromSource } from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { unwrapParenthesizedTypeNode } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Detect whether an `Except<Destination, keyof Source>` reference is the left\n * side of a merge-style intersection.\n *\n * @param node - Candidate type reference.\n * @param siblingType - Sibling type from the same intersection.\n * @param exceptLocalNames - In-scope local names bound to `Except`.\n *\n * @returns `true` when the reference encodes the `Merge<Destination, Source>`\n *   pattern; otherwise `false`.\n */\nconst isMergeIntersectionExceptReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    siblingType: Readonly<TSESTree.TypeNode>,\n    exceptLocalNames: ReadonlySet<string>\n): boolean => {\n    if (\n        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n        !setContainsValue(exceptLocalNames, node.typeName.name)\n    ) {\n        return false;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [, omittedKeysType] = typeArguments;\n\n    if (omittedKeysType === undefined) {\n        return false;\n    }\n\n    const normalizedOmittedKeysType =\n        unwrapParenthesizedTypeNode(omittedKeysType);\n\n    if (\n        normalizedOmittedKeysType.type !== AST_NODE_TYPES.TSTypeOperator ||\n        normalizedOmittedKeysType.operator !== \"keyof\"\n    ) {\n        return false;\n    }\n\n    const keyedSourceType = normalizedOmittedKeysType.typeAnnotation;\n\n    if (keyedSourceType === undefined) {\n        return false;\n    }\n\n    return areEquivalentTypeNodes(\n        unwrapParenthesizedTypeNode(siblingType),\n        keyedSourceType\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-merge`.\n */\nconst preferTypeFestMergeRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const exceptLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                \"Except\"\n            );\n\n            return {\n                'TSIntersectionType > TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    const intersectionNode = node.parent;\n\n                    if (\n                        intersectionNode.type !==\n                            AST_NODE_TYPES.TSIntersectionType ||\n                        intersectionNode.types.length !== 2\n                    ) {\n                        return;\n                    }\n\n                    const [leftType, rightType] = intersectionNode.types;\n\n                    if (leftType === undefined || rightType === undefined) {\n                        return;\n                    }\n\n                    const siblingType =\n                        leftType === node ? rightType : leftType;\n\n                    if (\n                        !isMergeIntersectionExceptReference(\n                            node,\n                            siblingType,\n                            exceptLocalNames\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferMerge\",\n                        node: intersectionNode,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Merge over Except<Destination, keyof Source> & Source intersections.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-merge\",\n            },\n            messages: {\n                preferMerge:\n                    \"Prefer `Merge<Destination, Source>` from type-fest over `Except<Destination, keyof Source> & Source` when the second object cleanly overrides the first.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-merge\",\n    });\n\nexport default preferTypeFestMergeRule;\n", "import type { ArrayElement } from \"type-fest\";\n\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-non-empty-tuple`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFixPreservingReadonly,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Tuple rest annotation node variants accepted by the parser. */\ntype RestAnnotation = TSESTree.TSRestType[\"typeAnnotation\"];\n\n/** Individual tuple element node variants used in readonly tuple checks. */\ntype TupleElement = ArrayElement<TSESTree.TSTupleType[\"elementTypes\"]>;\n\n/**\n * Extracts the required head element type from a tuple member.\n *\n * @param element - Tuple element candidate.\n *\n * @returns The non-optional, non-rest head type node when present; otherwise\n *   `null`.\n */\n\nconst getRequiredTupleElementType = (\n    element: Readonly<TupleElement>\n): null | TSESTree.TypeNode => {\n    if (element.type === AST_NODE_TYPES.TSNamedTupleMember) {\n        if (element.optional) {\n            return null;\n        }\n\n        return element.elementType;\n    }\n\n    if (\n        element.type === AST_NODE_TYPES.TSOptionalType ||\n        element.type === AST_NODE_TYPES.TSRestType\n    ) {\n        return null;\n    }\n\n    return element;\n};\n\n/**\n * Normalizes rest annotations by unwrapping named tuple members.\n *\n * @param annotation - Rest annotation to normalize.\n *\n * @returns The underlying type node represented by the annotation.\n */\n\nconst unwrapRestAnnotation = (\n    annotation: Readonly<RestAnnotation>\n): null | TSESTree.TypeNode => {\n    if (annotation.type === AST_NODE_TYPES.TSNamedTupleMember) {\n        return annotation.elementType;\n    }\n\n    return annotation;\n};\n\n/**\n * Extracts `T` from rest elements shaped like `...T[]`.\n *\n * @param element - Tuple element candidate.\n *\n * @returns The array element type used by a rest tuple element; otherwise\n *   `null`.\n */\n\nconst getRestArrayElementType = (\n    element: Readonly<TupleElement>\n): null | TSESTree.TypeNode => {\n    if (element.type !== AST_NODE_TYPES.TSRestType) {\n        return null;\n    }\n\n    const restType = unwrapRestAnnotation(element.typeAnnotation);\n    if (restType?.type !== AST_NODE_TYPES.TSArrayType) {\n        return null;\n    }\n\n    return restType.elementType;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-non-empty-tuple`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestNonEmptyTupleRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const { sourceCode } = context;\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSTypeOperator(node) {\n                    if (node.operator !== \"readonly\") {\n                        return;\n                    }\n\n                    const tupleType = node.typeAnnotation;\n                    if (tupleType?.type !== AST_NODE_TYPES.TSTupleType) {\n                        return;\n                    }\n\n                    if (tupleType.elementTypes.length !== 2) {\n                        return;\n                    }\n\n                    const [firstElement, restElement] = tupleType.elementTypes;\n\n                    if (!firstElement || !restElement) {\n                        return;\n                    }\n\n                    const firstType = getRequiredTupleElementType(firstElement);\n                    if (!firstType) {\n                        return;\n                    }\n\n                    const restArrayElementType =\n                        getRestArrayElementType(restElement);\n                    if (!restArrayElementType) {\n                        return;\n                    }\n\n                    if (\n                        !areEquivalentTypeNodes(firstType, restArrayElementType)\n                    ) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeTypeNodeTextReplacementFixPreservingReadonly(\n                            node,\n                            \"NonEmptyTuple\",\n                            `NonEmptyTuple<${sourceCode.getText(firstType)}>`,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferNonEmptyTuple\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest NonEmptyTuple over readonly [T, ...T[]] tuple patterns.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-non-empty-tuple\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferNonEmptyTuple:\n                    \"Prefer `Readonly<NonEmptyTuple<T>>` from type-fest over `readonly [T, ...T[]]`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-non-empty-tuple\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-non-empty-tuple` rule module.\n */\nexport default preferTypeFestNonEmptyTupleRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-non-nullable-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-non-nullable-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestNonNullableDeepRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        node.typeName.name !== \"DeepNonNullable\"\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"NonNullableDeep\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferNonNullableDeep\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest `NonNullableDeep` over `DeepNonNullable` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-non-nullable-deep\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferNonNullableDeep:\n                    \"Prefer `NonNullableDeep` from type-fest over `DeepNonNullable`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-non-nullable-deep\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-non-nullable-deep` rule module.\n */\nexport default preferTypeFestNonNullableDeepRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-omit-index-signature`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst omitIndexSignatureAliasReplacements = {\n    RemoveIndexSignature: \"OmitIndexSignature\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-omit-index-signature`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestOmitIndexSignatureRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                omitIndexSignatureAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferOmitIndexSignature\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest OmitIndexSignature over imported aliases such as RemoveIndexSignature.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-omit-index-signature\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferOmitIndexSignature:\n                    \"Prefer `{{replacement}}` from type-fest to strip index signatures from object types instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-omit-index-signature\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-omit-index-signature` rule module.\n */\nexport default preferTypeFestOmitIndexSignatureRule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { assertNever } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * Shared rule factory for `prefer-type-fest-*keys-of` rule modules.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"./imported-type-aliases.js\";\nimport {\n    getExcludeKeyExtractionInputType,\n    getMappedKeyExtractionInputType,\n} from \"./key-extraction-type-patterns.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"./module-source.js\";\nimport { reportWithOptionalFix } from \"./rule-reporting.js\";\nimport { createTypedRule } from \"./typed-rule.js\";\n\ntype KeyExtractionPattern =\n    | Readonly<{\n          guardTypeName: string;\n          kind: \"mapped-guard\";\n      }>\n    | Readonly<{\n          keysOfTypeName: string;\n          kind: \"exclude-keys\";\n      }>;\n\ntype KeysOfRuleOptions = Readonly<{\n    keyKind: string;\n    messageId: string;\n    preferredTypeName: string;\n    ruleName: `prefer-type-fest-${string}-keys-of`;\n    sourcePattern: KeyExtractionPattern;\n}>;\n\nconst getSourceTypeName = (sourcePattern: KeyExtractionPattern): string => {\n    switch (sourcePattern.kind) {\n        case \"exclude-keys\": {\n            return sourcePattern.keysOfTypeName;\n        }\n        case \"mapped-guard\": {\n            return sourcePattern.guardTypeName;\n        }\n        default: {\n            return assertNever(sourcePattern);\n        }\n    }\n};\n\n/**\n * Create a rule that replaces exact TypeFest helper compositions with the\n * matching `*KeysOf<T>` type.\n */\nexport const createPreferTypeFestKeysOfRule = ({\n    keyKind,\n    messageId,\n    preferredTypeName,\n    ruleName,\n    sourcePattern,\n}: KeysOfRuleOptions): ReturnType<typeof createTypedRule> => {\n    const sourceTypeName = getSourceTypeName(sourcePattern);\n\n    return createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const sourceTypeLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                sourceTypeName\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            return {\n                TSConditionalType(node: Readonly<TSESTree.TSConditionalType>) {\n                    const inputType =\n                        sourcePattern.kind === \"mapped-guard\"\n                            ? getMappedKeyExtractionInputType(\n                                  node,\n                                  sourceTypeLocalNames,\n                                  typeFestNamespaceImportNames,\n                                  sourcePattern.guardTypeName,\n                                  context.sourceCode\n                              )\n                            : getExcludeKeyExtractionInputType(\n                                  node,\n                                  sourceTypeLocalNames,\n                                  typeFestNamespaceImportNames,\n                                  sourcePattern.keysOfTypeName,\n                                  context.sourceCode\n                              );\n\n                    if (!inputType) {\n                        return;\n                    }\n\n                    const inputTypeText = context.sourceCode.getText(inputType);\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        preferredTypeName,\n                        `${preferredTypeName}<${inputTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId,\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description: `require TypeFest ${preferredTypeName} over expanded ${keyKind}-key extraction helpers.`,\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: `https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/${ruleName}`,\n            },\n            fixable: \"code\",\n            messages: {\n                [messageId]: `Prefer \\`${preferredTypeName}<T>\\` from type-fest over expanded ${keyKind}-key extraction helpers.`,\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: ruleName,\n    });\n};\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * Shared AST pattern helpers for TypeFest `*KeysOf` extraction rules.\n */\nimport { setContainsValue } from \"./set-membership.js\";\nimport { isBooleanLiteralType } from \"./type-guard-conditional-patterns.js\";\n\nconst getSingleTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): TSESTree.TypeNode | undefined => {\n    const typeArguments = node.typeArguments?.params;\n\n    return typeArguments?.length === 1 ? arrayFirst(typeArguments) : undefined;\n};\n\nconst getTwoTypeArguments = (\n    node: Readonly<TSESTree.TSTypeReference>\n): readonly [TSESTree.TypeNode, TSESTree.TypeNode] | undefined => {\n    const typeArguments = node.typeArguments?.params;\n\n    if (typeArguments?.length !== 2) {\n        return undefined;\n    }\n\n    const [firstType, secondType] = typeArguments;\n\n    return firstType && secondType ? [firstType, secondType] : undefined;\n};\n\nconst isTypeTextEqual = (\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    leftNode: Readonly<TSESTree.TypeNode>,\n    rightNode: Readonly<TSESTree.TypeNode>\n): boolean => sourceCode.getText(leftNode) === sourceCode.getText(rightNode);\n\nconst isIdentifierTypeNamed = (\n    node: Readonly<TSESTree.TypeNode>,\n    name: string\n): boolean =>\n    node.type === AST_NODE_TYPES.TSTypeReference &&\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    node.typeName.name === name &&\n    node.typeArguments === undefined;\n\nconst isKeyofType = (\n    node: Readonly<TSESTree.TypeNode>,\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    inputType: Readonly<TSESTree.TypeNode>\n): boolean =>\n    node.type === AST_NODE_TYPES.TSTypeOperator &&\n    node.operator === \"keyof\" &&\n    node.typeAnnotation !== undefined &&\n    isTypeTextEqual(sourceCode, node.typeAnnotation, inputType);\n\nconst isDirectTypeReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    localNames: ReadonlySet<string>\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(localNames, node.typeName.name);\n\nconst isNamespaceTypeReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    importedTypeName: string\n): boolean =>\n    node.typeName.type === AST_NODE_TYPES.TSQualifiedName &&\n    node.typeName.left.type === AST_NODE_TYPES.Identifier &&\n    setContainsValue(typeFestNamespaceImportNames, node.typeName.left.name) &&\n    node.typeName.right.name === importedTypeName;\n\nconst isImportedTypeReference = (\n    node: Readonly<TSESTree.TSTypeReference>,\n    localNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    importedTypeName: string\n): boolean =>\n    isDirectTypeReference(node, localNames) ||\n    isNamespaceTypeReference(\n        node,\n        typeFestNamespaceImportNames,\n        importedTypeName\n    );\n\nconst getDistributedInputType = (\n    node: Readonly<TSESTree.TSConditionalType>\n): TSESTree.TypeNode | undefined =>\n    node.extendsType.type === AST_NODE_TYPES.TSUnknownKeyword &&\n    node.falseType.type === AST_NODE_TYPES.TSNeverKeyword\n        ? node.checkType\n        : undefined;\n\nconst getKeyofMappedTypeOperand = (\n    node: Readonly<TSESTree.TypeNode>\n): TSESTree.TSMappedType | undefined => {\n    const typeAnnotation =\n        node.type === AST_NODE_TYPES.TSTypeOperator && node.operator === \"keyof\"\n            ? node.typeAnnotation\n            : undefined;\n\n    return typeAnnotation?.type === AST_NODE_TYPES.TSMappedType\n        ? typeAnnotation\n        : undefined;\n};\n\nconst getMappedAndKeyofOperands = (\n    node: Readonly<TSESTree.TypeNode>,\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    inputType: Readonly<TSESTree.TypeNode>\n):\n    | Readonly<{\n          keyofInputType: TSESTree.TSTypeOperator;\n          mappedType: TSESTree.TSMappedType;\n      }>\n    | undefined => {\n    if (\n        node.type !== AST_NODE_TYPES.TSIntersectionType ||\n        node.types.length !== 2\n    ) {\n        return undefined;\n    }\n\n    const [firstType, secondType] = node.types;\n\n    if (!firstType || !secondType) {\n        return undefined;\n    }\n\n    const firstMappedType = getKeyofMappedTypeOperand(firstType);\n    if (\n        firstMappedType &&\n        isKeyofType(secondType, sourceCode, inputType) &&\n        secondType.type === AST_NODE_TYPES.TSTypeOperator\n    ) {\n        return {\n            keyofInputType: secondType,\n            mappedType: firstMappedType,\n        };\n    }\n\n    const secondMappedType = getKeyofMappedTypeOperand(secondType);\n    if (\n        secondMappedType &&\n        isKeyofType(firstType, sourceCode, inputType) &&\n        firstType.type === AST_NODE_TYPES.TSTypeOperator\n    ) {\n        return {\n            keyofInputType: firstType,\n            mappedType: secondMappedType,\n        };\n    }\n\n    return undefined;\n};\n\nconst isMatchingMappedKey = (\n    node: Readonly<TSESTree.TSMappedType>,\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    inputType: Readonly<TSESTree.TypeNode>\n): boolean =>\n    isKeyofType(node.constraint, sourceCode, inputType) &&\n    node.typeAnnotation?.type === AST_NODE_TYPES.TSNeverKeyword;\n\nconst isMatchingMappedKeyNameType = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    localGuardNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    guardTypeName: string,\n    sourceCode: Readonly<TSESLint.SourceCode>,\n    inputType: Readonly<TSESTree.TypeNode>,\n    mappedKeyName: string\n): boolean => {\n    if (\n        !isBooleanLiteralType(node.extendsType, false) ||\n        node.trueType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        !isIdentifierTypeNamed(node.falseType, mappedKeyName) ||\n        node.checkType.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isImportedTypeReference(\n            node.checkType,\n            localGuardNames,\n            typeFestNamespaceImportNames,\n            guardTypeName\n        )\n    ) {\n        return false;\n    }\n\n    const typeArguments = getTwoTypeArguments(node.checkType);\n\n    if (!typeArguments) {\n        return false;\n    }\n\n    const [inputArgument, keyArgument] = typeArguments;\n\n    return (\n        isTypeTextEqual(sourceCode, inputArgument, inputType) &&\n        isIdentifierTypeNamed(keyArgument, mappedKeyName)\n    );\n};\n\n/**\n * Extract `T` from TypeFest's canonical mapped-key extraction composition:\n *\n * A distributive conditional whose true branch intersects `keyof T` with a\n * mapped type filtered through the corresponding TypeFest key guard.\n */\nexport const getMappedKeyExtractionInputType = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    localGuardNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    guardTypeName: string,\n    sourceCode: Readonly<TSESLint.SourceCode>\n): TSESTree.TypeNode | undefined => {\n    const inputType = getDistributedInputType(node);\n\n    if (!inputType) {\n        return undefined;\n    }\n\n    const operands = getMappedAndKeyofOperands(\n        node.trueType,\n        sourceCode,\n        inputType\n    );\n\n    if (\n        !operands ||\n        !isMatchingMappedKey(operands.mappedType, sourceCode, inputType)\n    ) {\n        return undefined;\n    }\n\n    const mappedKeyName = operands.mappedType.key.name;\n    const nameType = operands.mappedType.nameType;\n\n    return nameType?.type === AST_NODE_TYPES.TSConditionalType &&\n        isMatchingMappedKeyNameType(\n            nameType,\n            localGuardNames,\n            typeFestNamespaceImportNames,\n            guardTypeName,\n            sourceCode,\n            inputType,\n            mappedKeyName\n        )\n        ? inputType\n        : undefined;\n};\n\n/**\n * Extract `T` from TypeFest's canonical exclusion-based key extraction\n * composition:\n *\n * `T extends unknown ? Exclude<keyof T, KeysOf<T>> : never`\n */\nexport const getExcludeKeyExtractionInputType = (\n    node: Readonly<TSESTree.TSConditionalType>,\n    localKeysOfNames: ReadonlySet<string>,\n    typeFestNamespaceImportNames: ReadonlySet<string>,\n    keysOfTypeName: string,\n    sourceCode: Readonly<TSESLint.SourceCode>\n): TSESTree.TypeNode | undefined => {\n    const inputType = getDistributedInputType(node);\n\n    if (\n        !inputType ||\n        node.trueType.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.trueType.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.trueType.typeName.name !== \"Exclude\"\n    ) {\n        return undefined;\n    }\n\n    const typeArguments = getTwoTypeArguments(node.trueType);\n\n    if (!typeArguments) {\n        return undefined;\n    }\n\n    const [keyofInputType, keysOfType] = typeArguments;\n\n    if (\n        !isKeyofType(keyofInputType, sourceCode, inputType) ||\n        keysOfType.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isImportedTypeReference(\n            keysOfType,\n            localKeysOfNames,\n            typeFestNamespaceImportNames,\n            keysOfTypeName\n        )\n    ) {\n        return undefined;\n    }\n\n    const keysOfInputType = getSingleTypeArgument(keysOfType);\n\n    return keysOfInputType &&\n        isTypeTextEqual(sourceCode, keysOfInputType, inputType)\n        ? inputType\n        : undefined;\n};\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-optional-keys-of`.\n */\nimport { createPreferTypeFestKeysOfRule } from \"../_internal/prefer-type-fest-keys-of-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-optional-keys-of`.\n */\nconst preferTypeFestOptionalKeysOfRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestKeysOfRule({\n    keyKind: \"optional\",\n    messageId: \"preferOptionalKeysOf\",\n    preferredTypeName: \"OptionalKeysOf\",\n    ruleName: \"prefer-type-fest-optional-keys-of\",\n    sourcePattern: {\n        guardTypeName: \"IsOptionalKeyOf\",\n        kind: \"mapped-guard\",\n    },\n});\n\nexport default preferTypeFestOptionalKeysOfRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\nimport { arrayAt, arrayFirst } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-optional`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst OPTIONAL_TYPE_NAME = \"Optional\" as const;\nconst EXCLUDE_TYPE_NAME = \"Exclude\" as const;\nconst NON_NULLABLE_TYPE_NAME = \"NonNullable\" as const;\n\nconst isNullKeywordType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSNullKeyword;\n\nconst isUndefinedKeywordType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSUndefinedKeyword;\n\nconst isNullishDeleteType = (node: Readonly<TSESTree.TypeNode>): boolean => {\n    if (isNullKeywordType(node)) {\n        return true;\n    }\n\n    if (node.type !== AST_NODE_TYPES.TSUnionType || node.types.length !== 2) {\n        return false;\n    }\n\n    let hasNull = false;\n    let hasUndefined = false;\n\n    for (const member of node.types) {\n        if (isNullKeywordType(member)) {\n            hasNull = true;\n            continue;\n        }\n\n        if (isUndefinedKeywordType(member)) {\n            hasUndefined = true;\n            continue;\n        }\n\n        return false;\n    }\n\n    return hasNull && hasUndefined;\n};\n\nconst getOptionalInnerTypeText = ({\n    sourceCode,\n    typeNode,\n}: Readonly<{\n    sourceCode: Readonly<TSESLint.SourceCode>;\n    typeNode: Readonly<TSESTree.TypeNode>;\n}>): null | string => {\n    if (\n        typeNode.type !== AST_NODE_TYPES.TSTypeReference ||\n        typeNode.typeName.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return null;\n    }\n\n    const typeArguments = typeNode.typeArguments?.params ?? [];\n\n    if (typeNode.typeName.name === NON_NULLABLE_TYPE_NAME) {\n        const [innerType] = typeArguments;\n\n        return innerType ? sourceCode.getText(innerType) : null;\n    }\n\n    if (typeNode.typeName.name !== EXCLUDE_TYPE_NAME) {\n        return null;\n    }\n\n    const [innerType, deletedType] = typeArguments;\n\n    if (!innerType || !deletedType || !isNullishDeleteType(deletedType)) {\n        return null;\n    }\n\n    return sourceCode.getText(innerType);\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-optional`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestOptionalRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    if (node.types.length !== 2) {\n                        return;\n                    }\n\n                    const firstMember = arrayFirst(node.types);\n                    const secondMember = arrayAt(node.types, 1);\n\n                    if (!firstMember || !secondMember) {\n                        return;\n                    }\n\n                    const optionalEquivalentMember = isUndefinedKeywordType(\n                        firstMember\n                    )\n                        ? secondMember\n                        : isUndefinedKeywordType(secondMember)\n                          ? firstMember\n                          : null;\n\n                    if (!optionalEquivalentMember) {\n                        return;\n                    }\n\n                    const innerTypeText = getOptionalInnerTypeText({\n                        sourceCode: context.sourceCode,\n                        typeNode: optionalEquivalentMember,\n                    });\n\n                    if (\n                        innerTypeText === null ||\n                        innerTypeText.trim().length === 0\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        OPTIONAL_TYPE_NAME,\n                        `${OPTIONAL_TYPE_NAME}<${innerTypeText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferOptional\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Optional over `Exclude<T, null> | undefined` and `NonNullable<T> | undefined` patterns.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-optional\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferOptional:\n                    \"Prefer `Optional<T>` from type-fest over `Exclude<T, null> | undefined` and equivalent optional-value patterns.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-optional\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-optional` rule module.\n */\nexport default preferTypeFestOptionalRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-or-all`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst SOME_EXTEND_TYPE_NAME = \"SomeExtend\" as const;\nconst OR_ALL_TYPE_NAME = \"OrAll\" as const;\n\nconst isTrueLiteralType = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === true;\n\n/**\n * ESLint rule definition for `prefer-type-fest-or-all`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestOrAllRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const someExtendLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                SOME_EXTEND_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const getSomeExtendTupleArgumentText = (\n                typeReference: Readonly<TSESTree.TSTypeReference>\n            ): null | string => {\n                const typeArguments = typeReference.typeArguments?.params ?? [];\n                const [tupleArgument, comparedType] = typeArguments;\n\n                if (\n                    !tupleArgument ||\n                    !comparedType ||\n                    !isTrueLiteralType(comparedType)\n                ) {\n                    return null;\n                }\n\n                if (typeArguments.length !== 2) {\n                    return null;\n                }\n\n                return context.sourceCode.getText(tupleArgument);\n            };\n\n            const reportIfSomeExtendEquivalent = (\n                node: Readonly<TSESTree.TSTypeReference>\n            ): void => {\n                const tupleArgumentText = getSomeExtendTupleArgumentText(node);\n\n                if (\n                    tupleArgumentText === null ||\n                    tupleArgumentText.trim().length === 0\n                ) {\n                    return;\n                }\n\n                const fix = createSafeTypeNodeTextReplacementFix(\n                    node,\n                    OR_ALL_TYPE_NAME,\n                    `${OR_ALL_TYPE_NAME}<${tupleArgumentText}>`,\n                    typeFestDirectImports\n                );\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferOrAll\",\n                    node,\n                });\n            };\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            someExtendLocalNames,\n                            typeReference.typeName.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportIfSomeExtendEquivalent(typeReference);\n                },\n                'TSTypeReference[typeName.type=\"TSQualifiedName\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                        AST_NODE_TYPES.TSQualifiedName\n                    ) {\n                        return;\n                    }\n\n                    if (\n                        typeReference.typeName.left.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            typeFestNamespaceImportNames,\n                            typeReference.typeName.left.name\n                        ) ||\n                        typeReference.typeName.right.name !==\n                            SOME_EXTEND_TYPE_NAME\n                    ) {\n                        return;\n                    }\n\n                    reportIfSomeExtendEquivalent(typeReference);\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest OrAll over `SomeExtend<TTuple, true>` boolean-tuple checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-or-all\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferOrAll:\n                    \"Prefer `OrAll<TTuple>` from type-fest over `SomeExtend<TTuple, true>` for boolean-tuple disjunction checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-or-all\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-or-all` rule module.\n */\nexport default preferTypeFestOrAllRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-or`.\n */\nimport { getTwoElementTupleArgumentText } from \"../_internal/boolean-pair-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    collectNamedImportLocalNamesFromSource,\n    collectNamespaceImportLocalNamesFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst OR_ALL_TYPE_NAME = \"OrAll\" as const;\nconst OR_TYPE_NAME = \"Or\" as const;\n\n/** ESLint rule definition for `prefer-type-fest-or`. */\nconst preferTypeFestOrRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n            const orAllLocalNames = collectNamedImportLocalNamesFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE,\n                OR_ALL_TYPE_NAME\n            );\n            const typeFestNamespaceImportNames =\n                collectNamespaceImportLocalNamesFromSource(\n                    context.sourceCode,\n                    TYPE_FEST_MODULE_SOURCE\n                );\n\n            const reportIfOrAllPair = (\n                node: Readonly<TSESTree.TSTypeReference>\n            ): void => {\n                const tupleArgumentText = getTwoElementTupleArgumentText(\n                    node,\n                    context.sourceCode\n                );\n\n                if (!tupleArgumentText) {\n                    return;\n                }\n\n                const replacementText = `${OR_TYPE_NAME}<${tupleArgumentText.leftTypeText}, ${tupleArgumentText.rightTypeText}>`;\n                const fix = createSafeTypeNodeTextReplacementFix(\n                    node,\n                    OR_TYPE_NAME,\n                    replacementText,\n                    typeFestDirectImports\n                );\n\n                reportWithOptionalFix({\n                    context,\n                    fix,\n                    messageId: \"preferOr\",\n                    node,\n                });\n            };\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            orAllLocalNames,\n                            typeReference.typeName.name\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportIfOrAllPair(typeReference);\n                },\n                'TSTypeReference[typeName.type=\"TSQualifiedName\"]'(\n                    typeReference: Readonly<TSESTree.TSTypeReference>\n                ) {\n                    if (\n                        typeReference.typeName.type !==\n                            AST_NODE_TYPES.TSQualifiedName ||\n                        typeReference.typeName.left.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        !setContainsValue(\n                            typeFestNamespaceImportNames,\n                            typeReference.typeName.left.name\n                        ) ||\n                        typeReference.typeName.right.name !== OR_ALL_TYPE_NAME\n                    ) {\n                        return;\n                    }\n\n                    reportIfOrAllPair(typeReference);\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Or over two-element OrAll boolean tuple checks.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-or\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferOr:\n                    \"Prefer `Or<A, B>` from type-fest over `OrAll<[A, B]>` for two-value boolean disjunction checks.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-or\",\n    });\n\nexport default preferTypeFestOrRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-partial-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-partial-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestPartialDeepRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        node.typeName.name !== \"DeepPartial\"\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"PartialDeep\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferPartialDeep\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest PartialDeep over `DeepPartial` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-partial-deep\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferPartialDeep:\n                    \"Prefer `PartialDeep` from type-fest over `DeepPartial`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-partial-deep\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-partial-deep` rule module.\n */\nexport default preferTypeFestPartialDeepRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-pick-index-signature`.\n */\nimport { isDefined } from \"ts-extras\";\n\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport {\n    isIdentifierTypeReference,\n    unwrapParenthesizedTypeNode,\n} from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst isEmptyObjectTypeLiteral = (node: Readonly<TSESTree.TypeNode>): boolean =>\n    node.type === AST_NODE_TYPES.TSTypeLiteral && node.members.length === 0;\n\nconst hasDefaultMappedTypeModifiers = (\n    node: Readonly<TSESTree.TSMappedType>\n): boolean =>\n    (node.readonly === false || !isDefined(node.readonly)) &&\n    (node.optional === false || !isDefined(node.optional));\n\nconst isMappedKeyReference = (\n    node: Readonly<TSESTree.TypeNode>,\n    keyName: string\n): boolean =>\n    node.type === AST_NODE_TYPES.TSTypeReference &&\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    node.typeName.name === keyName;\n\nconst isIndexedAccessOfMappedKey = (\n    node: Readonly<TSESTree.TypeNode>,\n    baseType: Readonly<TSESTree.TypeNode>,\n    keyName: string\n): boolean =>\n    node.type === AST_NODE_TYPES.TSIndexedAccessType &&\n    areEquivalentTypeNodes(\n        unwrapParenthesizedTypeNode(node.objectType),\n        baseType\n    ) &&\n    isMappedKeyReference(node.indexType, keyName);\n\nconst isRecordUnknownReference = (\n    node: Readonly<TSESTree.TypeNode>,\n    keyName: string\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSTypeReference ||\n        !isIdentifierTypeReference(normalizedNode, \"Record\")\n    ) {\n        return false;\n    }\n\n    const recordTypeArguments = normalizedNode.typeArguments?.params;\n\n    if (recordTypeArguments?.length !== 2) {\n        return false;\n    }\n\n    const [recordKeyType, recordValueType] = recordTypeArguments;\n\n    return (\n        recordKeyType !== undefined &&\n        recordValueType?.type === AST_NODE_TYPES.TSUnknownKeyword &&\n        isMappedKeyReference(recordKeyType, keyName)\n    );\n};\n\nconst isPickIndexSignatureKeyRemap = (\n    node: null | Readonly<TSESTree.TypeNode> | undefined,\n    keyName: string\n): boolean =>\n    node?.type === AST_NODE_TYPES.TSConditionalType &&\n    isEmptyObjectTypeLiteral(unwrapParenthesizedTypeNode(node.checkType)) &&\n    node.falseType.type === AST_NODE_TYPES.TSNeverKeyword &&\n    isMappedKeyReference(node.trueType, keyName) &&\n    isRecordUnknownReference(node.extendsType, keyName);\n\nconst hasPickIndexSignatureMappedTypeShape = (\n    node: Readonly<TSESTree.TSMappedType>\n): boolean => {\n    if (!hasDefaultMappedTypeModifiers(node)) {\n        return false;\n    }\n\n    const constraint = node.constraint;\n\n    if (\n        constraint.type !== AST_NODE_TYPES.TSTypeOperator ||\n        constraint.operator !== \"keyof\"\n    ) {\n        return false;\n    }\n\n    const constraintTypeAnnotation = constraint.typeAnnotation;\n    if (constraintTypeAnnotation === undefined) {\n        return false;\n    }\n\n    const baseType = unwrapParenthesizedTypeNode(constraintTypeAnnotation);\n    const indexedValueType = node.typeAnnotation;\n\n    if (\n        indexedValueType === undefined ||\n        !isIndexedAccessOfMappedKey(indexedValueType, baseType, node.key.name)\n    ) {\n        return false;\n    }\n\n    return isPickIndexSignatureKeyRemap(node.nameType, node.key.name);\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-pick-index-signature`.\n */\nconst preferTypeFestPickIndexSignatureRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSMappedType(node) {\n                    if (!hasPickIndexSignatureMappedTypeShape(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferPickIndexSignature\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest PickIndexSignature over manual mapped types that keep only index signatures.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-pick-index-signature\",\n            },\n            messages: {\n                preferPickIndexSignature:\n                    \"Prefer `PickIndexSignature<ObjectType>` from type-fest over manual mapped types that keep only index signatures.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-pick-index-signature\",\n    });\n\nexport default preferTypeFestPickIndexSignatureRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-primitive`.\n */\nimport type { ArrayValues } from \"type-fest\";\n\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Canonical primitive keyword node types required by `Primitive`. */\nconst primitiveKeywordTypes = [\n    AST_NODE_TYPES.TSBigIntKeyword,\n    AST_NODE_TYPES.TSBooleanKeyword,\n    AST_NODE_TYPES.TSNullKeyword,\n    AST_NODE_TYPES.TSNumberKeyword,\n    AST_NODE_TYPES.TSStringKeyword,\n    AST_NODE_TYPES.TSSymbolKeyword,\n    AST_NODE_TYPES.TSUndefinedKeyword,\n] as const;\n\n/** Union of primitive keyword node type literals. */\ntype PrimitiveKeywordType = ArrayValues<typeof primitiveKeywordTypes>;\n\n/** Lookup set used to validate primitive-keyword union members quickly. */\nconst primitiveKeywordTypeSet = new Set<string>(primitiveKeywordTypes);\n\n/**\n * Check whether a node type string is one of the primitive keyword literals.\n */\nconst isPrimitiveKeywordType = (\n    candidate: string\n): candidate is PrimitiveKeywordType =>\n    setContainsValue(primitiveKeywordTypeSet, candidate);\n\n/**\n * Detects explicit unions equivalent to the TypeFest `Primitive` alias.\n *\n * @param node - Union node to inspect.\n *\n * @returns `true` when the union contains each primitive keyword type exactly\n *   once, independent of order.\n */\n\nconst hasPrimitiveUnionShape = (\n    node: Readonly<TSESTree.TSUnionType>\n): boolean => {\n    if (node.types.length !== primitiveKeywordTypes.length) {\n        return false;\n    }\n\n    const presentPrimitiveTypes = new Set<PrimitiveKeywordType>();\n\n    for (const typeNode of node.types) {\n        if (!isPrimitiveKeywordType(typeNode.type)) {\n            return false;\n        }\n\n        presentPrimitiveTypes.add(typeNode.type);\n    }\n\n    return presentPrimitiveTypes.size === primitiveKeywordTypes.length;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-primitive`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestPrimitiveRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSUnionType(node) {\n                    if (!hasPrimitiveUnionShape(node)) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeReplacementFix(\n                        node,\n                        \"Primitive\",\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferPrimitive\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Primitive over explicit primitive keyword unions.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-primitive\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferPrimitive:\n                    \"Prefer `Primitive` from type-fest over explicit primitive keyword unions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-primitive\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-primitive` rule module.\n */\nexport default preferTypeFestPrimitiveRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-promisable`.\n */\nimport { arrayFirst, isDefined } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\ntype PreferTypeFestPromisableOption = Readonly<{\n    enforceLegacyAliases?: boolean;\n    enforcePromiseUnions?: boolean;\n}>;\n\n/** Canonical TypeFest alias preferred by this rule. */\nconst PROMISABLE_TYPE_NAME = \"Promisable\";\n\n/** Built-in promise type name used for union normalization checks. */\nconst PROMISE_TYPE_NAME = \"Promise\";\n\n/** Legacy alias names that should be normalized to `Promisable`. */\nconst promisableAliasReplacements = {\n    MaybePromise: \"Promisable\",\n} as const;\n\nconst defaultOption = {\n    enforceLegacyAliases: true,\n    enforcePromiseUnions: true,\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\n\n/**\n * Extracts the type argument from `Promise<T>` references.\n *\n * @param node - Type node to inspect.\n *\n * @returns The inner `T` node from `Promise<T>`; otherwise `null`.\n */\nconst getPromiseInnerType = (\n    node: Readonly<TSESTree.TypeNode>\n): null | TSESTree.TypeNode => {\n    if (!isIdentifierTypeReference(node, PROMISE_TYPE_NAME)) {\n        return null;\n    }\n\n    const typeArguments = node.typeArguments?.params;\n    if (!isDefined(typeArguments)) {\n        return null;\n    }\n\n    return arrayFirst(typeArguments) ?? null;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-promisable`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestPromisableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<\n        readonly [PreferTypeFestPromisableOption],\n        \"preferPromisable\"\n    >({\n        create(context, [options] = defaultOptions) {\n            const enforceLegacyAliases = options.enforceLegacyAliases ?? true;\n            const enforcePromiseUnions = options.enforcePromiseUnions ?? true;\n\n            const { sourceCode } = context;\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                sourceCode,\n                promisableAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (!enforceLegacyAliases) {\n                        return;\n                    }\n\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferPromisable\",\n                        node,\n                    });\n                },\n                TSUnionType(node) {\n                    if (!enforcePromiseUnions) {\n                        return;\n                    }\n\n                    if (node.types.length !== 2) {\n                        return;\n                    }\n\n                    const [firstMember, secondMember] = node.types;\n\n                    if (!firstMember || !secondMember) {\n                        return;\n                    }\n\n                    if (\n                        node.types.some((member) =>\n                            isIdentifierTypeReference(\n                                member,\n                                PROMISABLE_TYPE_NAME\n                            )\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const firstPromiseInner = getPromiseInnerType(firstMember);\n                    const secondPromiseInner =\n                        getPromiseInnerType(secondMember);\n\n                    const pair =\n                        firstPromiseInner && !secondPromiseInner\n                            ? {\n                                  promiseInner: firstPromiseInner,\n                                  synchronousMember: secondMember,\n                              }\n                            : !firstPromiseInner && secondPromiseInner\n                              ? {\n                                    promiseInner: secondPromiseInner,\n                                    synchronousMember: firstMember,\n                                }\n                              : null;\n\n                    if (pair === null) {\n                        return;\n                    }\n\n                    const { promiseInner, synchronousMember } = pair;\n\n                    if (\n                        synchronousMember.type ===\n                            AST_NODE_TYPES.TSNeverKeyword ||\n                        synchronousMember.type ===\n                            AST_NODE_TYPES.TSNullKeyword ||\n                        synchronousMember.type ===\n                            AST_NODE_TYPES.TSUndefinedKeyword\n                    ) {\n                        return;\n                    }\n\n                    if (\n                        !areEquivalentTypeNodes(promiseInner, synchronousMember)\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferPromisable\",\n                        node,\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Promisable over legacy MaybePromise aliases and Promise<T> | T unions for sync-or-async contracts.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-promisable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferPromisable:\n                    \"Prefer `Promisable<T>` from type-fest over `Promise<T> | T` for sync-or-async contracts.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for legacy alias and Promise-union enforcement in prefer-type-fest-promisable.\",\n                    minProperties: 1,\n                    properties: {\n                        enforceLegacyAliases: {\n                            description:\n                                \"Whether to report legacy imported aliases such as MaybePromise.\",\n                            type: \"boolean\",\n                        },\n                        enforcePromiseUnions: {\n                            description:\n                                \"Whether to report Promise<T> | T union contracts.\",\n                            type: \"boolean\",\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-promisable\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-promisable` rule module.\n */\nexport default preferTypeFestPromisableRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-readonly-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-readonly-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestReadonlyDeepRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        node.typeName.name !== \"DeepReadonly\"\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"ReadonlyDeep\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferReadonlyDeep\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ReadonlyDeep over `DeepReadonly` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-readonly-deep\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferReadonlyDeep:\n                    \"Prefer `ReadonlyDeep` from type-fest over `DeepReadonly`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-readonly-deep\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-readonly-deep` rule module.\n */\nexport default preferTypeFestReadonlyDeepRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-readonly-keys-of`.\n */\nimport { createPreferTypeFestKeysOfRule } from \"../_internal/prefer-type-fest-keys-of-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-readonly-keys-of`.\n */\nconst preferTypeFestReadonlyKeysOfRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestKeysOfRule({\n    keyKind: \"readonly\",\n    messageId: \"preferReadonlyKeysOf\",\n    preferredTypeName: \"ReadonlyKeysOf\",\n    ruleName: \"prefer-type-fest-readonly-keys-of\",\n    sourcePattern: {\n        guardTypeName: \"IsReadonlyKeyOf\",\n        kind: \"mapped-guard\",\n    },\n});\n\nexport default preferTypeFestReadonlyKeysOfRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-require-all-or-none`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst requireAllOrNoneAliasReplacements = {\n    AllOrNone: \"RequireAllOrNone\",\n    AllOrNothing: \"RequireAllOrNone\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-require-all-or-none`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestRequireAllOrNoneRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                requireAllOrNoneAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferRequireAllOrNone\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest RequireAllOrNone over imported aliases such as AllOrNone/AllOrNothing.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-all-or-none\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferRequireAllOrNone:\n                    \"Prefer `{{replacement}}` from type-fest to require all-or-none key groups instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-require-all-or-none\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-require-all-or-none` rule module.\n */\nexport default preferTypeFestRequireAllOrNoneRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-require-at-least-one`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst requireAtLeastOneAliasReplacements = {\n    AtLeastOne: \"RequireAtLeastOne\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-require-at-least-one`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestRequireAtLeastOneRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                requireAtLeastOneAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferRequireAtLeastOne\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest RequireAtLeastOne over imported aliases such as AtLeastOne.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-at-least-one\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferRequireAtLeastOne:\n                    \"Prefer `{{replacement}}` from type-fest to require at least one key from a group instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-require-at-least-one\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-require-at-least-one` rule module.\n */\nexport default preferTypeFestRequireAtLeastOneRule;\n", "import type { ArrayValues } from \"type-fest\";\n\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-require-exactly-one`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst requireExactlyOneLegacyAliases = [\"OneOf\", \"RequireOnlyOne\"] as const;\n\ntype PreferTypeFestRequireExactlyOneOption = Readonly<{\n    enforcedAliasNames?: readonly (\"OneOf\" | \"RequireOnlyOne\")[];\n}>;\n\ntype RequireExactlyOneLegacyAlias = ArrayValues<\n    typeof requireExactlyOneLegacyAliases\n>;\n\nconst defaultOption = {\n    enforcedAliasNames: [...requireExactlyOneLegacyAliases],\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\n\nconst requireExactlyOneAliasReplacements = {\n    OneOf: \"RequireExactlyOne\",\n    RequireOnlyOne: \"RequireExactlyOne\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-require-exactly-one`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestRequireExactlyOneRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<\n        readonly [PreferTypeFestRequireExactlyOneOption],\n        \"preferRequireExactlyOne\"\n    >({\n        create(context, [options] = defaultOptions) {\n            const enabledAliasReplacements: Partial<\n                Record<RequireExactlyOneLegacyAlias, \"RequireExactlyOne\">\n            > = {};\n\n            for (const aliasName of options.enforcedAliasNames ??\n                requireExactlyOneLegacyAliases) {\n                enabledAliasReplacements[aliasName] =\n                    requireExactlyOneAliasReplacements[aliasName];\n            }\n\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                enabledAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferRequireExactlyOne\",\n                        node,\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest RequireExactlyOne over imported aliases such as OneOf/RequireOnlyOne.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-exactly-one\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferRequireExactlyOne:\n                    \"Prefer `{{replacement}}` from type-fest to require exactly one key from a group instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for alias names enforced by prefer-type-fest-require-exactly-one.\",\n                    minProperties: 1,\n                    properties: {\n                        enforcedAliasNames: {\n                            description:\n                                \"Legacy alias names to report and replace with RequireExactlyOne.\",\n                            items: {\n                                enum: [...requireExactlyOneLegacyAliases],\n                                type: \"string\",\n                            },\n                            minItems: 1,\n                            type: \"array\",\n                            uniqueItems: true,\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-require-exactly-one\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-require-exactly-one` rule module.\n */\nexport default preferTypeFestRequireExactlyOneRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-require-one-or-none`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst requireOneOrNoneAliasReplacements = {\n    AtMostOne: \"RequireOneOrNone\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-require-one-or-none`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestRequireOneOrNoneRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                requireOneOrNoneAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferRequireOneOrNone\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest RequireOneOrNone over imported aliases such as AtMostOne.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-require-one-or-none\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferRequireOneOrNone:\n                    \"Prefer `{{replacement}}` from type-fest to allow one-or-none key groups instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-require-one-or-none\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-require-one-or-none` rule module.\n */\nexport default preferTypeFestRequireOneOrNoneRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-required-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-required-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestRequiredDeepRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        node.typeName.name !== \"DeepRequired\"\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"RequiredDeep\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferRequiredDeep\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest RequiredDeep over `DeepRequired` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-required-deep\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferRequiredDeep:\n                    \"Prefer `RequiredDeep` from type-fest over `DeepRequired`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-required-deep\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-required-deep` rule module.\n */\nexport default preferTypeFestRequiredDeepRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-required-keys-of`.\n */\nimport { createPreferTypeFestKeysOfRule } from \"../_internal/prefer-type-fest-keys-of-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-required-keys-of`.\n */\nconst preferTypeFestRequiredKeysOfRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestKeysOfRule({\n    keyKind: \"required\",\n    messageId: \"preferRequiredKeysOf\",\n    preferredTypeName: \"RequiredKeysOf\",\n    ruleName: \"prefer-type-fest-required-keys-of\",\n    sourcePattern: {\n        keysOfTypeName: \"OptionalKeysOf\",\n        kind: \"exclude-keys\",\n    },\n});\n\nexport default preferTypeFestRequiredKeysOfRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-schema`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst schemaAliasReplacements = {\n    RecordDeep: \"Schema\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-schema`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSchemaRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                schemaAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSchema\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Schema over imported aliases such as RecordDeep.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-schema\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSchema:\n                    \"Prefer `{{replacement}}` from type-fest to model recursive object schemas instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-schema\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-schema` rule module.\n */\nexport default preferTypeFestSchemaRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-set-non-nullable`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst setNonNullableAliasReplacements = {\n    NonNullableBy: \"SetNonNullable\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-set-non-nullable`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSetNonNullableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                setNonNullableAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSetNonNullable\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest SetNonNullable over imported aliases such as NonNullableBy.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-non-nullable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSetNonNullable:\n                    \"Prefer `{{replacement}}` from type-fest to make selected keys non-nullable instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-set-non-nullable\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-set-non-nullable` rule module.\n */\nexport default preferTypeFestSetNonNullableRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-set-optional`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst setOptionalAliasReplacements = {\n    PartialBy: \"SetOptional\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-set-optional`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSetOptionalRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                setOptionalAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSetOptional\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest SetOptional over imported alias types like PartialBy.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-optional\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSetOptional:\n                    \"Prefer `{{replacement}}` from type-fest to make selected keys optional instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-set-optional\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-set-optional` rule module.\n */\nexport default preferTypeFestSetOptionalRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-set-readonly`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst setReadonlyAliasReplacements = {\n    ReadonlyBy: \"SetReadonly\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-set-readonly`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSetReadonlyRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                setReadonlyAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSetReadonly\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest SetReadonly over imported aliases such as ReadonlyBy.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-readonly\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSetReadonly:\n                    \"Prefer `{{replacement}}` from type-fest to mark selected keys readonly instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-set-readonly\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-set-readonly` rule module.\n */\nexport default preferTypeFestSetReadonlyRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-set-required`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst setRequiredAliasReplacements = {\n    RequiredBy: \"SetRequired\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-set-required`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSetRequiredRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                setRequiredAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSetRequired\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest SetRequired over imported aliases such as RequiredBy.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-required\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSetRequired:\n                    \"Prefer `{{replacement}}` from type-fest to make selected keys required instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-set-required\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-set-required` rule module.\n */\nexport default preferTypeFestSetRequiredRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-set-return-type`.\n */\nimport {\n    getParametersFunctionArgumentFromFunctionType,\n    isPromiseAwaitedReturnTypeReferenceForFunction,\n    isReturnTypeReferenceForFunction,\n} from \"../_internal/function-type-reference-patterns.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-set-return-type`.\n */\nconst preferTypeFestSetReturnTypeRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSFunctionType(node) {\n                    const functionType =\n                        getParametersFunctionArgumentFromFunctionType(node);\n                    const returnType = node.returnType?.typeAnnotation;\n\n                    if (functionType === null || returnType === undefined) {\n                        return;\n                    }\n\n                    if (\n                        isReturnTypeReferenceForFunction(\n                            returnType,\n                            functionType\n                        ) ||\n                        isPromiseAwaitedReturnTypeReferenceForFunction(\n                            returnType,\n                            functionType\n                        )\n                    ) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferSetReturnType\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest SetReturnType over direct function-type wrappers of the form (...args: Parameters<F>) => R.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-set-return-type\",\n            },\n            messages: {\n                preferSetReturnType:\n                    \"Prefer `SetReturnType<Function, TypeToReturn>` from type-fest over direct function-type wrappers like `(...args: Parameters<Function>) => TypeToReturn`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-set-return-type\",\n    });\n\nexport default preferTypeFestSetReturnTypeRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-simplify`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst simplifyAliasReplacements = {\n    Expand: \"Simplify\",\n    Prettify: \"Simplify\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-simplify`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestSimplifyRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                simplifyAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferSimplify\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Simplify over imported alias types like Prettify/Expand.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-simplify\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferSimplify:\n                    \"Prefer `{{replacement}}` from type-fest to flatten resolved object and intersection types instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-simplify\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-simplify` rule module.\n */\nexport default preferTypeFestSimplifyRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-stringified`.\n */\nimport { isDefined } from \"ts-extras\";\n\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Detect mapped types equivalent to `Stringified<T>`.\n *\n * @param node - Mapped type node to inspect.\n *\n * @returns `true` when the mapped type has the exact `Stringified<T>`\n *   equivalent shape.\n */\nconst hasStringifiedMappedTypeShape = (\n    node: Readonly<TSESTree.TSMappedType>\n): boolean => {\n    if (node.readonly !== false && isDefined(node.readonly)) {\n        return false;\n    }\n\n    if (node.optional !== false && isDefined(node.optional)) {\n        return false;\n    }\n\n    if (node.nameType !== null) {\n        return false;\n    }\n\n    const { constraint } = node;\n\n    if (\n        constraint.type !== AST_NODE_TYPES.TSTypeOperator ||\n        constraint.operator !== \"keyof\"\n    ) {\n        return false;\n    }\n\n    const mappedTypeAnnotation = node.typeAnnotation;\n\n    if (mappedTypeAnnotation === undefined) {\n        return false;\n    }\n\n    return mappedTypeAnnotation.type === AST_NODE_TYPES.TSStringKeyword;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-stringified`.\n */\nconst preferTypeFestStringifiedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            return {\n                TSMappedType(node) {\n                    if (!hasStringifiedMappedTypeShape(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferStringified\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Stringified over manual mapped types of the form { [K in keyof T]: string }.\",\n                frozen: false,\n                recommended: false,\n                requiresTypeChecking: false,\n                typefestConfigs: [\"typefest.configs.experimental\"],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-stringified\",\n            },\n            messages: {\n                preferStringified:\n                    \"Prefer `Stringified<T>` from type-fest over manual mapped types of the form `{ [K in keyof T]: string }`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-stringified\",\n    });\n\nexport default preferTypeFestStringifiedRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-tagged-brands`.\n */\nimport { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { setContainsValue } from \"../_internal/set-membership.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\ntype PreferTypeFestTaggedBrandsOption = Readonly<{\n    enforceAdHocBrandIntersections?: boolean;\n    enforceLegacyAliases?: boolean;\n}>;\n\n/** Property keys commonly used in ad-hoc branded intersections. */\nconst BRAND_PROPERTY_NAMES = new Set([\n    \"__brand\",\n    \"__tag\",\n    \"brand\",\n]);\n/** Legacy alias names normalized by this rule to `Tagged`. */\nconst taggedAliasReplacements = {\n    Branded: \"Tagged\",\n    Opaque: \"Tagged\",\n} as const;\n\nconst defaultOption = {\n    enforceAdHocBrandIntersections: true,\n    enforceLegacyAliases: true,\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\n\n/**\n * Detects intersection members that use object-literal branding fields.\n *\n * @param typeNode - Type node to inspect.\n *\n * @returns `true` when an intersection includes a `TSTypeLiteral` with a\n *   brand-like property key.\n */\n\nconst hasAdHocBrandLiteral = (\n    typeNode: Readonly<TSESTree.TypeNode>\n): boolean => {\n    if (typeNode.type !== AST_NODE_TYPES.TSIntersectionType) {\n        return false;\n    }\n\n    return typeNode.types.some((member) => {\n        if (member.type !== AST_NODE_TYPES.TSTypeLiteral) {\n            return false;\n        }\n\n        return member.members.some((literalMember) => {\n            if (literalMember.type !== AST_NODE_TYPES.TSPropertySignature) {\n                return false;\n            }\n\n            const { key } = literalMember;\n            return (\n                key.type === AST_NODE_TYPES.Identifier &&\n                setContainsValue(BRAND_PROPERTY_NAMES, key.name)\n            );\n        });\n    });\n};\n\n/**\n * Recursively checks whether a type already references `Tagged`.\n *\n * @param typeNode - Type node to inspect.\n *\n * @returns `true` when the node or any nested union/intersection member is a\n *   `Tagged` type reference.\n */\n\nconst typeContainsTaggedReference = (\n    typeNode: Readonly<TSESTree.TypeNode>\n): boolean => {\n    if (\n        typeNode.type === AST_NODE_TYPES.TSTypeReference &&\n        typeNode.typeName.type === AST_NODE_TYPES.Identifier &&\n        typeNode.typeName.name === \"Tagged\"\n    ) {\n        return true;\n    }\n\n    if (\n        typeNode.type === AST_NODE_TYPES.TSIntersectionType ||\n        typeNode.type === AST_NODE_TYPES.TSUnionType\n    ) {\n        return typeNode.types.some((member) =>\n            typeContainsTaggedReference(member)\n        );\n    }\n\n    return false;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-tagged-brands`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestTaggedBrandsRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<\n        readonly [PreferTypeFestTaggedBrandsOption],\n        \"preferTaggedAlias\" | \"preferTaggedBrand\"\n    >({\n        create(context, [options] = defaultOptions) {\n            const enforceAdHocBrandIntersections =\n                options.enforceAdHocBrandIntersections ?? true;\n            const enforceLegacyAliases = options.enforceLegacyAliases ?? true;\n\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                taggedAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSTypeAliasDeclaration(node) {\n                    if (!enforceAdHocBrandIntersections) {\n                        return;\n                    }\n\n                    if (typeContainsTaggedReference(node.typeAnnotation)) {\n                        return;\n                    }\n\n                    if (!hasAdHocBrandLiteral(node.typeAnnotation)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: node.id.name,\n                        },\n                        fix: null,\n                        messageId: \"preferTaggedBrand\",\n                        node: node.id,\n                    });\n                },\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (!enforceLegacyAliases) {\n                        return;\n                    }\n\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferTaggedAlias\",\n                        node,\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Tagged over ad-hoc intersection branding with __brand/__tag fields.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tagged-brands\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTaggedAlias:\n                    \"Prefer `{{replacement}}` from type-fest for canonical tagged-brand aliases instead of legacy alias `{{alias}}`.\",\n                preferTaggedBrand:\n                    \"Type alias '{{alias}}' uses ad-hoc branding. Prefer `Tagged` from type-fest for branded primitive identifiers.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for tagged-brand enforcement surfaces.\",\n                    minProperties: 1,\n                    properties: {\n                        enforceAdHocBrandIntersections: {\n                            description:\n                                \"Whether to report ad-hoc branded intersections using __brand/__tag/brand fields.\",\n                            type: \"boolean\",\n                        },\n                        enforceLegacyAliases: {\n                            description:\n                                \"Whether to report imported legacy branded aliases such as Opaque and Branded.\",\n                            type: \"boolean\",\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-tagged-brands\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-tagged-brands` rule module.\n */\nexport default preferTypeFestTaggedBrandsRule;\n", "import type { ArrayValues } from \"type-fest\";\n\nimport {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-tuple-of`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeNodeTextReplacementFix,\n    isTypeParameterNameShadowed,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst tupleOfLegacyAliases = [\"ReadonlyTuple\", \"Tuple\"] as const;\n\ntype PreferTypeFestTupleOfOption = Readonly<{\n    enforcedAliasNames?: readonly (\"ReadonlyTuple\" | \"Tuple\")[];\n}>;\n\ntype TupleOfLegacyAlias = ArrayValues<typeof tupleOfLegacyAliases>;\n\nconst defaultOption = {\n    enforcedAliasNames: [\"ReadonlyTuple\", \"Tuple\"],\n} as const;\n\nconst defaultOptions = [defaultOption] as const;\n\n/**\n * Legacy tuple aliases this rule normalizes to `TupleOf` forms.\n */\nconst tupleOfAliasReplacements = {\n    ReadonlyTuple: \"Readonly<TupleOf<Length, Element>>\",\n    Tuple: \"TupleOf<Length, Element>\",\n} as const;\n\n/**\n * Builds replacement text that preserves readonly semantics for legacy tuple\n * aliases.\n *\n * @param importedAliasName - Alias name detected in source.\n * @param lengthTypeText - Serialized tuple length type argument.\n * @param elementTypeText - Serialized tuple element type argument.\n *\n * @returns Replacement text using canonical `TupleOf` syntax.\n */\nconst createTupleOfReplacementText = (\n    importedAliasName: string,\n    lengthTypeText: string,\n    elementTypeText: string\n): string =>\n    importedAliasName === \"ReadonlyTuple\"\n        ? `Readonly<TupleOf<${lengthTypeText}, ${elementTypeText}>>`\n        : `TupleOf<${lengthTypeText}, ${elementTypeText}>`;\n\n/**\n * ESLint rule definition for `prefer-type-fest-tuple-of`.\n *\n * @remarks\n * Defines metadata, diagnostics, and fixes for replacing legacy tuple aliases\n * with canonical `TupleOf` forms.\n */\nconst preferTypeFestTupleOfRule: ReturnType<typeof createTypedRule> =\n    createTypedRule<readonly [PreferTypeFestTupleOfOption], \"preferTupleOf\">({\n        create(context, [options] = defaultOptions) {\n            const enabledAliasReplacements: Partial<\n                Record<TupleOfLegacyAlias, string>\n            > = {};\n\n            for (const aliasName of options.enforcedAliasNames ??\n                tupleOfLegacyAliases) {\n                enabledAliasReplacements[aliasName] =\n                    tupleOfAliasReplacements[aliasName];\n            }\n\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                enabledAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const tupleTypeParameters = node.typeArguments?.params;\n                    let fix: null | TSESLint.ReportFixFunction = null;\n\n                    if (tupleTypeParameters?.length === 2) {\n                        const [elementType, lengthType] = tupleTypeParameters;\n                        const elementTypeText =\n                            context.sourceCode.getText(elementType);\n                        const lengthTypeText =\n                            context.sourceCode.getText(lengthType);\n                        const usesReadonlyWrapper =\n                            importedAliasMatch.importedName === \"ReadonlyTuple\";\n\n                        if (\n                            !usesReadonlyWrapper ||\n                            !isTypeParameterNameShadowed(node, \"Readonly\")\n                        ) {\n                            const replacementText =\n                                createTupleOfReplacementText(\n                                    importedAliasMatch.importedName,\n                                    lengthTypeText,\n                                    elementTypeText\n                                );\n\n                            fix = createSafeTypeNodeTextReplacementFix(\n                                node,\n                                \"TupleOf\",\n                                replacementText,\n                                typeFestDirectImports\n                            );\n                        }\n                    }\n\n                    const reportData = {\n                        alias: importedAliasMatch.importedName,\n                        replacement: importedAliasMatch.replacementName,\n                    };\n\n                    reportWithOptionalFix({\n                        context,\n                        data: reportData,\n                        fix,\n                        messageId: \"preferTupleOf\",\n                        node,\n                    });\n                },\n            };\n        },\n        defaultOptions,\n        meta: {\n            defaultOptions: [defaultOption],\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest TupleOf over imported aliases such as ReadonlyTuple and Tuple.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-tuple-of\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferTupleOf:\n                    \"Prefer `{{replacement}}` from type-fest to model fixed-length homogeneous tuples instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [\n                {\n                    additionalProperties: false,\n                    description:\n                        \"Configuration for alias names enforced by prefer-type-fest-tuple-of.\",\n                    minProperties: 1,\n                    properties: {\n                        enforcedAliasNames: {\n                            description:\n                                \"Legacy alias names to report and replace with TupleOf forms.\",\n                            items: {\n                                enum: [...tupleOfLegacyAliases],\n                                type: \"string\",\n                            },\n                            minItems: 1,\n                            type: \"array\",\n                            uniqueItems: true,\n                        },\n                    },\n                    type: \"object\",\n                },\n            ],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-tuple-of\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-tuple-of` rule module.\n */\nexport default preferTypeFestTupleOfRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-union-length`.\n */\nimport { arrayFirst } from \"ts-extras\";\n\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-union-length`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnionLengthRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSIndexedAccessType(\n                    node: Readonly<TSESTree.TSIndexedAccessType>\n                ) {\n                    const { indexType, objectType } = node;\n\n                    // Require: objectType is TSTypeReference named \"UnionToTuple\"\n                    if (\n                        objectType.type !== AST_NODE_TYPES.TSTypeReference ||\n                        objectType.typeName.type !==\n                            AST_NODE_TYPES.Identifier ||\n                        objectType.typeName.name !== \"UnionToTuple\"\n                    ) {\n                        return;\n                    }\n\n                    // Require: indexType is TSLiteralType with string literal \"length\"\n                    if (\n                        indexType.type !== AST_NODE_TYPES.TSLiteralType ||\n                        indexType.literal.type !== AST_NODE_TYPES.Literal ||\n                        indexType.literal.value !== \"length\"\n                    ) {\n                        return;\n                    }\n\n                    // Require: UnionToTuple has exactly one type argument to forward\n                    const typeParams = objectType.typeArguments?.params;\n                    if (typeParams?.length !== 1) {\n                        return;\n                    }\n\n                    const typeArgText = context.sourceCode.getText(\n                        arrayFirst(typeParams)\n                    );\n                    const replacementText = `UnionLength<${typeArgText}>`;\n\n                    const replacementFix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        \"UnionLength\",\n                        replacementText,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnionLength\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest `UnionLength` over `UnionToTuple<T>['length']`.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-union-length\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnionLength:\n                    \"Prefer `UnionLength<T>` from type-fest over `UnionToTuple<T>['length']`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-union-length\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-union-length` rule module.\n */\nexport default preferTypeFestUnionLengthRule;\n", "import {\n    AST_NODE_TYPES,\n    type TSESLint,\n    type TSESTree,\n} from \"@typescript-eslint/utils\";\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-union-member`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst UNION_MEMBER_TYPE_NAME = \"UnionMember\" as const;\nconst UNION_TO_INTERSECTION_TYPE_NAME = \"UnionToIntersection\" as const;\nconst IS_NEVER_TYPE_NAME = \"IsNever\" as const;\n\nconst isIdentifierTypeReferenceNamed = (\n    node: Readonly<TSESTree.TypeNode>,\n    name: string\n): node is TSESTree.TSTypeReference & { typeName: TSESTree.Identifier } =>\n    node.type === AST_NODE_TYPES.TSTypeReference &&\n    node.typeName.type === AST_NODE_TYPES.Identifier &&\n    node.typeName.name === name;\n\nconst isBooleanLiteralType = (\n    node: Readonly<TSESTree.TypeNode>,\n    expectedValue: boolean\n): boolean =>\n    node.type === AST_NODE_TYPES.TSLiteralType &&\n    node.literal.type === AST_NODE_TYPES.Literal &&\n    node.literal.value === expectedValue;\n\nconst getUnionArgumentTextFromDistributiveFunctionWrapper = ({\n    node,\n    sourceCode,\n}: Readonly<{\n    node: Readonly<TSESTree.TypeNode>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    if (node.type !== AST_NODE_TYPES.TSConditionalType) {\n        return null;\n    }\n\n    if (\n        node.extendsType.type !== AST_NODE_TYPES.TSAnyKeyword ||\n        node.falseType.type !== AST_NODE_TYPES.TSNeverKeyword\n    ) {\n        return null;\n    }\n\n    if (node.trueType.type !== AST_NODE_TYPES.TSFunctionType) {\n        return null;\n    }\n\n    const returnType = node.trueType.returnType?.typeAnnotation;\n\n    if (!returnType) {\n        return null;\n    }\n\n    const checkTypeText = sourceCode.getText(node.checkType);\n    const returnTypeText = sourceCode.getText(returnType);\n\n    return checkTypeText === returnTypeText ? checkTypeText : null;\n};\n\nconst getUnionArgumentTextFromExtractor = ({\n    node,\n    sourceCode,\n}: Readonly<{\n    node: Readonly<TSESTree.TSConditionalType>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    if (node.falseType.type !== AST_NODE_TYPES.TSNeverKeyword) {\n        return null;\n    }\n\n    if (\n        !isIdentifierTypeReferenceNamed(\n            node.checkType,\n            UNION_TO_INTERSECTION_TYPE_NAME\n        )\n    ) {\n        return null;\n    }\n\n    const extractorArgument = arrayFirst(\n        node.checkType.typeArguments?.params ?? []\n    );\n\n    if (!extractorArgument) {\n        return null;\n    }\n\n    const unionArgumentText =\n        getUnionArgumentTextFromDistributiveFunctionWrapper({\n            node: extractorArgument,\n            sourceCode,\n        });\n\n    if (unionArgumentText === null) {\n        return null;\n    }\n\n    if (node.extendsType.type !== AST_NODE_TYPES.TSFunctionType) {\n        return null;\n    }\n\n    const inferredReturnType = node.extendsType.returnType?.typeAnnotation;\n\n    const inferredTypeParameterName =\n        inferredReturnType?.type === AST_NODE_TYPES.TSInferType\n            ? inferredReturnType.typeParameter.name.name\n            : null;\n\n    if (\n        inferredTypeParameterName === null ||\n        node.trueType.type !== AST_NODE_TYPES.TSTypeReference ||\n        node.trueType.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.trueType.typeName.name !== inferredTypeParameterName\n    ) {\n        return null;\n    }\n\n    return unionArgumentText;\n};\n\nconst getUnionMemberEquivalentArgumentText = ({\n    node,\n    sourceCode,\n}: Readonly<{\n    node: Readonly<TSESTree.TypeNode>;\n    sourceCode: Readonly<TSESLint.SourceCode>;\n}>): null | string => {\n    if (node.type !== AST_NODE_TYPES.TSConditionalType) {\n        return null;\n    }\n\n    const directExtractorText = getUnionArgumentTextFromExtractor({\n        node,\n        sourceCode,\n    });\n\n    if (directExtractorText !== null) {\n        return directExtractorText;\n    }\n\n    if (\n        !isIdentifierTypeReferenceNamed(node.checkType, IS_NEVER_TYPE_NAME) ||\n        !isBooleanLiteralType(node.extendsType, true) ||\n        node.trueType.type !== AST_NODE_TYPES.TSNeverKeyword\n    ) {\n        return null;\n    }\n\n    const guardedArgument = arrayFirst(\n        node.checkType.typeArguments?.params ?? []\n    );\n\n    if (!guardedArgument) {\n        return null;\n    }\n\n    const guardedArgumentText = sourceCode.getText(guardedArgument);\n    if (node.falseType.type !== AST_NODE_TYPES.TSConditionalType) {\n        return null;\n    }\n\n    const extractorText = getUnionArgumentTextFromExtractor({\n        node: node.falseType,\n        sourceCode,\n    });\n\n    return extractorText === guardedArgumentText ? extractorText : null;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-union-member`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnionMemberRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSTypeAliasDeclaration(node) {\n                    const unionArgumentText =\n                        getUnionMemberEquivalentArgumentText({\n                            node: node.typeAnnotation,\n                            sourceCode: context.sourceCode,\n                        });\n\n                    if (\n                        unionArgumentText === null ||\n                        unionArgumentText.trim().length === 0\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node.typeAnnotation,\n                        UNION_MEMBER_TYPE_NAME,\n                        `${UNION_MEMBER_TYPE_NAME}<${unionArgumentText}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferUnionMember\",\n                        node: node.typeAnnotation,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnionMember over custom union-member extraction helpers based on `UnionToIntersection`.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-union-member\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnionMember:\n                    \"Prefer `UnionMember<T>` from type-fest over custom union-member extraction helpers based on `UnionToIntersection`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-union-member\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-union-member` rule module.\n */\nexport default preferTypeFestUnionMemberRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-union-to-intersection`.\n */\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { unwrapParenthesizedTypeNode } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst isDistributiveConditionalExtendsType = (\n    node: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    return (\n        normalizedNode.type === AST_NODE_TYPES.TSAnyKeyword ||\n        normalizedNode.type === AST_NODE_TYPES.TSUnknownKeyword\n    );\n};\n\nconst getSingleFunctionParameterType = (\n    node: Readonly<TSESTree.TSFunctionType>\n): null | Readonly<TSESTree.TypeNode> => {\n    if (node.params.length !== 1) {\n        return null;\n    }\n\n    const [onlyParameter] = node.params;\n\n    if (\n        onlyParameter?.type !== AST_NODE_TYPES.Identifier ||\n        onlyParameter.typeAnnotation === undefined\n    ) {\n        return null;\n    }\n\n    return unwrapParenthesizedTypeNode(\n        onlyParameter.typeAnnotation.typeAnnotation\n    );\n};\n\nconst matchesUnionToIntersectionTrueType = (\n    node: Readonly<TSESTree.TypeNode>,\n    inferredTypeParameterName: string,\n    unionType: Readonly<TSESTree.TypeNode>\n): boolean => {\n    const normalizedNode = unwrapParenthesizedTypeNode(node);\n\n    if (\n        normalizedNode.type === AST_NODE_TYPES.TSTypeReference &&\n        normalizedNode.typeName.type === AST_NODE_TYPES.Identifier &&\n        normalizedNode.typeName.name === inferredTypeParameterName\n    ) {\n        return true;\n    }\n\n    if (\n        normalizedNode.type !== AST_NODE_TYPES.TSIntersectionType ||\n        normalizedNode.types.length !== 2\n    ) {\n        return false;\n    }\n\n    const [leftType, rightType] = normalizedNode.types;\n\n    if (leftType === undefined || rightType === undefined) {\n        return false;\n    }\n\n    const isInferredIdentifier = (typeNode: Readonly<TSESTree.TypeNode>) =>\n        typeNode.type === AST_NODE_TYPES.TSTypeReference &&\n        typeNode.typeName.type === AST_NODE_TYPES.Identifier &&\n        typeNode.typeName.name === inferredTypeParameterName;\n\n    return (\n        (isInferredIdentifier(leftType) &&\n            areEquivalentTypeNodes(\n                unwrapParenthesizedTypeNode(rightType),\n                unwrapParenthesizedTypeNode(unionType)\n            )) ||\n        (isInferredIdentifier(rightType) &&\n            areEquivalentTypeNodes(\n                unwrapParenthesizedTypeNode(leftType),\n                unwrapParenthesizedTypeNode(unionType)\n            ))\n    );\n};\n\nconst isUnionToIntersectionEquivalent = (\n    node: Readonly<TSESTree.TSConditionalType>\n): boolean => {\n    if (node.falseType.type !== AST_NODE_TYPES.TSNeverKeyword) {\n        return false;\n    }\n\n    const distributedWrapper = unwrapParenthesizedTypeNode(node.checkType);\n\n    if (distributedWrapper.type !== AST_NODE_TYPES.TSConditionalType) {\n        return false;\n    }\n\n    if (\n        distributedWrapper.falseType.type !== AST_NODE_TYPES.TSNeverKeyword ||\n        !isDistributiveConditionalExtendsType(distributedWrapper.extendsType)\n    ) {\n        return false;\n    }\n\n    const distributedTrueType = unwrapParenthesizedTypeNode(\n        distributedWrapper.trueType\n    );\n\n    if (distributedTrueType.type !== AST_NODE_TYPES.TSFunctionType) {\n        return false;\n    }\n\n    const distributedParameterType =\n        getSingleFunctionParameterType(distributedTrueType);\n\n    if (\n        distributedParameterType === null ||\n        !areEquivalentTypeNodes(\n            distributedParameterType,\n            unwrapParenthesizedTypeNode(distributedWrapper.checkType)\n        )\n    ) {\n        return false;\n    }\n\n    const extractorFunctionType = unwrapParenthesizedTypeNode(node.extendsType);\n\n    if (extractorFunctionType.type !== AST_NODE_TYPES.TSFunctionType) {\n        return false;\n    }\n\n    const extractorParameterType = getSingleFunctionParameterType(\n        extractorFunctionType\n    );\n\n    if (extractorParameterType?.type !== AST_NODE_TYPES.TSInferType) {\n        return false;\n    }\n\n    return matchesUnionToIntersectionTrueType(\n        node.trueType,\n        extractorParameterType.typeParameter.name.name,\n        distributedWrapper.checkType\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-union-to-intersection`.\n */\nconst preferTypeFestUnionToIntersectionRule: ReturnType<\n    typeof createTypedRule\n> = createTypedRule({\n    create(context) {\n        return {\n            TSConditionalType(node) {\n                if (!isUnionToIntersectionEquivalent(node)) {\n                    return;\n                }\n\n                reportWithOptionalFix({\n                    context,\n                    fix: null,\n                    messageId: \"preferUnionToIntersection\",\n                    node,\n                });\n            },\n        };\n    },\n    meta: {\n        deprecated: false,\n        docs: {\n            description:\n                \"require TypeFest UnionToIntersection over custom distributive conditional helpers that turn unions into intersections.\",\n            frozen: false,\n            recommended: false,\n            requiresTypeChecking: false,\n            typefestConfigs: [\"typefest.configs.experimental\"],\n            url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-union-to-intersection\",\n        },\n        messages: {\n            preferUnionToIntersection:\n                \"Prefer `UnionToIntersection<Union>` from type-fest over custom distributive conditional helpers that convert a union into an intersection.\",\n        },\n        schema: [],\n        type: \"suggestion\",\n    },\n    name: \"prefer-type-fest-union-to-intersection\",\n});\n\nexport default preferTypeFestUnionToIntersectionRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-union-to-tuple`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst unionToTupleAliasReplacements = {\n    TupleFromUnion: \"UnionToTuple\",\n    TuplifyUnion: \"UnionToTuple\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-union-to-tuple`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnionToTupleRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                unionToTupleAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferUnionToTuple\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnionToTuple over imported aliases such as TuplifyUnion.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-union-to-tuple\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnionToTuple:\n                    \"Prefer `{{replacement}}` from type-fest to convert unions into tuple forms instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-union-to-tuple\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-union-to-tuple` rule module.\n */\nexport default preferTypeFestUnionToTupleRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-unknown-array`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFixPreservingReadonly,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Built-in readonly array type targeted by this rule. */\nconst READONLY_ARRAY_TYPE_NAME = \"ReadonlyArray\";\n\n/** Preferred TypeFest alias for readonly arrays of unknown values. */\nconst UNKNOWN_ARRAY_TYPE_NAME = \"UnknownArray\";\n\n/**\n * Checks whether a generic type reference has exactly one `unknown` argument.\n *\n * @param node - Type reference candidate.\n *\n * @returns `true` when the reference shape is `<unknown>`.\n */\n\nconst hasSingleUnknownTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    const typeArguments = node.typeArguments?.params ?? [];\n\n    if (typeArguments.length !== 1) {\n        return false;\n    }\n\n    const [firstTypeArgument] = typeArguments;\n    return firstTypeArgument?.type === AST_NODE_TYPES.TSUnknownKeyword;\n};\n\n/**\n * Detects `readonly unknown[]` type-operator syntax.\n *\n * @param node - Type-operator node to inspect.\n *\n * @returns `true` when the node is a readonly operator around an array type\n *   whose element type is `unknown`.\n */\n\nconst isReadonlyUnknownArrayType = (\n    node: Readonly<TSESTree.TSTypeOperator>\n): boolean => {\n    if (node.operator !== \"readonly\") {\n        return false;\n    }\n\n    const { typeAnnotation } = node;\n    if (typeAnnotation?.type !== AST_NODE_TYPES.TSArrayType) {\n        return false;\n    }\n\n    return typeAnnotation.elementType.type === AST_NODE_TYPES.TSUnknownKeyword;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-unknown-array`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnknownArrayRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSTypeOperator(node) {\n                    if (!isReadonlyUnknownArrayType(node)) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeTypeNodeReplacementFixPreservingReadonly(\n                            node,\n                            UNKNOWN_ARRAY_TYPE_NAME,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnknownArray\",\n                        node,\n                    });\n                },\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (\n                        !isIdentifierTypeReference(\n                            node,\n                            READONLY_ARRAY_TYPE_NAME\n                        )\n                    ) {\n                        return;\n                    }\n\n                    if (!hasSingleUnknownTypeArgument(node)) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeTypeNodeReplacementFixPreservingReadonly(\n                            node,\n                            UNKNOWN_ARRAY_TYPE_NAME,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnknownArray\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnknownArray over readonly unknown[] and ReadonlyArray<unknown> aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-array\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnknownArray:\n                    \"Prefer `Readonly<UnknownArray>` from type-fest over `readonly unknown[]` or `ReadonlyArray<unknown>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-unknown-array\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-unknown-array` rule module.\n */\nexport default preferTypeFestUnknownArrayRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-unknown-map`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFixPreservingReadonly,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Built-in map alias targeted by this rule. */\nconst READONLY_MAP_TYPE_NAME = \"ReadonlyMap\";\n\n/** Preferred TypeFest alias for readonly unknown-key/unknown-value maps. */\nconst UNKNOWN_MAP_TYPE_NAME = \"UnknownMap\";\n\n/**\n * Checks whether a map type reference is parameterized as `<unknown, unknown>`.\n *\n * @param node - Type reference candidate.\n *\n * @returns `true` when both map type arguments are `unknown`.\n */\nconst hasUnknownMapTypeArguments = (\n    node: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    const typeArguments = node.typeArguments?.params ?? [];\n\n    if (typeArguments.length !== 2) {\n        return false;\n    }\n\n    const [firstTypeArgument, secondTypeArgument] = typeArguments;\n\n    return (\n        firstTypeArgument?.type === AST_NODE_TYPES.TSUnknownKeyword &&\n        secondTypeArgument?.type === AST_NODE_TYPES.TSUnknownKeyword\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-unknown-map`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnknownMapRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (\n                        !isIdentifierTypeReference(node, READONLY_MAP_TYPE_NAME)\n                    ) {\n                        return;\n                    }\n\n                    if (!hasUnknownMapTypeArguments(node)) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeTypeNodeTextReplacementFixPreservingReadonly(\n                            node,\n                            UNKNOWN_MAP_TYPE_NAME,\n                            UNKNOWN_MAP_TYPE_NAME,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnknownMap\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnknownMap over ReadonlyMap<unknown, unknown> aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-map\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnknownMap:\n                    \"Prefer `Readonly<UnknownMap>` from type-fest over `ReadonlyMap<unknown, unknown>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-unknown-map\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-unknown-map` rule module.\n */\nexport default preferTypeFestUnknownMapRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-unknown-record`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * Detects `Record<string, unknown>` references.\n *\n * @param node - Type reference candidate.\n *\n * @returns `true` when the node is a two-argument `Record` with `string` keys\n *   and `unknown` values.\n */\n\nconst isRecordStringUnknown = (\n    node: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    if (\n        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n        node.typeName.name !== \"Record\" ||\n        node.typeArguments?.params.length !== 2\n    ) {\n        return false;\n    }\n\n    const [keyType, valueType] = node.typeArguments.params;\n    return (\n        keyType?.type === AST_NODE_TYPES.TSStringKeyword &&\n        valueType?.type === AST_NODE_TYPES.TSUnknownKeyword\n    );\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-unknown-record`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnknownRecordRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (!isRecordStringUnknown(node)) {\n                        return;\n                    }\n\n                    const replacementFix = createSafeTypeNodeReplacementFix(\n                        node,\n                        \"UnknownRecord\",\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnknownRecord\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnknownRecord over Record<string, unknown> in architecture-critical layers.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.minimal\",\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-record\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnknownRecord:\n                    \"Prefer `UnknownRecord` from type-fest over `Record<string, unknown>` for clearer intent and stronger shared typing conventions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-unknown-record\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-unknown-record` rule module.\n */\nexport default preferTypeFestUnknownRecordRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-unknown-set`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFixPreservingReadonly,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { isIdentifierTypeReference } from \"../_internal/type-reference-node.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Built-in set alias targeted by this rule. */\nconst READONLY_SET_TYPE_NAME = \"ReadonlySet\";\n\n/** Preferred TypeFest alias for readonly sets of unknown values. */\nconst UNKNOWN_SET_TYPE_NAME = \"UnknownSet\";\n\n/**\n * Checks whether a generic type reference has exactly one `unknown` argument.\n *\n * @param node - Type reference candidate.\n *\n * @returns `true` when the reference shape is `<unknown>`.\n */\n\nconst hasSingleUnknownTypeArgument = (\n    node: Readonly<TSESTree.TSTypeReference>\n): boolean => {\n    const typeArguments = node.typeArguments?.params ?? [];\n\n    if (typeArguments.length !== 1) {\n        return false;\n    }\n\n    const [firstTypeArgument] = typeArguments;\n    return firstTypeArgument?.type === AST_NODE_TYPES.TSUnknownKeyword;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-unknown-set`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnknownSetRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(node) {\n                    if (\n                        !isIdentifierTypeReference(node, READONLY_SET_TYPE_NAME)\n                    ) {\n                        return;\n                    }\n\n                    if (!hasSingleUnknownTypeArgument(node)) {\n                        return;\n                    }\n\n                    const replacementFix =\n                        createSafeTypeNodeTextReplacementFixPreservingReadonly(\n                            node,\n                            UNKNOWN_SET_TYPE_NAME,\n                            UNKNOWN_SET_TYPE_NAME,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: replacementFix,\n                        messageId: \"preferUnknownSet\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnknownSet over ReadonlySet<unknown> aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unknown-set\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnknownSet:\n                    \"Prefer `Readonly<UnknownSet>` from type-fest over `ReadonlySet<unknown>`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-unknown-set\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-unknown-set` rule module.\n */\nexport default preferTypeFestUnknownSetRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-unwrap-tagged`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\nconst unwrapTaggedAliasReplacements = {\n    UnwrapOpaque: \"UnwrapTagged\",\n} as const;\n\n/**\n * ESLint rule definition for `prefer-type-fest-unwrap-tagged`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestUnwrapTaggedRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                context.sourceCode,\n                unwrapTaggedAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferUnwrapTagged\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest UnwrapTagged over imported aliases such as UnwrapOpaque.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-unwrap-tagged\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferUnwrapTagged:\n                    \"Prefer `{{replacement}}` from type-fest to unwrap Tagged/Opaque values instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-unwrap-tagged\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-unwrap-tagged` rule module.\n */\nexport default preferTypeFestUnwrapTaggedRule;\n", "/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-value-of`.\n */\nimport { AST_NODE_TYPES } from \"@typescript-eslint/utils\";\n\nimport { getParentNode } from \"../_internal/ast-node.js\";\nimport { getEntryEquivalentArgumentText } from \"../_internal/entry-type-patterns.js\";\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeNodeTextReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-value-of`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestValueOfRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const { sourceCode } = context;\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSIndexedAccessType(node) {\n                    const parent = getParentNode(node);\n                    if (\n                        parent?.type === AST_NODE_TYPES.TSTupleType &&\n                        getEntryEquivalentArgumentText({\n                            node: parent,\n                            sourceCode,\n                        }) !== null\n                    ) {\n                        return;\n                    }\n\n                    if (\n                        node.indexType.type !== AST_NODE_TYPES.TSTypeOperator ||\n                        node.indexType.operator !== \"keyof\"\n                    ) {\n                        return;\n                    }\n\n                    const keyOfTargetType = node.indexType.typeAnnotation;\n                    /* v8 ignore start */\n                    if (!keyOfTargetType) {\n                        return;\n                    }\n                    /* v8 ignore stop */\n\n                    if (\n                        !areEquivalentTypeNodes(\n                            node.objectType,\n                            keyOfTargetType\n                        )\n                    ) {\n                        return;\n                    }\n\n                    const fix = createSafeTypeNodeTextReplacementFix(\n                        node,\n                        \"ValueOf\",\n                        `ValueOf<${sourceCode.getText(node.objectType)}>`,\n                        typeFestDirectImports\n                    );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix,\n                        messageId: \"preferValueOf\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest ValueOf over direct T[keyof T] indexed-access unions for object value extraction.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-value-of\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferValueOf:\n                    \"Prefer `ValueOf<T>` from type-fest over `T[keyof T]` for object value unions.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-value-of\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-value-of` rule module.\n */\nexport default preferTypeFestValueOfRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-writable-deep`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-writable-deep`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestWritableDeepRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                context.sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (\n                        node.typeName.type !== AST_NODE_TYPES.Identifier ||\n                        (node.typeName.name !== \"DeepMutable\" &&\n                            node.typeName.name !== \"MutableDeep\")\n                    ) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            \"WritableDeep\",\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: aliasReplacementFix,\n                        messageId: \"preferWritableDeep\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest WritableDeep over `DeepMutable` and `MutableDeep` aliases.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable-deep\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferWritableDeep:\n                    \"Prefer `WritableDeep` from type-fest over `DeepMutable`/`MutableDeep`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-writable-deep\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-writable-deep` rule module.\n */\nexport default preferTypeFestWritableDeepRule;\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-writable-keys-of`.\n */\nimport { createPreferTypeFestKeysOfRule } from \"../_internal/prefer-type-fest-keys-of-rule.js\";\n\n/**\n * ESLint rule definition for `prefer-type-fest-writable-keys-of`.\n */\nconst preferTypeFestWritableKeysOfRule: TSESLint.RuleModule<\n    string,\n    UnknownArray\n> = createPreferTypeFestKeysOfRule({\n    keyKind: \"writable\",\n    messageId: \"preferWritableKeysOf\",\n    preferredTypeName: \"WritableKeysOf\",\n    ruleName: \"prefer-type-fest-writable-keys-of\",\n    sourcePattern: {\n        keysOfTypeName: \"ReadonlyKeysOf\",\n        kind: \"exclude-keys\",\n    },\n});\n\nexport default preferTypeFestWritableKeysOfRule;\n", "import { AST_NODE_TYPES, type TSESTree } from \"@typescript-eslint/utils\";\n\n/**\n * @packageDocumentation\n * ESLint rule implementation for `prefer-type-fest-writable`.\n */\nimport {\n    collectDirectNamedImportsFromSource,\n    collectImportedTypeAliasMatches,\n    createSafeTypeReferenceReplacementFix,\n} from \"../_internal/imported-type-aliases.js\";\nimport { TYPE_FEST_MODULE_SOURCE } from \"../_internal/module-source.js\";\nimport { areEquivalentTypeNodes } from \"../_internal/normalize-expression-text.js\";\nimport { reportWithOptionalFix } from \"../_internal/rule-reporting.js\";\nimport { createTypedRule } from \"../_internal/typed-rule.js\";\n\n/** Legacy alias names normalized by this rule to `Writable`. */\nconst writableAliasReplacements = {\n    Mutable: \"Writable\",\n} as const;\n\nconst isIdentifierNode = (\n    value: unknown\n): value is Readonly<TSESTree.Identifier> =>\n    typeof value === \"object\" &&\n    value !== null &&\n    Reflect.get(value, \"type\") === AST_NODE_TYPES.Identifier &&\n    typeof Reflect.get(value, \"name\") === \"string\";\n\nconst isTypeOperatorNode = (\n    value: unknown\n): value is Readonly<TSESTree.TSTypeOperator> =>\n    typeof value === \"object\" &&\n    value !== null &&\n    Reflect.get(value, \"type\") === AST_NODE_TYPES.TSTypeOperator;\n\n/**\n * Detects mapped types equivalent to `Writable<T>`.\n *\n * @param node - Mapped type node to inspect.\n *\n * @returns `true` when the mapped type removes `readonly` via `-readonly` and\n *   preserves property optionality and values as `T[K]`.\n */\nconst hasWritableMappedTypeShape = (\n    node: Readonly<TSESTree.TSMappedType>\n): boolean => {\n    if (node.readonly !== \"-\") {\n        return false;\n    }\n\n    if (node.optional !== false) {\n        return false;\n    }\n\n    if (node.nameType !== null) {\n        return false;\n    }\n\n    const keyNode: unknown = Reflect.get(node, \"key\");\n    if (!isIdentifierNode(keyNode)) {\n        return false;\n    }\n\n    const constraint: unknown = Reflect.get(node, \"constraint\");\n\n    if (!isTypeOperatorNode(constraint) || constraint.operator !== \"keyof\") {\n        return false;\n    }\n\n    const baseType = constraint.typeAnnotation;\n    if (!baseType) {\n        return false;\n    }\n\n    const { typeAnnotation } = node;\n    if (typeAnnotation === undefined) {\n        return false;\n    }\n\n    if (typeAnnotation.type !== AST_NODE_TYPES.TSIndexedAccessType) {\n        return false;\n    }\n\n    if (!areEquivalentTypeNodes(typeAnnotation.objectType, baseType)) {\n        return false;\n    }\n\n    const { indexType } = typeAnnotation;\n    if (\n        indexType.type !== AST_NODE_TYPES.TSTypeReference ||\n        indexType.typeName.type !== AST_NODE_TYPES.Identifier\n    ) {\n        return false;\n    }\n\n    return indexType.typeName.name === keyNode.name;\n};\n\n/**\n * ESLint rule definition for `prefer-type-fest-writable`.\n *\n * @remarks\n * Defines metadata, diagnostics, and suggestions/fixes for this rule.\n */\nconst preferTypeFestWritableRule: ReturnType<typeof createTypedRule> =\n    createTypedRule({\n        create(context) {\n            const { sourceCode } = context;\n            const importedAliasMatches = collectImportedTypeAliasMatches(\n                sourceCode,\n                writableAliasReplacements\n            );\n            const typeFestDirectImports = collectDirectNamedImportsFromSource(\n                sourceCode,\n                TYPE_FEST_MODULE_SOURCE\n            );\n\n            return {\n                TSMappedType(node) {\n                    if (!hasWritableMappedTypeShape(node)) {\n                        return;\n                    }\n\n                    reportWithOptionalFix({\n                        context,\n                        fix: null,\n                        messageId: \"preferWritable\",\n                        node,\n                    });\n                },\n                'TSTypeReference[typeName.type=\"Identifier\"]'(\n                    node: TSESTree.TSTypeReference\n                ) {\n                    if (node.typeName.type !== AST_NODE_TYPES.Identifier) {\n                        return;\n                    }\n\n                    const importedAliasMatch = importedAliasMatches.get(\n                        node.typeName.name\n                    );\n                    if (!importedAliasMatch) {\n                        return;\n                    }\n\n                    const aliasReplacementFix =\n                        createSafeTypeReferenceReplacementFix(\n                            node,\n                            importedAliasMatch.replacementName,\n                            typeFestDirectImports\n                        );\n\n                    reportWithOptionalFix({\n                        context,\n                        data: {\n                            alias: importedAliasMatch.importedName,\n                            replacement: importedAliasMatch.replacementName,\n                        },\n                        fix: aliasReplacementFix,\n                        messageId: \"preferWritableAlias\",\n                        node,\n                    });\n                },\n            };\n        },\n        meta: {\n            deprecated: false,\n            docs: {\n                description:\n                    \"require TypeFest Writable over manual mapped types that strip readonly with -readonly.\",\n                frozen: false,\n                recommended: true,\n                requiresTypeChecking: false,\n                typefestConfigs: [\n                    \"typefest.configs.recommended\",\n                    \"typefest.configs.strict\",\n                    \"typefest.configs.all\",\n                    \"typefest.configs.type-fest/types\",\n                ],\n                url: \"https://nick2bad4u.github.io/eslint-plugin-typefest/docs/rules/prefer-type-fest-writable\",\n            },\n            fixable: \"code\",\n            messages: {\n                preferWritable:\n                    \"Prefer `Writable<T>` from type-fest over `{-readonly [K in keyof T]: T[K]}`.\",\n                preferWritableAlias:\n                    \"Prefer `{{replacement}}` from type-fest to remove readonly modifiers from selected keys instead of legacy alias `{{alias}}`.\",\n            },\n            schema: [],\n            type: \"suggestion\",\n        },\n        name: \"prefer-type-fest-writable\",\n    });\n\n/**\n * Default export for the `prefer-type-fest-writable` rule module.\n */\nexport default preferTypeFestWritableRule;\n", "/**\n * @packageDocumentation\n * Canonical runtime registry of all rule modules shipped by eslint-plugin-typefest.\n */\n\nimport type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport preferTsExtrasArrayAtRule from \"../rules/prefer-ts-extras-array-at.js\";\nimport preferTsExtrasArrayConcatRule from \"../rules/prefer-ts-extras-array-concat.js\";\nimport preferTsExtrasArrayFirstRule from \"../rules/prefer-ts-extras-array-first.js\";\nimport preferTsExtrasArrayIncludesRule from \"../rules/prefer-ts-extras-array-includes.js\";\nimport preferTsExtrasArrayJoinRule from \"../rules/prefer-ts-extras-array-join.js\";\nimport preferTsExtrasArrayLastRule from \"../rules/prefer-ts-extras-array-last.js\";\nimport preferTsExtrasAsWritableRule from \"../rules/prefer-ts-extras-as-writable.js\";\nimport preferTsExtrasAssertDefinedRule from \"../rules/prefer-ts-extras-assert-defined.js\";\nimport preferTsExtrasAssertErrorRule from \"../rules/prefer-ts-extras-assert-error.js\";\nimport preferTsExtrasAssertNeverRule from \"../rules/prefer-ts-extras-assert-never.js\";\nimport preferTsExtrasAssertPresentRule from \"../rules/prefer-ts-extras-assert-present.js\";\nimport preferTsExtrasIsDefinedFilterRule from \"../rules/prefer-ts-extras-is-defined-filter.js\";\nimport preferTsExtrasIsDefinedRule from \"../rules/prefer-ts-extras-is-defined.js\";\nimport preferTsExtrasIsEmptyRule from \"../rules/prefer-ts-extras-is-empty.js\";\nimport preferTsExtrasIsEqualTypeRule from \"../rules/prefer-ts-extras-is-equal-type.js\";\nimport preferTsExtrasIsFiniteRule from \"../rules/prefer-ts-extras-is-finite.js\";\nimport preferTsExtrasIsInfiniteRule from \"../rules/prefer-ts-extras-is-infinite.js\";\nimport preferTsExtrasIsIntegerRule from \"../rules/prefer-ts-extras-is-integer.js\";\nimport preferTsExtrasIsPresentFilterRule from \"../rules/prefer-ts-extras-is-present-filter.js\";\nimport preferTsExtrasIsPresentRule from \"../rules/prefer-ts-extras-is-present.js\";\nimport preferTsExtrasIsPropertyDefinedRule from \"../rules/prefer-ts-extras-is-property-defined.js\";\nimport preferTsExtrasIsPropertyPresentRule from \"../rules/prefer-ts-extras-is-property-present.js\";\nimport preferTsExtrasIsSafeIntegerRule from \"../rules/prefer-ts-extras-is-safe-integer.js\";\nimport preferTsExtrasKeyInRule from \"../rules/prefer-ts-extras-key-in.js\";\nimport preferTsExtrasNotRule from \"../rules/prefer-ts-extras-not.js\";\nimport preferTsExtrasObjectEntriesRule from \"../rules/prefer-ts-extras-object-entries.js\";\nimport preferTsExtrasObjectFromEntriesRule from \"../rules/prefer-ts-extras-object-from-entries.js\";\nimport preferTsExtrasObjectHasInRule from \"../rules/prefer-ts-extras-object-has-in.js\";\nimport preferTsExtrasObjectHasOwnRule from \"../rules/prefer-ts-extras-object-has-own.js\";\nimport preferTsExtrasObjectKeysRule from \"../rules/prefer-ts-extras-object-keys.js\";\nimport preferTsExtrasObjectMapValuesRule from \"../rules/prefer-ts-extras-object-map-values.js\";\nimport preferTsExtrasObjectValuesRule from \"../rules/prefer-ts-extras-object-values.js\";\nimport preferTsExtrasSafeCastToRule from \"../rules/prefer-ts-extras-safe-cast-to.js\";\nimport preferTsExtrasSetHasRule from \"../rules/prefer-ts-extras-set-has.js\";\nimport preferTsExtrasStringSplitRule from \"../rules/prefer-ts-extras-string-split.js\";\nimport preferTypeFestAbsoluteRule from \"../rules/prefer-type-fest-absolute.js\";\nimport preferTypeFestAbstractConstructorRule from \"../rules/prefer-type-fest-abstract-constructor.js\";\nimport preferTypeFestAndAllRule from \"../rules/prefer-type-fest-and-all.js\";\nimport preferTypeFestAndRule from \"../rules/prefer-type-fest-and.js\";\nimport preferTypeFestArrayElementRule from \"../rules/prefer-type-fest-array-element.js\";\nimport preferTypeFestArrayLengthRule from \"../rules/prefer-type-fest-array-length.js\";\nimport preferTypeFestArrayValuesRule from \"../rules/prefer-type-fest-array-values.js\";\nimport preferTypeFestArrayableRule from \"../rules/prefer-type-fest-arrayable.js\";\nimport preferTypeFestAsyncReturnTypeRule from \"../rules/prefer-type-fest-async-return-type.js\";\nimport preferTypeFestAsyncifyRule from \"../rules/prefer-type-fest-asyncify.js\";\nimport preferTypeFestConditionalExceptRule from \"../rules/prefer-type-fest-conditional-except.js\";\nimport preferTypeFestConditionalKeysRule from \"../rules/prefer-type-fest-conditional-keys.js\";\nimport preferTypeFestConditionalPickDeepRule from \"../rules/prefer-type-fest-conditional-pick-deep.js\";\nimport preferTypeFestConditionalPickRule from \"../rules/prefer-type-fest-conditional-pick.js\";\nimport preferTypeFestConstructorRule from \"../rules/prefer-type-fest-constructor.js\";\nimport preferTypeFestDistributedOmitRule from \"../rules/prefer-type-fest-distributed-omit.js\";\nimport preferTypeFestDistributedPickRule from \"../rules/prefer-type-fest-distributed-pick.js\";\nimport preferTypeFestEntriesRule from \"../rules/prefer-type-fest-entries.js\";\nimport preferTypeFestEntryRule from \"../rules/prefer-type-fest-entry.js\";\nimport preferTypeFestExceptRule from \"../rules/prefer-type-fest-except.js\";\nimport preferTypeFestExtractRestElementRule from \"../rules/prefer-type-fest-extract-rest-element.js\";\nimport preferTypeFestHasOptionalKeysRule from \"../rules/prefer-type-fest-has-optional-keys.js\";\nimport preferTypeFestHasReadonlyKeysRule from \"../rules/prefer-type-fest-has-readonly-keys.js\";\nimport preferTypeFestHasRequiredKeysRule from \"../rules/prefer-type-fest-has-required-keys.js\";\nimport preferTypeFestHasWritableKeysRule from \"../rules/prefer-type-fest-has-writable-keys.js\";\nimport preferTypeFestIfRule from \"../rules/prefer-type-fest-if.js\";\nimport preferTypeFestIsAnyRule from \"../rules/prefer-type-fest-is-any.js\";\nimport preferTypeFestIsNeverRule from \"../rules/prefer-type-fest-is-never.js\";\nimport preferTypeFestIsNullRule from \"../rules/prefer-type-fest-is-null.js\";\nimport preferTypeFestIsNullableRule from \"../rules/prefer-type-fest-is-nullable.js\";\nimport preferTypeFestIsTupleRule from \"../rules/prefer-type-fest-is-tuple.js\";\nimport preferTypeFestIsUndefinedRule from \"../rules/prefer-type-fest-is-undefined.js\";\nimport preferTypeFestIsUnknownRule from \"../rules/prefer-type-fest-is-unknown.js\";\nimport preferTypeFestIterableElementRule from \"../rules/prefer-type-fest-iterable-element.js\";\nimport preferTypeFestJsonArrayRule from \"../rules/prefer-type-fest-json-array.js\";\nimport preferTypeFestJsonObjectRule from \"../rules/prefer-type-fest-json-object.js\";\nimport preferTypeFestJsonPrimitiveRule from \"../rules/prefer-type-fest-json-primitive.js\";\nimport preferTypeFestJsonValueRule from \"../rules/prefer-type-fest-json-value.js\";\nimport preferTypeFestKeysOfUnionRule from \"../rules/prefer-type-fest-keys-of-union.js\";\nimport preferTypeFestLessThanOrEqualRule from \"../rules/prefer-type-fest-less-than-or-equal.js\";\nimport preferTypeFestLessThanRule from \"../rules/prefer-type-fest-less-than.js\";\nimport preferTypeFestLiteralUnionRule from \"../rules/prefer-type-fest-literal-union.js\";\nimport preferTypeFestMergeExclusiveRule from \"../rules/prefer-type-fest-merge-exclusive.js\";\nimport preferTypeFestMergeRule from \"../rules/prefer-type-fest-merge.js\";\nimport preferTypeFestNonEmptyTupleRule from \"../rules/prefer-type-fest-non-empty-tuple.js\";\nimport preferTypeFestNonNullableDeepRule from \"../rules/prefer-type-fest-non-nullable-deep.js\";\nimport preferTypeFestOmitIndexSignatureRule from \"../rules/prefer-type-fest-omit-index-signature.js\";\nimport preferTypeFestOptionalKeysOfRule from \"../rules/prefer-type-fest-optional-keys-of.js\";\nimport preferTypeFestOptionalRule from \"../rules/prefer-type-fest-optional.js\";\nimport preferTypeFestOrAllRule from \"../rules/prefer-type-fest-or-all.js\";\nimport preferTypeFestOrRule from \"../rules/prefer-type-fest-or.js\";\nimport preferTypeFestPartialDeepRule from \"../rules/prefer-type-fest-partial-deep.js\";\nimport preferTypeFestPickIndexSignatureRule from \"../rules/prefer-type-fest-pick-index-signature.js\";\nimport preferTypeFestPrimitiveRule from \"../rules/prefer-type-fest-primitive.js\";\nimport preferTypeFestPromisableRule from \"../rules/prefer-type-fest-promisable.js\";\nimport preferTypeFestReadonlyDeepRule from \"../rules/prefer-type-fest-readonly-deep.js\";\nimport preferTypeFestReadonlyKeysOfRule from \"../rules/prefer-type-fest-readonly-keys-of.js\";\nimport preferTypeFestRequireAllOrNoneRule from \"../rules/prefer-type-fest-require-all-or-none.js\";\nimport preferTypeFestRequireAtLeastOneRule from \"../rules/prefer-type-fest-require-at-least-one.js\";\nimport preferTypeFestRequireExactlyOneRule from \"../rules/prefer-type-fest-require-exactly-one.js\";\nimport preferTypeFestRequireOneOrNoneRule from \"../rules/prefer-type-fest-require-one-or-none.js\";\nimport preferTypeFestRequiredDeepRule from \"../rules/prefer-type-fest-required-deep.js\";\nimport preferTypeFestRequiredKeysOfRule from \"../rules/prefer-type-fest-required-keys-of.js\";\nimport preferTypeFestSchemaRule from \"../rules/prefer-type-fest-schema.js\";\nimport preferTypeFestSetNonNullableRule from \"../rules/prefer-type-fest-set-non-nullable.js\";\nimport preferTypeFestSetOptionalRule from \"../rules/prefer-type-fest-set-optional.js\";\nimport preferTypeFestSetReadonlyRule from \"../rules/prefer-type-fest-set-readonly.js\";\nimport preferTypeFestSetRequiredRule from \"../rules/prefer-type-fest-set-required.js\";\nimport preferTypeFestSetReturnTypeRule from \"../rules/prefer-type-fest-set-return-type.js\";\nimport preferTypeFestSimplifyRule from \"../rules/prefer-type-fest-simplify.js\";\nimport preferTypeFestStringifiedRule from \"../rules/prefer-type-fest-stringified.js\";\nimport preferTypeFestTaggedBrandsRule from \"../rules/prefer-type-fest-tagged-brands.js\";\nimport preferTypeFestTupleOfRule from \"../rules/prefer-type-fest-tuple-of.js\";\nimport preferTypeFestUnionLengthRule from \"../rules/prefer-type-fest-union-length.js\";\nimport preferTypeFestUnionMemberRule from \"../rules/prefer-type-fest-union-member.js\";\nimport preferTypeFestUnionToIntersectionRule from \"../rules/prefer-type-fest-union-to-intersection.js\";\nimport preferTypeFestUnionToTupleRule from \"../rules/prefer-type-fest-union-to-tuple.js\";\nimport preferTypeFestUnknownArrayRule from \"../rules/prefer-type-fest-unknown-array.js\";\nimport preferTypeFestUnknownMapRule from \"../rules/prefer-type-fest-unknown-map.js\";\nimport preferTypeFestUnknownRecordRule from \"../rules/prefer-type-fest-unknown-record.js\";\nimport preferTypeFestUnknownSetRule from \"../rules/prefer-type-fest-unknown-set.js\";\nimport preferTypeFestUnwrapTaggedRule from \"../rules/prefer-type-fest-unwrap-tagged.js\";\nimport preferTypeFestValueOfRule from \"../rules/prefer-type-fest-value-of.js\";\nimport preferTypeFestWritableDeepRule from \"../rules/prefer-type-fest-writable-deep.js\";\nimport preferTypeFestWritableKeysOfRule from \"../rules/prefer-type-fest-writable-keys-of.js\";\nimport preferTypeFestWritableRule from \"../rules/prefer-type-fest-writable.js\";\n\n/** Runtime rule module shape used by registry/preset builders. */\nexport type RuleWithDocs = TSESLint.RuleModule<string, UnknownArray>;\n\n/** Pattern for unqualified rule names supported by `eslint-plugin-typefest`. */\nexport type TypefestRuleNamePattern = `prefer-${string}`;\n\n/**\n * Runtime map of all rule modules keyed by unqualified rule name.\n */\nconst typefestRuleRegistry: Readonly<\n    Record<TypefestRuleNamePattern, RuleWithDocs>\n> = {\n    \"prefer-ts-extras-array-at\": preferTsExtrasArrayAtRule,\n    \"prefer-ts-extras-array-concat\": preferTsExtrasArrayConcatRule,\n    \"prefer-ts-extras-array-first\": preferTsExtrasArrayFirstRule,\n    \"prefer-ts-extras-array-includes\": preferTsExtrasArrayIncludesRule,\n    \"prefer-ts-extras-array-join\": preferTsExtrasArrayJoinRule,\n    \"prefer-ts-extras-array-last\": preferTsExtrasArrayLastRule,\n    \"prefer-ts-extras-as-writable\": preferTsExtrasAsWritableRule,\n    \"prefer-ts-extras-assert-defined\": preferTsExtrasAssertDefinedRule,\n    \"prefer-ts-extras-assert-error\": preferTsExtrasAssertErrorRule,\n    \"prefer-ts-extras-assert-never\": preferTsExtrasAssertNeverRule,\n    \"prefer-ts-extras-assert-present\": preferTsExtrasAssertPresentRule,\n    \"prefer-ts-extras-is-defined\": preferTsExtrasIsDefinedRule,\n    \"prefer-ts-extras-is-defined-filter\": preferTsExtrasIsDefinedFilterRule,\n    \"prefer-ts-extras-is-empty\": preferTsExtrasIsEmptyRule,\n    \"prefer-ts-extras-is-equal-type\": preferTsExtrasIsEqualTypeRule,\n    \"prefer-ts-extras-is-finite\": preferTsExtrasIsFiniteRule,\n    \"prefer-ts-extras-is-infinite\": preferTsExtrasIsInfiniteRule,\n    \"prefer-ts-extras-is-integer\": preferTsExtrasIsIntegerRule,\n    \"prefer-ts-extras-is-present\": preferTsExtrasIsPresentRule,\n    \"prefer-ts-extras-is-present-filter\": preferTsExtrasIsPresentFilterRule,\n    \"prefer-ts-extras-is-property-defined\": preferTsExtrasIsPropertyDefinedRule,\n    \"prefer-ts-extras-is-property-present\": preferTsExtrasIsPropertyPresentRule,\n    \"prefer-ts-extras-is-safe-integer\": preferTsExtrasIsSafeIntegerRule,\n    \"prefer-ts-extras-key-in\": preferTsExtrasKeyInRule,\n    \"prefer-ts-extras-not\": preferTsExtrasNotRule,\n    \"prefer-ts-extras-object-entries\": preferTsExtrasObjectEntriesRule,\n    \"prefer-ts-extras-object-from-entries\": preferTsExtrasObjectFromEntriesRule,\n    \"prefer-ts-extras-object-has-in\": preferTsExtrasObjectHasInRule,\n    \"prefer-ts-extras-object-has-own\": preferTsExtrasObjectHasOwnRule,\n    \"prefer-ts-extras-object-keys\": preferTsExtrasObjectKeysRule,\n    \"prefer-ts-extras-object-map-values\": preferTsExtrasObjectMapValuesRule,\n    \"prefer-ts-extras-object-values\": preferTsExtrasObjectValuesRule,\n    \"prefer-ts-extras-safe-cast-to\": preferTsExtrasSafeCastToRule,\n    \"prefer-ts-extras-set-has\": preferTsExtrasSetHasRule,\n    \"prefer-ts-extras-string-split\": preferTsExtrasStringSplitRule,\n    \"prefer-type-fest-absolute\": preferTypeFestAbsoluteRule,\n    \"prefer-type-fest-abstract-constructor\":\n        preferTypeFestAbstractConstructorRule,\n    \"prefer-type-fest-and\": preferTypeFestAndRule,\n    \"prefer-type-fest-and-all\": preferTypeFestAndAllRule,\n    \"prefer-type-fest-array-element\": preferTypeFestArrayElementRule,\n    \"prefer-type-fest-array-length\": preferTypeFestArrayLengthRule,\n    \"prefer-type-fest-array-values\": preferTypeFestArrayValuesRule,\n    \"prefer-type-fest-arrayable\": preferTypeFestArrayableRule,\n    \"prefer-type-fest-async-return-type\": preferTypeFestAsyncReturnTypeRule,\n    \"prefer-type-fest-asyncify\": preferTypeFestAsyncifyRule,\n    \"prefer-type-fest-conditional-except\": preferTypeFestConditionalExceptRule,\n    \"prefer-type-fest-conditional-keys\": preferTypeFestConditionalKeysRule,\n    \"prefer-type-fest-conditional-pick\": preferTypeFestConditionalPickRule,\n    \"prefer-type-fest-conditional-pick-deep\":\n        preferTypeFestConditionalPickDeepRule,\n    \"prefer-type-fest-constructor\": preferTypeFestConstructorRule,\n    \"prefer-type-fest-distributed-omit\": preferTypeFestDistributedOmitRule,\n    \"prefer-type-fest-distributed-pick\": preferTypeFestDistributedPickRule,\n    \"prefer-type-fest-entries\": preferTypeFestEntriesRule,\n    \"prefer-type-fest-entry\": preferTypeFestEntryRule,\n    \"prefer-type-fest-except\": preferTypeFestExceptRule,\n    \"prefer-type-fest-extract-rest-element\":\n        preferTypeFestExtractRestElementRule,\n    \"prefer-type-fest-has-optional-keys\": preferTypeFestHasOptionalKeysRule,\n    \"prefer-type-fest-has-readonly-keys\": preferTypeFestHasReadonlyKeysRule,\n    \"prefer-type-fest-has-required-keys\": preferTypeFestHasRequiredKeysRule,\n    \"prefer-type-fest-has-writable-keys\": preferTypeFestHasWritableKeysRule,\n    \"prefer-type-fest-if\": preferTypeFestIfRule,\n    \"prefer-type-fest-is-any\": preferTypeFestIsAnyRule,\n    \"prefer-type-fest-is-never\": preferTypeFestIsNeverRule,\n    \"prefer-type-fest-is-null\": preferTypeFestIsNullRule,\n    \"prefer-type-fest-is-nullable\": preferTypeFestIsNullableRule,\n    \"prefer-type-fest-is-tuple\": preferTypeFestIsTupleRule,\n    \"prefer-type-fest-is-undefined\": preferTypeFestIsUndefinedRule,\n    \"prefer-type-fest-is-unknown\": preferTypeFestIsUnknownRule,\n    \"prefer-type-fest-iterable-element\": preferTypeFestIterableElementRule,\n    \"prefer-type-fest-json-array\": preferTypeFestJsonArrayRule,\n    \"prefer-type-fest-json-object\": preferTypeFestJsonObjectRule,\n    \"prefer-type-fest-json-primitive\": preferTypeFestJsonPrimitiveRule,\n    \"prefer-type-fest-json-value\": preferTypeFestJsonValueRule,\n    \"prefer-type-fest-keys-of-union\": preferTypeFestKeysOfUnionRule,\n    \"prefer-type-fest-less-than\": preferTypeFestLessThanRule,\n    \"prefer-type-fest-less-than-or-equal\": preferTypeFestLessThanOrEqualRule,\n    \"prefer-type-fest-literal-union\": preferTypeFestLiteralUnionRule,\n    \"prefer-type-fest-merge\": preferTypeFestMergeRule,\n    \"prefer-type-fest-merge-exclusive\": preferTypeFestMergeExclusiveRule,\n    \"prefer-type-fest-non-empty-tuple\": preferTypeFestNonEmptyTupleRule,\n    \"prefer-type-fest-non-nullable-deep\": preferTypeFestNonNullableDeepRule,\n    \"prefer-type-fest-omit-index-signature\":\n        preferTypeFestOmitIndexSignatureRule,\n    \"prefer-type-fest-optional\": preferTypeFestOptionalRule,\n    \"prefer-type-fest-optional-keys-of\": preferTypeFestOptionalKeysOfRule,\n    \"prefer-type-fest-or\": preferTypeFestOrRule,\n    \"prefer-type-fest-or-all\": preferTypeFestOrAllRule,\n    \"prefer-type-fest-partial-deep\": preferTypeFestPartialDeepRule,\n    \"prefer-type-fest-pick-index-signature\":\n        preferTypeFestPickIndexSignatureRule,\n    \"prefer-type-fest-primitive\": preferTypeFestPrimitiveRule,\n    \"prefer-type-fest-promisable\": preferTypeFestPromisableRule,\n    \"prefer-type-fest-readonly-deep\": preferTypeFestReadonlyDeepRule,\n    \"prefer-type-fest-readonly-keys-of\": preferTypeFestReadonlyKeysOfRule,\n    \"prefer-type-fest-require-all-or-none\": preferTypeFestRequireAllOrNoneRule,\n    \"prefer-type-fest-require-at-least-one\":\n        preferTypeFestRequireAtLeastOneRule,\n    \"prefer-type-fest-require-exactly-one\": preferTypeFestRequireExactlyOneRule,\n    \"prefer-type-fest-require-one-or-none\": preferTypeFestRequireOneOrNoneRule,\n    \"prefer-type-fest-required-deep\": preferTypeFestRequiredDeepRule,\n    \"prefer-type-fest-required-keys-of\": preferTypeFestRequiredKeysOfRule,\n    \"prefer-type-fest-schema\": preferTypeFestSchemaRule,\n    \"prefer-type-fest-set-non-nullable\": preferTypeFestSetNonNullableRule,\n    \"prefer-type-fest-set-optional\": preferTypeFestSetOptionalRule,\n    \"prefer-type-fest-set-readonly\": preferTypeFestSetReadonlyRule,\n    \"prefer-type-fest-set-required\": preferTypeFestSetRequiredRule,\n    \"prefer-type-fest-set-return-type\": preferTypeFestSetReturnTypeRule,\n    \"prefer-type-fest-simplify\": preferTypeFestSimplifyRule,\n    \"prefer-type-fest-stringified\": preferTypeFestStringifiedRule,\n    \"prefer-type-fest-tagged-brands\": preferTypeFestTaggedBrandsRule,\n    \"prefer-type-fest-tuple-of\": preferTypeFestTupleOfRule,\n    \"prefer-type-fest-union-length\": preferTypeFestUnionLengthRule,\n    \"prefer-type-fest-union-member\": preferTypeFestUnionMemberRule,\n    \"prefer-type-fest-union-to-intersection\":\n        preferTypeFestUnionToIntersectionRule,\n    \"prefer-type-fest-union-to-tuple\": preferTypeFestUnionToTupleRule,\n    \"prefer-type-fest-unknown-array\": preferTypeFestUnknownArrayRule,\n    \"prefer-type-fest-unknown-map\": preferTypeFestUnknownMapRule,\n    \"prefer-type-fest-unknown-record\": preferTypeFestUnknownRecordRule,\n    \"prefer-type-fest-unknown-set\": preferTypeFestUnknownSetRule,\n    \"prefer-type-fest-unwrap-tagged\": preferTypeFestUnwrapTaggedRule,\n    \"prefer-type-fest-value-of\": preferTypeFestValueOfRule,\n    \"prefer-type-fest-writable\": preferTypeFestWritableRule,\n    \"prefer-type-fest-writable-deep\": preferTypeFestWritableDeepRule,\n    \"prefer-type-fest-writable-keys-of\": preferTypeFestWritableKeysOfRule,\n};\n\n/** Exported typed view consumed by the plugin entrypoint. */\nexport const typefestRules: Readonly<\n    Record<TypefestRuleNamePattern, RuleWithDocs>\n> = typefestRuleRegistry;\n\nexport default typefestRules;\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;IAAAA,iBAA6B;AAC7B,IAAAC,qBAOO;;;ACfP;AAAA,EACI,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACJ,KAAO;AAAA,IACP,OAAS;AAAA,EACb;AAAA,EACA,YAAc;AAAA,IACV,MAAQ;AAAA,IACR,KAAO;AAAA,EACX;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,EACV,cAAgB;AAAA,IACZ;AAAA,MACI,MAAQ;AAAA,MACR,OAAS;AAAA,MACT,KAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,IACP,KAAK;AAAA,MACD,QAAU;AAAA,QAC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EpD,QAAM,0BAA0B,OAAO,mBAAmB,CAAA;AAC1D,QAAM,wBAAwB,wBAAwB,eAAe;AACrE,QAAM,gBAAgB,uBAAuB,qBAAqB;AAElE,MACI,QAAQ,wBACR,KAAC,gCAAY,eAAe,gBAAgB,GAC9C;AACE,YAAQ,IAAI,eAAe,kBAAkB,IAAI;EACrD;AAEA,QAAM,kBAAuC;IACzC,GAAG;IACH,QAAQ,wBAAwB,QAAQ,KAAK;IAC7C;;AAGJ,SAAO;IACH,GAAG;IACH,OAAO,OAAO,SAAS,CAAC,GAAG,iBAAiB;IAC5C;IACA,SAAS;MACL,GAAG,OAAO;MACV,UAAU;;;AAGtB;AAGA,IAAM,mBAAkC;EACpC,OAAO;;AAGX,IAAM,qBAAqB,CACvB,eACsB;AACtB,QAAM,iBAAiB,6BAA6B,UAAU;AAE9D,SAAO,mBACH;IACI,MAAM,eAAe;IACrB,OAAO,cAAc,iCAAiC,UAAU,CAAC;KAErE,kBACA;IACI,sBAAsB,eAAe;GACxC;AAET;AAKA,IAAM,kCAAkC,OAAgC;EACpE,KAAK,mBAAmB,KAAK;EAC7B,cAAc,mBAAmB,cAAc;EAC/C,SAAS,mBAAmB,SAAS;EACrC,aAAa,mBAAmB,aAAa;EAC7C,4BAA4B,mBAAmB,0BAA0B;EACzE,QAAQ,mBAAmB,QAAQ;EACnC,yBAAyB,mBAAmB,uBAAuB;EACnE,mBAAmB,mBAAmB,iBAAiB;;AAG3D,IAAM,4BAA4B,gCAA+B;AAGjE,IAAM,kBAA2C;AAcjD,IAAM,iBAAyC;EAC3C,SAAS;EACT,MAAM;IACF,MAAM;IACN,WAAW;IACX,SAAS,kBAAkB,gBAAgB;;EAE/C,YAAY,CAAA;EACZ,OAAO;;AAeX,IAAA,iBAAe;",
  "names": ["import_parser", "import_ts_extras", "import_ts_extras", "typefestConfigs", "import_type_utils", "import_utils", "import_ts_extras", "import_ts_extras", "import_type_utils", "import_ts_extras", "import_ts_extras", "import_ts_extras", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "importFix", "import_ts_extras", "import_ts_extras", "import_utils", "import_ts_extras", "import_ts_extras", "import_ts_extras", "parser", "import_ts_extras", "argumentText", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "import_ts_extras", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_utils", "import_utils", "isUndefinedExpression", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "isGlobalUndefinedIdentifier", "import_utils", "import_parser", "import_type_utils", "import_utils", "import_ts_extras", "isUnknownRecord", "parser", "isUndefinedStringLiteral", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "unwrapTransparentExpression", "import_type_utils", "import_utils", "import_ts_extras", "ts", "import_type_utils", "import_ts_extras", "import_typescript", "ts", "isSetLike", "import_type_utils", "import_ts_extras", "import_ts_extras", "isStringLike", "import_utils", "import_ts_extras", "import_ts_extras", "import_utils", "import_utils", "import_utils", "AND_ALL_TYPE_NAME", "import_utils", "import_utils", "import_utils", "isNumberIndexType", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "getSingleTypeArgument", "import_utils", "import_utils", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "isDistributiveConditionalExtendsType", "import_utils", "import_ts_extras", "ARRAY_TYPE_NAME", "import_utils", "import_utils", "defaultOption", "defaultOptions", "import_utils", "import_ts_extras", "isNumberIndexType", "getSingleTypeArgument", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "getSingleTypeArgument", "import_utils", "TYPE_NAME", "TYPE_NAME", "import_utils", "import_ts_extras", "TYPE_NAME", "getSingleTypeArgument", "isNumericLiteralType", "TYPE_NAME", "TYPE_NAME", "import_utils", "TYPE_NAME", "import_utils", "import_utils", "ARRAY_TYPE_NAME", "import_utils", "JSON_VALUE_TYPE_NAME", "isTypeNodePair", "isJsonValueType", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "isTrueLiteralType", "import_utils", "isLiteralBooleanType", "isFalseLiteralType", "isTrueLiteralType", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "getSingleTypeArgument", "import_utils", "import_ts_extras", "innerType", "import_utils", "isTrueLiteralType", "import_utils", "OR_ALL_TYPE_NAME", "import_utils", "import_utils", "import_ts_extras", "import_utils", "import_utils", "import_ts_extras", "defaultOption", "defaultOptions", "import_utils", "import_utils", "import_utils", "import_utils", "defaultOption", "defaultOptions", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_utils", "import_ts_extras", "import_utils", "defaultOption", "defaultOptions", "import_utils", "defaultOption", "defaultOptions", "import_utils", "import_ts_extras", "import_utils", "import_ts_extras", "isBooleanLiteralType", "import_utils", "isDistributiveConditionalExtendsType", "import_utils", "import_utils", "READONLY_ARRAY_TYPE_NAME", "import_utils", "import_utils", "import_utils", "hasSingleUnknownTypeArgument", "import_utils", "import_utils", "import_utils", "import_utils", "isIdentifierNode", "typeScriptParser", "presetRuleNamesByConfig"]
}
