Skip to content

Commit d377e9e

Browse files
authored
🤖 Merge PR DefinitelyTyped#74676 [aws-cloudfront-function] fix: make kvsId optional in kvs() by @y-hsgw
1 parent c85d8dd commit d377e9e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎types/aws-cloudfront-function/aws-cloudfront-function-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ function handler2(event: AWSCloudFrontFunction.Event): AWSCloudFrontFunction.Req
138138
import cf from "cloudfront";
139139

140140
const kvsHandle = cf.kvs("example-kvs-id");
141+
const defaultKvsHandle = cf.kvs();
141142

142143
async function handler3(
143144
event: AWSCloudFrontFunction.Event,

‎types/aws-cloudfront-function/index.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ declare namespace AWSCloudFrontFunction {
6363
declare module "cloudfront" {
6464
/**
6565
* Retrieves a reference to a CloudFront Key-Value Store (KVS) by its ID.
66-
* @param kvsId The identifier of the KVS to use.
66+
* @param kvsId The identifier of the KVS to use (optional).
6767
* @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-custom-methods.html
6868
*/
69-
function kvs(kvsId: string): KVStore;
69+
function kvs(kvsId?: string): KVStore;
7070

7171
interface KVStore {
7272
/**

0 commit comments

Comments
 (0)