Skip to content

Commit

Permalink
chore: remove anys from decode helper function (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn authored Sep 4, 2024
1 parent 2b73575 commit 0691e74
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,8 @@ function mutatingSetSchemaDef<T extends ProtoTypes, K extends ValidSchemaDef>(
obj: T,
props: K
): ProtoTypesWithSchemaInfo {
for (const prop of Object.keys(props)) {
;(obj as any)[prop] = (props as any)[prop]
}
return obj as any
Object.assign(obj, props)
return obj as ProtoTypesWithSchemaInfo
}

// function mutatingOmit<T, K extends keyof any>(obj: T, key: K): OmitUnion<T, K> {
Expand Down

0 comments on commit 0691e74

Please sign in to comment.