MCPcopy
hub / github.com/desktop/desktop / assertNonNullable

Function assertNonNullable

app/src/lib/fatal-error.ts:42–49  ·  view source on GitHub ↗
(
  x: T,
  message: string
)

Source from the content-addressed store, hash-verified

40 * value is defined.
41 */
42export function assertNonNullable<T>(
43 x: T,
44 message: string
45): asserts x is NonNullable<T> {
46 if (x == null) {
47 return fatalError(message)
48 }
49}

Callers 9

packageWindowsFunction · 0.90
tag-test.tsFile · 0.90
branch-test.tsFile · 0.90
checkConstraintFunction · 0.90
toGitHubRepositoryMethod · 0.90
toRepositoryMethod · 0.90
getAllMethod · 0.90
createOwnerKeyFunction · 0.90
getDiffRowsFromHunkFunction · 0.90

Calls 1

fatalErrorFunction · 0.85

Tested by

no test coverage detected