diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap index f0c4b6a6748..7b3435c6478 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap @@ -34,7 +34,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): T1" documentation: kind: markdown - value: "```wing\nget: (key: str): T1\n```\n---\nReturns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found\n\n### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." + value: "```wing\nget: (key: str): T1\n```\n---\nReturns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or throw an error if the key can't be found\n\n### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." sortText: ff|get insertText: get($1) insertTextFormat: 2 diff --git a/libs/wingsdk/src/std/map.ts b/libs/wingsdk/src/std/map.ts index 043de008c52..3ba03bfd82e 100644 --- a/libs/wingsdk/src/std/map.ts +++ b/libs/wingsdk/src/std/map.ts @@ -178,7 +178,7 @@ export class MutMap { * @macro ((obj, key) => { if (!(key in obj)) throw new Error(`MutMap does not contain key: "${key}"`); return obj[key]; })($self$, $args$) * * @param key The key of the element to return. - * @returns The element associated with the specified key, or undefined if the key can't be found + * @returns The element associated with the specified key, or throw an error if the key can't be found */ public get(key: string): T1 { key;