diff --git a/packages/svelte/src/compiler/validate-options.js b/packages/svelte/src/compiler/validate-options.js index 85305d7ce9..1fd89139d5 100644 --- a/packages/svelte/src/compiler/validate-options.js +++ b/packages/svelte/src/compiler/validate-options.js @@ -241,19 +241,6 @@ function validator(fallback, fn) { }; } -/** - * @param {number} fallback - * @returns {Validator} - */ -function number(fallback) { - return validator(fallback, (input, keypath) => { - if (typeof input !== 'number') { - throw_error(`${keypath} should be a number, if specified`); - } - return input; - }); -} - /** * @param {string | undefined} fallback * @param {boolean} allow_empty @@ -273,20 +260,6 @@ function string(fallback, allow_empty = true) { }); } -/** - * @param {string[]} fallback - * @returns {Validator} - */ -function string_array(fallback) { - return validator(fallback, (input, keypath) => { - if (input && !Array.isArray(input)) { - throw_error(`${keypath} should be a string array, if specified`); - } - - return input; - }); -} - /** * @param {boolean | undefined} fallback * @returns {Validator}