Tracking issue for `JsObject` safe wrappers
This is the main tracking issue listing all the JsObjects for which we could implement safe wrappers, and the implementation progress for them.
- [x]
JsArray(#1746) - [x]
JsFunction(#2015) - [x]
JsProxy(#2076) - [x]
JsTypedArray(#2003) - [x]
JsArrayBuffer(#2170) - [x]
JsDataView(#2308) - [x]
JsMap(#2115) - [x]
JsSet(#2162) - [x]
JsDate(#2181) - [x]
JsRegExp(#2326) - [x]
JsGenerator(#2380) - [ ]
JsGeneratorFunction - [ ]
JsWeakMap - [ ]
JsWeakSet - [x]
JsPromise(#2687) - [ ]
JsAsyncGenerator
Feel free to leave a comment if there's something missing.
Hi! Would it be fine to take a crack at one or two of these or is someone currently working on them?
Hi! Would it be fine to take a crack at one or two of these or is someone currently working on them?
Go ahead! Let us know in which ones you'll start working on :)
@Razican I'll start working on JsMap if no one else has started on it
@Razican I'll start working on JsMap if no one else has started on it
Nice! I'll edit the description to assign you that work :)
@jedel1043 can I give JsSet a shot?
@anuvratsingh Please do! If you need some guidance, you can post a comment here or in our discord :)
@jedel1043 Would it be fine to work on JsArrayBuffer and JsDataView?
@nekevss That would be very nice :D
Ummm... I didn't see this conversation before I implemented JsArrayBuffer (#2170 ) 😅 . I needed it to be implemented so I could fully fix (in a clean way) the Vec<u8> to JsTypedArray as discussed in #2058.
Though you can work on JsDataView if you still want it
Can I do JsDate, and why builtins::Math doesn't require a wrapper?
Can I do
JsDate
Sure! :)
why
builtins::Mathdoesn't require a wrapper?
The reasons is because it not a constructor and the static methods it provides do not offer anything that rust can't do (in fact they are wrappers around rust functions like f64.sqrt(), f64.pow(), etc)
Ummm... I didn't see this conversation before I implemented
JsArrayBuffer(#2170 ) 😅
All good :) I can focus on working on JsDataView. I might look at adding some additional methods to JsArrayBuffer that were mentioned in #2058 like take and clone/borrow. Unless you don't think those are needed then I can leave it as is.
I might look at adding some additional methods to
JsArrayBufferthat were mentioned in #2170 liketakeandclone/borrow. Unless you don't think those are needed then I can leave it as is.
As far as I know ArrayBuffer does not have such methods. The only method that is missing is ArrayBuffer.prototype.slice you can see JsArray::slice() implementation since they are very simular
Oh sorry! I linked the wrong thread. I updated the link in the above comment. The discussion had to do with providing methods to interact with array_buffer_data.
@jedel1043 If nobody else is working it yet, I'll work on JsRegExp. Also, as a side note, I think these objects being moved into their own module is in a different commit, but is it going to be easier to separate these files into their own folder like external_objects or js_objects in object?
Awkward, accidentally opened up an issue 😂 Just wanted to note that JsGenerator was added with #2380.