| commit | 6b8a46561b82de9b20d77d9ac491844d303ca08f | [log] [tgz] |
|---|---|---|
| author | Srujan Gaddam <58529443+srujzs@users.noreply.github.com> | Tue Jun 18 09:02:55 2024 -0700 |
| committer | GitHub <noreply@github.com> | Tue Jun 18 09:02:55 2024 -0700 |
| tree | 84a99cec1bdaa6e3e82edaa4a4db12946b271e93 | |
| parent | f6a7d3839494f2287f0f15debbfbc775530938cb [diff] |
Account for typedef nullability (#257) Account for typedef nullability _desugarTypedef accepts a _RawType and returns its underlying type if it's a typedef. However, it doesn't account for whether the _RawType is nullable or not. In order to accurately desugar a use of a typedef, we should union the _RawType's nullability with the underlying type's nullability. For example, `SomeTypedef?` should always be nullable after being desugared.
Lightweight browser API bindings built around JS interop.
This package exposes browser APIs. It's generated from the Web IDL definitions and uses recent Dart language features for zero-overhead bindings.
This package is intended to replace dart:html and similar Dart SDK libraries. It will support access to browser APIs from Dart code compiled to either JavaScript or WebAssembly.
import 'package:web/web.dart'; void main() { final div = document.querySelector('div')!; div.text = 'Text set at ${DateTime.now()}'; }
package:web is replacing dart:html and other web libraries as Dart's long-term web interop solution. To learn how to migrate from dart:html APIs to package:web, see our migration guide.
The generator scripts use a number of conventions to consistently handle Web IDL definitions:
JSObject.implements between extension types.JSArray and JSPromise.String.JSFunction.String instead of JSString.JSAny?.JSObject.Most of the APIs in this package are generated from public assets. See tool/README.md for information on the spec and IDL versions the package was generated from, and for the process for updating the package.