wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

distinguish between `MediaStreamTrack` clone, and rust Clone::clone

Open deep-gaurav opened this issue 1 year ago • 3 comments

Motivation

So I was working with WebRTC Media Stream Track and was cloning with with .clone() thinking it'll do shallow clone just like how all other web-sys api does shallow clone, but MediaStreamTrack has a clone method in js too that does deep clone which is what is invoked here. It becomes very hard to debug unless you know this. maybe we can mark it somehow?

Proposed Solution

Not exactly sure what can be done but maybe rename deep clone?

Alternatives

We can also just do some linting for it?

Additional Context

NA

deep-gaurav avatar Oct 11 '24 13:10 deep-gaurav