mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-30 18:36:22 +01:00 
			
		
		
		
	Fix remaining typescript issues, enable tsc (#32840)
				
					
				
			Fixes 79 typescript errors. Discovered at least two bugs in `notifications.ts`, and I'm pretty sure this feature was at least partially broken and may still be, I don't really know how to test it. After this, only like ~10 typescript errors remain in the codebase but those are harder to solve. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -134,16 +134,16 @@ export function toAbsoluteUrl(url: string): string { | ||||
|   return `${window.location.origin}${url}`; | ||||
| } | ||||
|  | ||||
| // Encode an ArrayBuffer into a URLEncoded base64 string. | ||||
| export function encodeURLEncodedBase64(arrayBuffer: ArrayBuffer): string { | ||||
|   return encode(arrayBuffer) | ||||
| // Encode an Uint8Array into a URLEncoded base64 string. | ||||
| export function encodeURLEncodedBase64(uint8Array: Uint8Array): string { | ||||
|   return encode(uint8Array) | ||||
|     .replace(/\+/g, '-') | ||||
|     .replace(/\//g, '_') | ||||
|     .replace(/=/g, ''); | ||||
| } | ||||
|  | ||||
| // Decode a URLEncoded base64 to an ArrayBuffer. | ||||
| export function decodeURLEncodedBase64(base64url: string): ArrayBuffer { | ||||
| // Decode a URLEncoded base64 to an Uint8Array. | ||||
| export function decodeURLEncodedBase64(base64url: string): Uint8Array { | ||||
|   return decode(base64url | ||||
|     .replace(/_/g, '/') | ||||
|     .replace(/-/g, '+')); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user