Skip to content

Commit 2c483ec

Browse files
committed
removed unnecessary '@bs.as' attributes; formatting
1 parent 9d0169f commit 2c483ec

File tree

16 files changed

+664
-247
lines changed

16 files changed

+664
-247
lines changed

src/Assert.re

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,30 @@
44
[@bs.module "assert"] external deepEqual: ('a, 'a) => unit = "deepEqual";
55
[@bs.module "assert"] external notDeepEqual: ('a, 'a) => unit = "notDeepEqual";
66
[@bs.module "assert"] external strictEqual: ('a, 'a) => unit = "strictEqual";
7-
[@bs.module "assert"] external notStrictEqual: ('a, 'a) => unit = "notStrictEqual";
8-
[@bs.module "assert"] external deepStrictEqual: ('a, 'a) => unit = "deepStrictEqual";
9-
[@bs.module "assert"] external notDeepStrictEqual: ('a, 'a) => unit = "notDeepStrictEqual";
7+
[@bs.module "assert"]
8+
external notStrictEqual: ('a, 'a) => unit = "notStrictEqual";
9+
[@bs.module "assert"]
10+
external deepStrictEqual: ('a, 'a) => unit = "deepStrictEqual";
11+
[@bs.module "assert"]
12+
external notDeepStrictEqual: ('a, 'a) => unit = "notDeepStrictEqual";
1013

1114
[@bs.module "assert"] external throws: (unit => 'a) => unit = "throws";
12-
[@bs.module "assert"] external throwsError: (unit => 'a, 'e) => unit = "throws";
13-
[@bs.module "assert"] external doesNotThrow: (unit => 'a) => unit = "doesNotThrow";
14-
[@bs.module "assert"] external doesNotThrowError: (unit => 'a, 'e) => unit = "doesNotThrow";
15+
[@bs.module "assert"]
16+
external throwsError: (unit => 'a, 'e) => unit = "throws";
17+
[@bs.module "assert"]
18+
external doesNotThrow: (unit => 'a) => unit = "doesNotThrow";
19+
[@bs.module "assert"]
20+
external doesNotThrowError: (unit => 'a, 'e) => unit = "doesNotThrow";
1521

1622
[@bs.module "assert"] external ifError: 'a => unit = "ifError";
17-
[@bs.module "assert"] external rejects: (unit => Js.Promise.t('a)) => unit = "rejects";
18-
[@bs.module "assert"] external rejectsError: (unit => Js.Promise.t('a), 'e) => unit = "rejects";
23+
[@bs.module "assert"]
24+
external rejects: (unit => Js.Promise.t('a)) => unit = "rejects";
25+
[@bs.module "assert"]
26+
external rejectsError: (unit => Js.Promise.t('a), 'e) => unit = "rejects";
1927
[@bs.module "assert"]
2028
external doesNotReject: (unit => Js.Promise.t('a)) => unit = "doesNotReject";
2129
[@bs.module "assert"]
22-
external doesNotRejectError: (unit => Js.Promise.t('a), 'e) => unit = "doesNotReject";
30+
external doesNotRejectError: (unit => Js.Promise.t('a), 'e) => unit =
31+
"doesNotReject";
2332

2433
module AssertionError = Errors.AssertionError;

src/Crypto.re

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ module KeyObject = {
1010
type privateKey = [ | `PrivateKey];
1111
type secretKey = [ | `SecretKey];
1212
[@bs.send]
13-
external symmetricExport: t(symmetric, [< publicKey | privateKey]) => Buffer.t = "export";
13+
external symmetricExport:
14+
t(symmetric, [< publicKey | privateKey]) => Buffer.t =
15+
"export";
1416
[@bs.send]
15-
external asymmetricExport: t(asymmetric, [< publicKey | privateKey | secretKey]) => Buffer.t =
17+
external asymmetricExport:
18+
t(asymmetric, [< publicKey | privateKey | secretKey]) => Buffer.t =
1619
"export";
1720
module Symmetric = {
18-
type kind = [ | symmetric ];
21+
type kind = [ symmetric];
1922
type nonrec t('a) = t([ kind], 'a);
2023
module Impl = {};
2124
};
2225
module Asymmetric = {
23-
type kind = [ | asymmetric];
26+
type kind = [ asymmetric];
2427
type nonrec t('a) = t([ kind], 'a);
2528
module Impl = {};
2629
};
@@ -59,7 +62,8 @@ module PublicKey = {
5962

6063
module Hash = {
6164
type kind = [ Stream.transform | `Hash];
62-
type subtype('w, 'r, 'a) = Stream.Transform.subtype('w, 'r, [> kind] as 'a);
65+
type subtype('w, 'r, 'a) =
66+
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
6367
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
6468
type t = subtype(Buffer.t, Buffer.t, kind);
6569
module Impl = {
@@ -75,7 +79,8 @@ module Hash = {
7579

7680
module Hmac = {
7781
type kind = [ Stream.transform | `Hmac];
78-
type subtype('w, 'r, 'a) = Stream.Transform.subtype('w, 'r, [> kind] as 'a);
82+
type subtype('w, 'r, 'a) =
83+
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
7984
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
8085
type t = subtype(Buffer.t, Buffer.t, kind);
8186
module Impl = {
@@ -86,18 +91,23 @@ module Hmac = {
8691
include Impl;
8792
};
8893

89-
[@bs.module "crypto"] external createHmac: (string, ~key: string) => Hmac.t = "createHmac";
94+
[@bs.module "crypto"]
95+
external createHmac: (string, ~key: string) => Hmac.t = "createHmac";
9096

9197
module Certificate = {
9298
type t;
93-
[@bs.send] external exportChallenge: (t, Buffer.t) => Buffer.t = "exportChallenge";
94-
[@bs.send] external exportPublicKey: (t, Buffer.t) => Buffer.t = "exportPublicKey";
95-
[@bs.send] external verifyCertificate: (t, Buffer.t) => bool = "verifyCertificate";
99+
[@bs.send]
100+
external exportChallenge: (t, Buffer.t) => Buffer.t = "exportChallenge";
101+
[@bs.send]
102+
external exportPublicKey: (t, Buffer.t) => Buffer.t = "exportPublicKey";
103+
[@bs.send]
104+
external verifyCertificate: (t, Buffer.t) => bool = "verifyCertificate";
96105
};
97106

98107
module Cipher = {
99108
type kind = [ Stream.transform | `Cipher];
100-
type subtype('w, 'r, 'a) = Stream.Transform.subtype('w, 'r, [> kind] as 'a);
109+
type subtype('w, 'r, 'a) =
110+
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
101111
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
102112
type t = subtype(Buffer.t, Buffer.t, kind);
103113
module Impl = {
@@ -106,7 +116,12 @@ module Cipher = {
106116
[@bs.send] external setAAD: (t, Buffer.t) => t = "setAAD";
107117
[@bs.send]
108118
external setAADWith:
109-
(t, Buffer.t, ~options: Stream.Transform.makeOptions(Buffer.t, Buffer.t)) => t =
119+
(
120+
t,
121+
Buffer.t,
122+
~options: Stream.Transform.makeOptions(Buffer.t, Buffer.t)
123+
) =>
124+
t =
110125
"setAAD";
111126
[@bs.send] external getAuthTag: t => Buffer.t = "getAuthTag";
112127
[@bs.send] external setAutoPadding: (t, bool) => t = "setAutoPadding";
@@ -136,19 +151,31 @@ module Cipher = {
136151

137152
module Decipher = {
138153
type kind = [ Stream.transform | `Decipher];
139-
type subtype('w, 'r, 'a) = Stream.Transform.subtype('w, 'r, [> kind] as 'a);
154+
type subtype('w, 'r, 'a) =
155+
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
140156
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
141157
type t = subtype(Buffer.t, Buffer.t, kind);
142158
module Impl = {
143-
[@bs.send] external final: (subtype('w, 'r, 'a), string) => Buffer.t = "final";
144-
[@bs.send] external setAAD: (subtype('w, 'r, 'a), Buffer.t) => t = "setAAD";
159+
[@bs.send]
160+
external final: (subtype('w, 'r, 'a), string) => Buffer.t = "final";
161+
[@bs.send]
162+
external setAAD: (subtype('w, 'r, 'a), Buffer.t) => t = "setAAD";
145163
[@bs.send]
146164
external setAADWith:
147-
(subtype('w, 'r, 'a), Buffer.t, ~options: Stream.Transform.makeOptions(Buffer.t, Buffer.t)) => t =
165+
(
166+
subtype('w, 'r, 'a),
167+
Buffer.t,
168+
~options: Stream.Transform.makeOptions(Buffer.t, Buffer.t)
169+
) =>
170+
t =
148171
"setAAD";
149-
[@bs.send] external setAuthTag: (subtype('w, 'r, 'a), Buffer.t) => t = "setAuthTag";
150-
[@bs.send] external setAutoPatting: (subtype('w, 'r, 'a), bool) => t = "setAutoPadding";
151-
[@bs.send] external update: (subtype('w, 'r, 'a), Buffer.t) => Buffer.t = "update";
172+
[@bs.send]
173+
external setAuthTag: (subtype('w, 'r, 'a), Buffer.t) => t = "setAuthTag";
174+
[@bs.send]
175+
external setAutoPatting: (subtype('w, 'r, 'a), bool) => t =
176+
"setAutoPadding";
177+
[@bs.send]
178+
external update: (subtype('w, 'r, 'a), Buffer.t) => Buffer.t = "update";
152179
};
153180
include Impl;
154181
[@bs.module "crypto"]

src/Fs.re

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ type mkdtempOptions;
336336
[@bs.obj] external mdktempOptions: unit => mkdtempOptions;
337337

338338
[@bs.module "fs"] [@bs.scope "promises"]
339-
external mkdtemp: (string, mkdtempOptions) => Js.Promise.t(string) = "mkddtemp";
339+
external mkdtemp: (string, mkdtempOptions) => Js.Promise.t(string) =
340+
"mkddtemp";
340341

341342
[@bs.module "fs"] [@bs.scope "promises"]
342343
external mkdtempWith: (string, mkdtempOptions) => Js.Promise.t(string) =

0 commit comments

Comments
 (0)