Skip to content

Instantly share code, notes, and snippets.

@nvitaterna
nvitaterna / windows-11-install.md
Last active May 4, 2024 16:21
Windows 11 Post Install
ad.doubleclick.net
adservice.google.com
adservice.google.ca
monitor.ppcprotect.com
analytics.plex.tv
@nvitaterna
nvitaterna / null-to-undefined.ts
Last active May 21, 2021 19:44
Typesafe function to convert all possible null values to undefined recursively
type UndefinedProperties<T> = {
[P in keyof T]-?: undefined extends T[P] ? P : never;
}[keyof T];
type ToOptional<T> = Partial<Pick<T, UndefinedProperties<T>>> &
Pick<T, Exclude<keyof T, UndefinedProperties<T>>>;
type NeverFallback<T> = [T] extends [never] ? undefined : T;
export type ExcludeNull<O extends unknown> = O extends Record<string, unknown>