Chromium Code Reviews| Index: tool/input_sdk/lib/core/annotations.dart |
| diff --git a/tool/input_sdk/lib/core/annotations.dart b/tool/input_sdk/lib/core/annotations.dart |
| index 5ceed34fd63bb8b0f3123bb06c892afa9cbe3d5e..8433b8baac53f6f8f38925a4e640f99196131c5e 100644 |
| --- a/tool/input_sdk/lib/core/annotations.dart |
| +++ b/tool/input_sdk/lib/core/annotations.dart |
| @@ -4,6 +4,31 @@ |
| part of dart.core; |
| +// TODO(jacobr): move these annotations to a different package. E.g. dart:js |
| + |
| +class JsName { |
| + /// The JavaScript name. |
| + /// Used for classes and libraries. |
| + /// Note that this could be an expression, e.g. `lib.TypeName` in JS, but it |
| + /// should be kept simple, as it will be generated directly into the code. |
| + final String name; |
| + const JsName({this.name}); |
| +} |
| + |
| +class JsPeerInterface { |
| + /// The JavaScript type that we should match the API of. |
| + /// Used for classes where Dart subclasses should be callable from JavaScript |
| + /// matching the JavaScript calling conventions. |
| + final String name; |
| + const JsPeerInterface({this.name}); |
| +} |
| + |
| +/// Whether an interface is allowed to have JavaScript implementations that |
|
vsm
2015/04/03 16:41:20
Perhaps: A Dart interface may only be implemented
Jacob
2015/04/03 20:25:59
That is correct and clearer. Done.
|
| +/// use extension methods to provide custom Dart behavior. |
| +class SupportJsExtensionMethod { |
|
Jennifer Messerly
2015/04/03 16:25:29
supports?
Jacob
2015/04/03 20:25:59
This annotation name is bad. Got any better ideas?
|
| + const SupportJsExtensionMethod(); |
| +} |
| + |
| /** |
| * The annotation `@Deprecated('expires when')` marks a feature as deprecated. |
| * |