Skip to content

Commit

Permalink
fix: ConfigObject type (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas authored May 27, 2024
1 parent c611c72 commit e42b15d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/config-array/src/config-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { filesAndIgnoresSchema } from "./files-and-ignores-schema.js";

/** @typedef {import("@eslint/object-schema").PropertyDefinition} PropertyDefinition */
/** @typedef {import("@eslint/object-schema").ObjectDefinition} ObjectDefinition */
/** @typedef {import("./types.ts").BaseConfigObject} BaseConfigObject */
/** @typedef {import("./types.ts").ConfigObject} ConfigObject */
/** @typedef {import("minimatch").IMinimatchStatic} IMinimatchStatic */
/** @typedef {import("minimatch").IMinimatch} IMinimatch */

Expand Down Expand Up @@ -125,7 +125,7 @@ class ConfigError extends Error {

/**
* Gets the name of a config object.
* @param {BaseConfigObject} config The config object to get the name of.
* @param {ConfigObject} config The config object to get the name of.
* @returns {string} The name of the config object.
*/
function getConfigName(config) {
Expand Down
5 changes: 4 additions & 1 deletion packages/config-array/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Nicholas C. Zakas
*/

export interface BaseConfigObject {
export interface ConfigObject {
/**
* The files to include.
*/
Expand All @@ -18,4 +18,7 @@ export interface BaseConfigObject {
* The name of the config object.
*/
name?: string;

// may also have any number of other properties
[key: string]: unknown;
}

0 comments on commit e42b15d

Please sign in to comment.