Channel editor improvements & various fixes

This commit is contained in:
Sacha Weatherstone
2022-01-10 18:43:44 +11:00
parent d5e1ae4941
commit ce95c070e0
7 changed files with 371 additions and 366 deletions
+13
View File
@@ -57,3 +57,16 @@ declare module '*.png' {
}
/* CUSTOM: ADD YOUR OWN HERE */
type Primitive = string | number | boolean | symbol | undefined | null;
type DeepOmitHelper<T, K extends keyof T> = {
[P in K]: T[P] extends infer TP //extra level of indirection needed to trigger homomorhic behavior // distribute over unions
? TP extends Primitive
? TP // leave primitives and functions alone
: DeepOmit<TP, K>
: never;
};
type DeepOmit<T, K> = T extends Primitive
? T
: DeepOmitHelper<T, Exclude<keyof T, K>>;