Browse Source

put override for node.getJSComponent that allows you to use the generic version

Shaddock Heath 9 years ago
parent
commit
949901101b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Script/Packages/Atomic/Scene.json

+ 3 - 2
Script/Packages/Atomic/Scene.json

@@ -42,7 +42,8 @@
 			"getComponent<T extends Atomic.Component>(type: string): T;",
 			"getComponent<T extends Atomic.Component>(type: string): T;",
 			"getChildAtIndex(index:number):Node;",
 			"getChildAtIndex(index:number):Node;",
 			"createJSComponent(name:string, args?:{});",
 			"createJSComponent(name:string, args?:{});",
-			"getJSComponent(name:string, recursive?:boolean):JSComponent;",
+			"getJSComponent(name:string, recursive?:boolean): JSComponent;",
+			"getJSComponent<T extends Atomic.JSComponent>(name:string, recursive?:boolean): T;",
 			"createChildPrefab(childName:string, prefabPath:string):Node;",
 			"createChildPrefab(childName:string, prefabPath:string):Node;",
 			"loadPrefab(prefabPath:string):boolean;",
 			"loadPrefab(prefabPath:string):boolean;",
 			"createComponent<T extends Atomic.Component>(type: string, mode?: CreateMode, id?: number): T;",
 			"createComponent<T extends Atomic.Component>(type: string, mode?: CreateMode, id?: number): T;",
@@ -52,7 +53,7 @@
 			"getMainCamera():Camera;"
 			"getMainCamera():Camera;"
 		],
 		],
 		"Component": [
 		"Component": [
-		    "getComponent<T extends Atomic.Component>(type: string):T;"
+		    "getComponent<T extends Atomic.Component>(type: string): T;"
 		]
 		]
 	},
 	},
 	"haxe_decl" : {
 	"haxe_decl" : {