MCPcopy Create free account
hub / github.com/effect-app/libs / dropUndefinedT

Function dropUndefinedT

packages/effect-app/src/utils.ts:64–72  ·  view source on GitHub ↗
(
  input: A
)

Source from the content-addressed store, hash-verified

62 */
63type NoUndefinedField<T> = { [P in keyof T]: Exclude<T[P], undefined> }
64export function dropUndefinedT<A extends Record<string, any>>(
65 input: A
66): NoUndefinedField<A> {
67 const newR = pipe(
68 input,
69 Record.filter((x): x is A => x !== undefined)
70 )
71 return newR as any
72}
73
74type IsOptional<T extends Record<any, any>, K extends keyof T> = {} extends Pick<T, K> ? true : false
75

Callers 5

Cosmos.tsFile · 0.90
bulkSetInternalFunction · 0.90
makeSendgridFunction · 0.90
renderMessageFunction · 0.90
toFilterFunction · 0.90

Calls 2

pipeFunction · 0.90
filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…