MCPcopy Index your code
hub / github.com/changesets/changesets / mapGetOrThrow

Function mapGetOrThrow

packages/assemble-release-plan/src/utils.ts:60–70  ·  view source on GitHub ↗
(
  map: Map<string, V>,
  key: string,
  errorMessage: string
)

Source from the content-addressed store, hash-verified

58}
59
60export function mapGetOrThrow<V extends {}>(
61 map: Map<string, V>,
62 key: string,
63 errorMessage: string
64): V {
65 const value = map.get(key);
66 if (value === undefined) {
67 throw new Error(errorMessage);
68 }
69 return value;
70}
71
72export function mapGetOrThrowInternal<V extends {}>(
73 map: Map<string, V>,

Callers 1

getRelevantChangesetsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected