UNPKG

@aws-lambda-powertools/parameters

Version:
24 lines (23 loc) 647 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetOptions = void 0; const constants_js_1 = require("../constants.js"); /** * Options for the `get` method. * * It merges the default options with the provided options. */ class GetOptions { forceFetch = false; maxAge; sdkOptions; transform; constructor(envVarsService, options = {}) { Object.assign(this, options); if (options.maxAge === undefined) { this.maxAge = envVarsService.getParametersMaxAge() ?? constants_js_1.DEFAULT_MAX_AGE_SECS; } } } exports.GetOptions = GetOptions;