mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 01:34:19 +08:00
7 lines
155 B
TypeScript
7 lines
155 B
TypeScript
export function unwrap<T>(value: T | null | undefined): T {
|
|
if (value == null) {
|
|
throw new Error('value must not be nullish');
|
|
}
|
|
return value;
|
|
}
|