Skip to content

Commit

Permalink
fix(unionstruct): allow undefined/null args
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 10, 2019
1 parent c51ff98 commit 9636495
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/unionstruct/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const makeField = (
export const typedef = (
spec: Field[],
struct: boolean,
buf?: ArrayBuffer,
buf?: ArrayBuffer | null,
offset = 0,
doAlign = true,
le = false
Expand Down Expand Up @@ -246,7 +246,7 @@ export const typedef = (

export const union = (
spec: Field[],
buf?: ArrayBuffer,
buf?: ArrayBuffer | null,
offset?: number,
doAlign?: boolean,
le?: boolean
Expand All @@ -256,7 +256,7 @@ export const union = (

export const struct = (
spec: Field[],
buf?: ArrayBuffer,
buf?: ArrayBuffer | null,
offset?: number,
doAlign?: boolean,
le?: boolean
Expand Down

0 comments on commit 9636495

Please sign in to comment.