Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions packages/svelte/src/compiler/validate-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down
Loading