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

5 lines
203 B
Cheetah

if (typeof <%= get %> !== 'object' && typeof <%= get %> !== 'undefined') {
<%= set %> = '' + <%= get %>;
} else {
throw new TypeError('Invalid <%= name %>: ' + <%= get %> + ' should be a string.');
}