Skip to content

Commit 734c98f

Browse files
committed
refactor: moved constants in separate file
1 parent 2a294ef commit 734c98f

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

packages/parameters/src/BaseProvider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { fromBase64 } from '@aws-sdk/util-base64-node';
22
import { GetOptions } from './GetOptions';
33
import { GetMultipleOptions } from './GetMultipleOptions';
44
import { ExpirableValue } from './ExpirableValue';
5+
import { TRANSFORM_METHOD_BINARY, TRANSFORM_METHOD_JSON } from './constants';
56
import { GetParameterError, TransformParameterError } from './Exceptions';
67
import type { BaseProviderInterface, GetMultipleOptionsInterface, GetOptionsInterface, TransformOptions } from './types';
78

8-
const TRANSFORM_METHOD_JSON = 'json';
9-
const TRANSFORM_METHOD_BINARY = 'binary';
10-
119
abstract class BaseProvider implements BaseProviderInterface {
1210
public store: Map<string, ExpirableValue>;
1311

packages/parameters/src/GetMultipleOptions.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { DEFAULT_MAX_AGE_SECS } from './constants';
12
import type { GetMultipleOptionsInterface, TransformOptions } from './types';
23

3-
const DEFAULT_MAX_AGE_SECS = 5;
4-
54
class GetMultipleOptions implements GetMultipleOptionsInterface {
65
public forceFetch: boolean = false;
76
public maxAge: number = DEFAULT_MAX_AGE_SECS;

packages/parameters/src/GetOptions.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { DEFAULT_MAX_AGE_SECS } from './constants';
12
import type { GetOptionsInterface, TransformOptions } from './types';
23

3-
const DEFAULT_MAX_AGE_SECS = 5;
4-
54
class GetOptions implements GetOptionsInterface {
65
public forceFetch: boolean = false;
76
public maxAge: number = DEFAULT_MAX_AGE_SECS;

packages/parameters/src/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const DEFAULT_MAX_AGE_SECS = 5;
2+
export const TRANSFORM_METHOD_JSON = 'json';
3+
export const TRANSFORM_METHOD_BINARY = 'binary';

0 commit comments

Comments
 (0)