dart-sdk/sdk
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 [dart2js] Handle private names correctly in K/J-model 2022-08-11 06:56:32 +00:00
lib [pkg:js] Add validation for @JSExport and createDartExport 2022-10-24 17:37:09 +00:00
.gitignore [sdk] Generate a version file for the unpatched SDK 2022-05-05 10:36:05 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn [dart2wasm] Fix paths for snapshot. 2022-10-18 09:25:33 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00