feat: add constructors without type arguments.
As the constructed objects have an any type, the
resulting containers are assignable to any type:
    var x: Map<string, number> = new Map();
That is useful to avoid having to specify types
twice when declaration and assignment are in
different places.
			
			
This commit is contained in:
		
							parent
							
								
									58b38c9201
								
							
						
					
					
						commit
						35e882e74f
					
				
							
								
								
									
										2
									
								
								modules/angular2/traceur-runtime.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								modules/angular2/traceur-runtime.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -45,6 +45,7 @@ interface Map<K, V> { | ||||
|   size: number; | ||||
| } | ||||
| declare var Map: { | ||||
|   new (): Map<any, any>; | ||||
|   new<K, V>(): Map<K, V>; | ||||
|   // alexeagle: PATCHED
 | ||||
|   new<K, V>(m: Map<K, V>): Map<K, V>; | ||||
| @ -61,6 +62,7 @@ interface Set<T> { | ||||
|   size: number; | ||||
| } | ||||
| declare var Set: { | ||||
|   new (): Set<any>; | ||||
|   new<T>(): Set<T>; | ||||
|   // alexeagle PATCHED
 | ||||
|   new<T>(s: Set<T>): Set<T>; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user