@@ -204,6 +204,7 @@ function normalizePluginConfig(userNamespace, plugin, config) {
204
204
* @param {Config|LegacyConfig|(Config|LegacyConfig)[] } pluginConfig The plugin config to normalize.
205
205
* @param {string } pluginConfigName The name of the plugin config.
206
206
* @return {InfiniteConfigArray } The normalized plugin config.
207
+ * @throws {TypeError } If the plugin config is a legacy config.
207
208
*/
208
209
function deepNormalizePluginConfig (
209
210
userPluginNamespace ,
@@ -238,6 +239,7 @@ function deepNormalizePluginConfig(
238
239
* @param {Config } config The config object.
239
240
* @param {string } pluginConfigName The name of the plugin config.
240
241
* @return {InfiniteConfigArray } The plugin config.
242
+ * @throws {TypeError } If the plugin config is not found or is a legacy config.
241
243
*/
242
244
function findPluginConfig ( config , pluginConfigName ) {
243
245
const { namespace : userPluginNamespace , name : configName } =
@@ -386,6 +388,7 @@ function extendConfig(baseConfig, baseConfigName, extension, extensionName) {
386
388
* @param {ConfigWithExtends } config The config object.
387
389
* @param {WeakMap<Config, string> } configNames The map of config objects to their names.
388
390
* @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.
389
392
*/
390
393
function processExtends ( config , configNames ) {
391
394
if ( ! config . extends ) {
@@ -490,6 +493,7 @@ function processConfigList(configList, configNames) {
490
493
* Helper function to define a config array.
491
494
* @param {ConfigWithExtendsArray } args The arguments to the function.
492
495
* @returns {Config[] } The config array.
496
+ * @throws {TypeError } If no arguments are provided or if an argument is not an object.
493
497
*/
494
498
export function defineConfig ( ...args ) {
495
499
const configNames = new WeakMap ( ) ;
0 commit comments