Skip to content

Commit

Permalink
refactor: Don't require Channel.Config.t's "json" prop
Browse files Browse the repository at this point in the history
  • Loading branch information
amsross committed Mar 17, 2020
1 parent aba40e7 commit 19c97e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/AmqpConnectionManager.re
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ module Channel = {
[@bs.send] external nack: (t, Queue.message) => unit = "nack";

module Config = {
type nonrec t = {
.
"json": bool,
"setup": t => Js.Promise.t(unit),
};
type nonrec t('a) = {.. "setup": t => Js.Promise.t(unit)} as 'a;
};

[@bs.send]
Expand Down Expand Up @@ -130,7 +126,7 @@ module AmqpConnectionManager = {
"on";

[@bs.send]
external createChannel: (t, Channel.Config.t) => ChannelWrapper.t =
external createChannel: (t, Channel.Config.t('a)) => ChannelWrapper.t =
"createChannel";
};

Expand Down
6 changes: 1 addition & 5 deletions src/AmqpConnectionManager.rei
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ module Channel: {
let nack: t => nack;

module Config: {
type nonrec t = {
.
"json": bool,
"setup": t => Js.Promise.t(unit),
};
type nonrec t('a) = {.. "setup": t => Js.Promise.t(unit)} as 'a;
};

let assertExchange:
Expand Down

0 comments on commit 19c97e3

Please sign in to comment.