Files
elasticsearch-js/scripts/generate_js_api/templates/duration.param.tmpl

5 lines
207 B
Cheetah

if (_.isInterval(<%= get %>)) {
<%= set %> = <%= get %>;
} else {
throw new TypeError('Invalid <%= name %>: ' + <%= get %> + ' should be in interval notation (an integer followed by one of Mwdhmsy).');
}