From e42b15dc4a424030cac97582c0d500a76b13f328 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Mon, 27 May 2024 15:15:21 -0400 Subject: [PATCH] fix: ConfigObject type (#27) --- packages/config-array/src/config-array.js | 4 ++-- packages/config-array/src/types.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/config-array/src/config-array.js b/packages/config-array/src/config-array.js index 3aadb0f..b75c7ca 100644 --- a/packages/config-array/src/config-array.js +++ b/packages/config-array/src/config-array.js @@ -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 */ @@ -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) { diff --git a/packages/config-array/src/types.ts b/packages/config-array/src/types.ts index 0ce6f84..1af4011 100644 --- a/packages/config-array/src/types.ts +++ b/packages/config-array/src/types.ts @@ -3,7 +3,7 @@ * @author Nicholas C. Zakas */ -export interface BaseConfigObject { +export interface ConfigObject { /** * The files to include. */ @@ -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; }