@@ -5,17 +5,17 @@ import {
55 isSdkClient ,
66 isString ,
77} from '@aws-lambda-powertools/commons' ;
8- import { GetOptions } from './GetOptions.js' ;
9- import { GetMultipleOptions } from './GetMultipleOptions.js' ;
10- import { ExpirableValue } from './ExpirableValue.js' ;
11- import { GetParameterError , TransformParameterError } from '../errors.js' ;
128import { EnvironmentVariablesService } from '../config/EnvironmentVariablesService.js' ;
13- import { transformValue } from './transformValue .js' ;
9+ import { GetParameterError , TransformParameterError } from '../errors .js' ;
1410import type {
1511 BaseProviderInterface ,
1612 GetMultipleOptionsInterface ,
1713 GetOptionsInterface ,
1814} from '../types/BaseProvider.js' ;
15+ import { ExpirableValue } from './ExpirableValue.js' ;
16+ import { GetMultipleOptions } from './GetMultipleOptions.js' ;
17+ import { GetOptions } from './GetOptions.js' ;
18+ import { transformValue } from './transformValue.js' ;
1919
2020/**
2121 * Base class for all providers.
@@ -97,7 +97,7 @@ abstract class BaseProvider implements BaseProviderInterface {
9797 name : string ,
9898 options ?: GetOptionsInterface
9999 ) : Promise < unknown | undefined > {
100- const configs = new GetOptions ( options , this . envVarsService ) ;
100+ const configs = new GetOptions ( this . envVarsService , options ) ;
101101 const key = [ name , configs . transform ] . toString ( ) ;
102102
103103 if ( ! configs . forceFetch && ! this . hasKeyExpiredInCache ( key ) ) {
@@ -136,16 +136,15 @@ abstract class BaseProvider implements BaseProviderInterface {
136136 path : string ,
137137 options ?: GetMultipleOptionsInterface
138138 ) : Promise < unknown > {
139- const configs = new GetMultipleOptions ( options , this . envVarsService ) ;
139+ const configs = new GetMultipleOptions ( this . envVarsService , options ) ;
140140 const key = [ path , configs . transform ] . toString ( ) ;
141141
142142 if ( ! configs . forceFetch && ! this . hasKeyExpiredInCache ( key ) ) {
143- // If the code enters in this block, then the key must exist & not have been expired
144- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
143+ // biome-ignore lint/style/noNonNullAssertion: If the code enters in this block, then the key must exist & not have been expired
145144 return this . store . get ( key ) ! . value as Record < string , unknown > ;
146145 }
147146
148- let values ;
147+ let values : Record < string , unknown > | undefined ;
149148 try {
150149 values = await this . _getMultiple ( path , options ) ;
151150 if ( ! isRecord ( values ) ) {
@@ -216,7 +215,7 @@ abstract class BaseProvider implements BaseProviderInterface {
216215 protected abstract _getMultiple (
217216 path : string ,
218217 options ?: unknown
219- ) : Promise < Record < string , unknown > | void > ;
218+ ) : Promise < Record < string , unknown > | undefined > ;
220219}
221220
222221export { BaseProvider } ;
0 commit comments