Skip to content

Commit df5801c

Browse files
authored
chore: remove unused option validators (#16361)
1 parent 3f3cf9f commit df5801c

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

packages/svelte/src/compiler/validate-options.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,6 @@ function validator(fallback, fn) {
241241
};
242242
}
243243

244-
/**
245-
* @param {number} fallback
246-
* @returns {Validator}
247-
*/
248-
function number(fallback) {
249-
return validator(fallback, (input, keypath) => {
250-
if (typeof input !== 'number') {
251-
throw_error(`${keypath} should be a number, if specified`);
252-
}
253-
return input;
254-
});
255-
}
256-
257244
/**
258245
* @param {string | undefined} fallback
259246
* @param {boolean} allow_empty
@@ -273,20 +260,6 @@ function string(fallback, allow_empty = true) {
273260
});
274261
}
275262

276-
/**
277-
* @param {string[]} fallback
278-
* @returns {Validator}
279-
*/
280-
function string_array(fallback) {
281-
return validator(fallback, (input, keypath) => {
282-
if (input && !Array.isArray(input)) {
283-
throw_error(`${keypath} should be a string array, if specified`);
284-
}
285-
286-
return input;
287-
});
288-
}
289-
290263
/**
291264
* @param {boolean | undefined} fallback
292265
* @returns {Validator}

0 commit comments

Comments
 (0)