@@ -20,12 +20,10 @@ import { filesAndIgnoresSchema } from "./files-and-ignores-schema.js";
2020// Types
2121//------------------------------------------------------------------------------
2222
23- /** @typedef {import("@eslint/object-schema").PropertyDefinition } PropertyDefinition */
24- /** @typedef {import("@eslint/object-schema").ObjectDefinition } ObjectDefinition */
2523/** @typedef {import("./types.ts").ConfigObject } ConfigObject */
2624/** @typedef {import("minimatch").IMinimatchStatic } IMinimatchStatic */
2725/** @typedef {import("minimatch").IMinimatch } IMinimatch */
28- /** @typedef { import( "@jsr/std__path") } PathImpl */
26+ /** @import * as PathImpl from "@jsr/std__path" */
2927
3028/*
3129 * This is a bit of a hack to make TypeScript happy with the Rollup-created
@@ -34,7 +32,7 @@ import { filesAndIgnoresSchema } from "./files-and-ignores-schema.js";
3432 * for `ObjectSchema`. To work around that, we just import the type manually
3533 * and give it a different name to use in the JSDoc comments.
3634 */
37- /** @typedef {import("@eslint/object-schema"). ObjectSchema } ObjectSchemaInstance */
35+ /** @typedef {ObjectSchema } ObjectSchemaInstance */
3836
3937//------------------------------------------------------------------------------
4038// Helpers
@@ -968,7 +966,8 @@ export class ConfigArray extends Array {
968966 * @param {Object } config The config to finalize.
969967 * @returns {Object } The finalized config.
970968 */
971- [ ConfigArraySymbol . finalizeConfig ] ( config ) {
969+ // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.
970+ [ /** @type {never } */ ( ConfigArraySymbol . finalizeConfig ) ] ( config ) {
972971 return config ;
973972 }
974973
@@ -980,7 +979,8 @@ export class ConfigArray extends Array {
980979 * @param {Object } config The config to preprocess.
981980 * @returns {Object } The config to use in place of the argument.
982981 */
983- [ ConfigArraySymbol . preprocessConfig ] ( config ) {
982+ // Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.
983+ [ /** @type {never } */ ( ConfigArraySymbol . preprocessConfig ) ] ( config ) {
984984 return config ;
985985 }
986986
0 commit comments