dart-sdk/pkg/dart2wasm
Srujan Gaddam 7f93985005 [pkg:js] Add validation for @JSExport and createDartExport
Creates an external createDartExport function in js_util.

Adds a number of checks for the annotation:
- Classes with the annotation should not have value in the annotation
- Classes with the annotation should have at least one instance member
somewhere in the hierarchy
- There are no export name collisions that are unresolvable accounting
for overrides
- Members with this annotation are instance members with a body only

Also adds checks to createDartExport:
- Checks that the type is a Dart class
- Checks that the type is marked as exportable

Change-Id: I52f27275966e9603e88921ce7897b7615178c4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259511
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
..
bin [dart2wasm] Wire up cfe experimental flags. 2022-10-17 21:01:33 +00:00
lib [pkg:js] Add validation for @JSExport and createDartExport 2022-10-24 17:37:09 +00:00
analysis_options.yaml [pkg/dart2wasm] use package:lints for analysis 2022-07-07 00:16:01 +00:00
dart2wasm.md [dart2wasm] Partially lazy constants 2022-09-28 15:20:46 +00:00
OWNERS
pubspec.yaml [dart2wasm] Partially lazy constants 2022-09-28 15:20:46 +00:00