mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	chore(utils/safeExtractMessageAndStackFromError): add explicit return type to have it as a named tuple
This commit is contained in:
		
							parent
							
								
									c2aae45456
								
							
						
					
					
						commit
						2a5ac80c05
					
				@ -363,7 +363,7 @@ export function processStringOrBuffer(data: string | Buffer | null) {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function safeExtractMessageAndStackFromError(err: unknown) {
 | 
			
		||||
export function safeExtractMessageAndStackFromError(err: unknown): [errMessage: string, errStack: string | undefined] {
 | 
			
		||||
    return (err instanceof Error) ? [err.message, err.stack] as const : ["Unknown Error", undefined] as const;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user