@staticInterop
and generics
#53708
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
web-js-interop
Issues that impact all js interop
If there any good way to make a
@staticInterop
class generic until extension types lands in stable?I see only 2 methods with current dart:
@staticInterop
, making class via dynamic interop would make it possible to add generics.But this gives following disadvantages:
dart:html
with@Native
annotation will crash the thing: [dart2js]Iterator
is confused withNodeIterator
#53532wasm
support.dynamic
going everywhere in underlying layer.In my actual use case (I'm developing
fetch_client
andfetch_api
) both methods is inconvenient:With first we have still not fixed #53532 (which I presume requires a single line change in
@Native
annotation), this causing Zekfad/fetch_client#9With second it's requires a workaround for generics: Zekfad/fetch_api#3
Also as a related question, will views/extension types be able to passed as
@staticInterop
external
members, or we would still be required to make a wrapper methods?The text was updated successfully, but these errors were encountered: