mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Add guides on Getting Started with JS (#4150)
- Get started section added to the JS docs - Small fixes in the JS modules docs
This commit is contained in:
@@ -25,14 +25,13 @@
|
||||
/**
|
||||
* @brief Syntax sugar for constructing an object
|
||||
*
|
||||
* @example
|
||||
* ```c
|
||||
* Example:
|
||||
*
|
||||
* mjs_val_t my_obj = mjs_mk_object(mjs);
|
||||
* JS_ASSIGN_MULTI(mjs, my_obj) {
|
||||
* JS_FIELD("method1", MJS_MK_FN(js_storage_file_is_open));
|
||||
* JS_FIELD("method2", MJS_MK_FN(js_storage_file_is_open));
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
#define JS_ASSIGN_MULTI(mjs, object) \
|
||||
for(struct { \
|
||||
|
||||
Reference in New Issue
Block a user