Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart

Issue 1153003003: fixes #40, extension methods for primitive types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart
diff --git a/test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart b/test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart
index 1e63cf99a61c7774b6d5735ea8915acc36ed0e16..c427fed3d05dba14e737f458746ec1b4bb86376e 100644
--- a/test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart
+++ b/test/generated_sdk/lib/_internal/compiler/js_lib/annotations.dart
@@ -34,3 +34,28 @@ class Native {
final String name;
const Native(this.name);
}
+
+// TODO(jmesserly): move these somewhere else, e.g. package:js or 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});
+}
+
+/// A Dart interface may only be implemented by a native JavaScript object
+/// if it is marked with this annotation.
+class SupportJsExtensionMethod {
+ const SupportJsExtensionMethod();
+}

Powered by Google App Engine
This is Rietveld 408576698