Breaking Changes 55267 and 55508: Change the types of isTruthy, not, and importModule in dart:js_interop

67 views
Skip to first unread message

Srujan Gaddam

unread,
Apr 18, 2024, 4:50:18 PMApr 18
to anno...@dartlang.org
`isTruthy` and `not` both return a `bool` in `dart:js_interop`. In order to keep these operators performant and consistent with other operators, they are being changed to return a `JSBoolean`.

`importModule` takes a `String` representing a module and then invokes the JavaScript dynamic import function with it as a parameter. The dynamic import function accepts more JavaScript values than just strings, however, and should accept types like `TrustedScriptURL`s. In order to allow such values to be passed to `importModule`, `importModule` will be changed to accept a `JSAny`.

See https://github.com/dart-lang/sdk/issues/55267 and https://github.com/dart-lang/sdk/issues/55508 for more details. If these breaking changes pose a severe problem, please leave a comment on these issues.


Srujan Gaddam

unread,
Jun 27, 2024, 8:23:14 PM (6 days ago) Jun 27
to anno...@dartlang.org
Reply all
Reply to author
Forward
0 new messages