MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / nullToUndefined

Function nullToUndefined

src/shared/utils.ts:199–201  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

197export type NullAsUndefined<T> = null extends T ? NonNullable<T> | undefined : T;
198
199export function nullToUndefined<T>(value: T): NullAsUndefined<T> {
200 return (value === null ? undefined : value) as NullAsUndefined<T>;
201}
202
203export function notUndefined<T>(x: T | undefined): x is T {
204 return x !== undefined;

Callers 9

runProcessFunction · 0.90
getSdkVersionFunction · 0.90
getPubGeneratorVersionFunction · 0.90
getConfigMethod · 0.90
getConfigMethod · 0.90
asDtdEditorDeviceMethod · 0.90
startMethod · 0.90
handleRequestMethod · 0.90
asApiDeviceMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected