import type { DeepReadonly } from '../Math' export type { DeepReadonly } export function deepReadonly>( val: T ): DeepReadonly { // Fail only on development due to perf issues // if (isProd()) { // return val // } return Object.freeze({ ...val }) } export function isNotUndefined(val: T | undefined): val is T { return !!val }