mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 18:44:46 +01:00 
			
		
		
		
	Adds types to various low-level modules. All changes are type-only, no runtime changes. `tsc` now reports 38 less errors. One problem was that `@types/sortablejs` does not accept promise return in its functions which triggered the linter, so I disabled the rules on those line.
		
			
				
	
	
		
			12 lines
		
	
	
		
			368 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			368 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import {reactive} from 'vue';
 | |
| import type {Reactive} from 'vue';
 | |
| 
 | |
| let diffTreeStoreReactive: Reactive<Record<string, any>>;
 | |
| export function diffTreeStore() {
 | |
|   if (!diffTreeStoreReactive) {
 | |
|     diffTreeStoreReactive = reactive(window.config.pageData.diffFileInfo);
 | |
|     window.config.pageData.diffFileInfo = diffTreeStoreReactive;
 | |
|   }
 | |
|   return diffTreeStoreReactive;
 | |
| }
 |