@@ -11,6 +11,7 @@ import {
1111import { isHttpDestination } from './destination-service-types' ;
1212import { setForwardedAuthTokenIfNeeded } from './forward-auth-token' ;
1313import type { Destination } from './destination-service-types' ;
14+ import type { DestinationConfiguration } from './destination' ;
1415import type { DestinationFetchOptions } from './destination-accessor-types' ;
1516
1617const logger = createLogger ( {
@@ -37,14 +38,15 @@ export function getDestinationsFromEnv(): Destination[] {
3738 } catch ( err ) {
3839 throw new ErrorWithCause (
3940 'Error in parsing the destinations from the environment variable.' ,
40- err
41+ err as Error
4142 ) ;
4243 }
4344 validateDestinations ( destinations ) ;
44- return destinations . map ( destination =>
45- isDestinationConfiguration ( destination )
46- ? parseDestination ( destination )
47- : sanitizeDestination ( destination )
45+ return destinations . map (
46+ ( destination : DestinationConfiguration | Destination ) =>
47+ isDestinationConfiguration ( destination )
48+ ? parseDestination ( destination )
49+ : sanitizeDestination ( destination )
4850 ) ;
4951 }
5052 return [ ] ;
@@ -118,7 +120,7 @@ export function searchEnvVariablesForDestination(
118120 }
119121 } catch ( error ) {
120122 logger . error (
121- `Error in reading the given destinations from the environment variable ${ error . message } .`
123+ `Error in reading the given destinations from the environment variable ${ ( error as Error ) . message } .`
122124 ) ;
123125 }
124126 }
0 commit comments