event info speedcode any% this is horrifying

This commit is contained in:
MapleLeaf
2021-12-29 01:55:02 -06:00
parent 4fe5dd2cf9
commit ee8fbbbab4
6 changed files with 185 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
export function pruneNullishValues<T extends object>(
object: T,
): PruneNullishValues<T> {
const result: any = {}
for (const [key, value] of Object.entries(object)) {
if (value != undefined) {
result[key] = value
}
}
return result
}
type PruneNullishValues<T> = {
[Key in keyof T]: NonNullable<T[Key]>
}