@@ -204,6 +204,7 @@ function normalizePluginConfig(userNamespace, plugin, config) {
204204 * @param {Config|LegacyConfig|(Config|LegacyConfig)[] } pluginConfig The plugin config to normalize.
205205 * @param {string } pluginConfigName The name of the plugin config.
206206 * @return {InfiniteConfigArray } The normalized plugin config.
207+ * @throws {TypeError } If the plugin config is a legacy config.
207208 */
208209function deepNormalizePluginConfig (
209210 userPluginNamespace ,
@@ -238,6 +239,7 @@ function deepNormalizePluginConfig(
238239 * @param {Config } config The config object.
239240 * @param {string } pluginConfigName The name of the plugin config.
240241 * @return {InfiniteConfigArray } The plugin config.
242+ * @throws {TypeError } If the plugin config is not found or is a legacy config.
241243 */
242244function findPluginConfig ( config , pluginConfigName ) {
243245 const { namespace : userPluginNamespace , name : configName } =
@@ -386,6 +388,7 @@ function extendConfig(baseConfig, baseConfigName, extension, extensionName) {
386388 * @param {ConfigWithExtends } config The config object.
387389 * @param {WeakMap<Config, string> } configNames The map of config objects to their names.
388390 * @return {Config[] } The flattened list of config objects.
391+ * @throws {TypeError } If the `extends` property is not an array or if nested `extends` is found.
389392 */
390393function processExtends ( config , configNames ) {
391394 if ( ! config . extends ) {
@@ -490,6 +493,7 @@ function processConfigList(configList, configNames) {
490493 * Helper function to define a config array.
491494 * @param {ConfigWithExtendsArray } args The arguments to the function.
492495 * @returns {Config[] } The config array.
496+ * @throws {TypeError } If no arguments are provided or if an argument is not an object.
493497 */
494498export function defineConfig ( ...args ) {
495499 const configNames = new WeakMap ( ) ;
0 commit comments