| 
									
										
										
										
											2018-12-13 15:51:47 -08:00
										 |  |  | /** | 
					
						
							|  |  |  | * @license | 
					
						
							|  |  |  | * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  | * | 
					
						
							|  |  |  | * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  | * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2019-08-15 14:14:25 +01:00
										 |  |  | import {initNgDevMode} from '../util/ng_dev_mode'; | 
					
						
							| 
									
										
										
										
											2018-12-13 15:51:47 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * This file contains reuseable "empty" symbols that can be used as default return values | 
					
						
							|  |  |  |  * in different parts of the rendering code. Because the same symbols are returned, this | 
					
						
							|  |  |  |  * allows for identity checks against these values to be consistently used by the framework | 
					
						
							|  |  |  |  * code. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const EMPTY_OBJ: {} = {}; | 
					
						
							|  |  |  | export const EMPTY_ARRAY: any[] = []; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // freezing the values prevents any code from accidentally inserting new values in
 | 
					
						
							| 
									
										
										
										
											2019-08-15 14:14:25 +01:00
										 |  |  | if ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) { | 
					
						
							| 
									
										
										
										
											2019-05-02 16:44:24 +01:00
										 |  |  |   // These property accesses can be ignored because ngDevMode will be set to false
 | 
					
						
							|  |  |  |   // when optimizing code and the whole if statement will be dropped.
 | 
					
						
							|  |  |  |   // tslint:disable-next-line:no-toplevel-property-access
 | 
					
						
							| 
									
										
										
										
											2018-12-13 15:51:47 -08:00
										 |  |  |   Object.freeze(EMPTY_OBJ); | 
					
						
							| 
									
										
										
										
											2019-05-02 16:44:24 +01:00
										 |  |  |   // tslint:disable-next-line:no-toplevel-property-access
 | 
					
						
							| 
									
										
										
										
											2018-12-13 15:51:47 -08:00
										 |  |  |   Object.freeze(EMPTY_ARRAY); | 
					
						
							|  |  |  | } |