mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	Convert frontend code to typescript (#31559)
None of the frontend js/ts files was touched besides these two commands
(edit: no longer true, I touched one file in
61105d0618
because of a deprecation that was not showing before the rename).
`tsc` currently reports 778 errors, so I have disabled it in CI as
planned.
Everything appears to work fine.
			
			
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| import {toAbsoluteLocaleDate} from './absolute-date.js'; | ||||
| import {toAbsoluteLocaleDate} from './absolute-date.ts'; | ||||
| 
 | ||||
| test('toAbsoluteLocaleDate', () => { | ||||
|   expect(toAbsoluteLocaleDate('2024-03-15', 'en-US', { | ||||
| @@ -1,5 +0,0 @@ | ||||
| import './polyfills.js'; | ||||
| import '@github/relative-time-element'; | ||||
| import './origin-url.js'; | ||||
| import './overflow-menu.js'; | ||||
| import './absolute-date.js'; | ||||
							
								
								
									
										5
									
								
								web_src/js/webcomponents/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								web_src/js/webcomponents/index.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| import './polyfills.ts'; | ||||
| import '@github/relative-time-element'; | ||||
| import './origin-url.ts'; | ||||
| import './overflow-menu.ts'; | ||||
| import './absolute-date.ts'; | ||||
| @@ -1,4 +1,4 @@ | ||||
| import {toOriginUrl} from './origin-url.js'; | ||||
| import {toOriginUrl} from './origin-url.ts'; | ||||
| 
 | ||||
| test('toOriginUrl', () => { | ||||
|   const oldLocation = window.location; | ||||
| @@ -1,6 +1,6 @@ | ||||
| import {throttle} from 'throttle-debounce'; | ||||
| import {createTippy} from '../modules/tippy.js'; | ||||
| import {isDocumentFragmentOrElementNode} from '../utils/dom.js'; | ||||
| import {createTippy} from '../modules/tippy.ts'; | ||||
| import {isDocumentFragmentOrElementNode} from '../utils/dom.ts'; | ||||
| import octiconKebabHorizontal from '../../../public/assets/img/svg/octicon-kebab-horizontal.svg'; | ||||
| 
 | ||||
| window.customElements.define('overflow-menu', class extends HTMLElement { | ||||
		Reference in New Issue
	
	Block a user