@@ -361,6 +361,28 @@ jerryx_arg_transform_array (const jerry_value_t array_val,
361361
362362- [ jerryx_arg_array] ( #jerryx_arg_array )
363363
364+ ## jerryx_arg_transform_optional
365+
366+ ** Summary**
367+
368+ The common function to deal with optional arguments. The core transform function is provided by argument ` func ` .
369+
370+ ** Prototype**
371+
372+ ``` c
373+ jerry_value_t jerryx_arg_transform_optional (jerryx_arg_js_iterator_t * js_arg_iter_p,
374+ const jerryx_arg_t * c_arg_p,
375+ jerryx_arg_transform_func_t func);
376+ ```
377+
378+ - `js_arg_iter_p` - the JS arg iterator.
379+ - `c_arg_p` - the native arg.
380+ - `func` - the core transform function.
381+ - return value - a `jerry_value_t` representing `undefined` if all validators passed or an `Error` if a validator failed.
382+
383+ **See also**
384+
385+ - [jerryx_arg_transform_func_t](#jerryx_arg_transform_func_t)
364386
365387# Helpers for commonly used validations
366388
@@ -577,11 +599,11 @@ User should prepare the `jerryx_arg_object_props_t` instance, and pass it to thi
577599
578600``` c
579601static inline jerryx_arg_t
580- jerryx_arg_object_properties (const jerryx_arg_object_props_t *object_props_p ,
602+ jerryx_arg_object_properties (const jerryx_arg_object_props_t * obj_prop_p ,
581603 jerryx_arg_optional_t opt_flag);
582604```
583605 - return value - the created `jerryx_arg_t` instance.
584- - ` object_props_p ` - provides information for properties transform.
606+ - `obj_prop_p ` - provides information for properties transform.
585607 - `opt_flag` - whether the argument is optional.
586608
587609**Example**
@@ -754,6 +776,23 @@ my_external_handler (const jerry_value_t function_obj,
754776
755777# Functions to create custom validations
756778
779+ ## jerryx_arg_ignore
780+
781+ ** Summary**
782+
783+ Create a jerryx_arg_t instance for ignored argument.
784+
785+ ** Prototype**
786+
787+ ``` c
788+ static inline jerryx_arg_t jerryx_arg_ignore (void);
789+ ```
790+ - return value - the created `jerryx_arg_t` instance.
791+
792+ **See also**
793+
794+ - [jerryx_arg_t](#jerryx_arg_t)
795+
757796## jerryx_arg_custom
758797
759798**Summary**
0 commit comments