Browse Source

documentation [skip ci]

Dan Korostelev 7 năm trước cách đây
mục cha
commit
ed66aa722b
1 tập tin đã thay đổi với 23 bổ sung0 xóa
  1. 23 0
      std/js/Syntax.hx

+ 23 - 0
std/js/Syntax.hx

@@ -2,16 +2,39 @@ package js;
 
 import haxe.extern.Rest;
 
+/**
+	Generate JavaScript syntax not directly supported by Haxe.
+	Use only at low-level when specific target-specific code-generation is required.
+**/
 extern class Syntax {
+	/**
+		Generate `new cl(...args)` expression.
+	**/
 	@:overload(function(cl:String, args:Rest<Dynamic>):Dynamic {})
 	static function new_<T>(cl:Class<T>, args:Rest<Dynamic>):T;
 
+	/**
+		Generate `v instanceof cl` expression.
+	**/
 	@:pure static function instanceof(v:Dynamic, cl:Class<Dynamic>):Bool;
 
+	/**
+		Generate `typeof o` expression.
+	**/
 	@:pure static function typeof(o:Dynamic):String;
 
+	/**
+		Genearte `a === b` expression.
+	**/
 	@:pure static function strictEq(a:Dynamic, b:Dynamic):Bool;
+
+	/**
+		Genearte `a !== b` expression.
+	**/
 	@:pure static function strictNeq(a:Dynamic, b:Dynamic):Bool;
 
+	/**
+		Generate `delete o[f]` expression.
+	**/
 	static function delete(o:Dynamic, f:String):Void;
 }