Refactored the API, moving it into a single api.js file which can be
exluded from a build if desired.
This commit is contained in:
5
tasks/generate/js_api/templates/string.param.tmpl
Normal file
5
tasks/generate/js_api/templates/string.param.tmpl
Normal file
@ -0,0 +1,5 @@
|
||||
if (typeof <%= get %> !== 'object' && <%= get %>) {
|
||||
<%= set %> = '' + <%= get %>;
|
||||
} else {
|
||||
throw new TypeError('Invalid <%= name %>: ' + <%= get %> + ' should be a string.');
|
||||
}
|
||||
Reference in New Issue
Block a user