-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from zth/integrate-node-bindings
Copy rescript-nodejs bindings into repo
- Loading branch information
Showing
82 changed files
with
7,365 additions
and
1,356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@module("node:assert") external ok: 'a => unit = "ok" | ||
@module("node:assert") external equal: ('a, 'a) => unit = "equal" | ||
@module("node:assert") external notEqual: ('a, 'a) => unit = "notEqual" | ||
@module("node:assert") external deepEqual: ('a, 'a) => unit = "deepEqual" | ||
@module("node:assert") external notDeepEqual: ('a, 'a) => unit = "notDeepEqual" | ||
@module("node:assert") external strictEqual: ('a, 'a) => unit = "strictEqual" | ||
@module("node:assert") | ||
external notStrictEqual: ('a, 'a) => unit = "notStrictEqual" | ||
@module("node:assert") | ||
external deepStrictEqual: ('a, 'a) => unit = "deepStrictEqual" | ||
@module("node:assert") | ||
external notDeepStrictEqual: ('a, 'a) => unit = "notDeepStrictEqual" | ||
@module("node:assert") | ||
external throws: (@uncurry (unit => 'a)) => unit = "throws" | ||
@module("node:assert") | ||
external throwsError: (@uncurry (unit => 'a), 'e) => unit = "throws" | ||
@module("node:assert") | ||
external doesNotThrow: (@uncurry (unit => 'a)) => unit = "doesNotThrow" | ||
@module("node:assert") | ||
external doesNotThrowError: (@uncurry (unit => 'a), 'e) => unit = "doesNotThrow" | ||
@module("node:assert") external ifError: 'a => unit = "ifError" | ||
@module("node:assert") | ||
external rejects: (@uncurry (unit => Js.Promise.t<'a>)) => unit = "rejects" | ||
@module("node:assert") | ||
external rejectsError: (@uncurry (unit => Js.Promise.t<'a>), 'e) => unit = "rejects" | ||
@module("node:assert") | ||
external doesNotReject: (@uncurry (unit => Js.Promise.t<'a>)) => unit = "doesNotReject" | ||
@module("node:assert") | ||
external doesNotRejectError: (@uncurry (unit => Js.Promise.t<'a>), 'e) => unit = "doesNotReject" | ||
|
||
module AssertionError = Errors.AssertionError |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
type t | ||
|
||
@val external fromInt: int => t = "BigInt" | ||
@val external fromFloat: float => t = "BigInt" | ||
@val external toInt: t => int = "Number" | ||
|
||
%%private(let _NEGATIVE_ONE = fromInt(-1)) | ||
|
||
external \"~-": t => t = "%negfloat" | ||
external \"+": (t, t) => t = "%addfloat" | ||
external \"-": (t, t) => t = "%subfloat" | ||
external \"*": (t, t) => t = "%mulfloat" | ||
external \"/": (t, t) => t = "%divfloat" | ||
let mod: (t, t) => t = Obj.magic(mod_float) | ||
let \"**": (t, t) => t = %raw(`function (a, b) { return (a ** b); }`) | ||
external land: (t, t) => t = "%andint" | ||
external lor: (t, t) => t = "%orint" | ||
external lxor: (t, t) => t = "%xorint" | ||
let lnot: t => t = x => lxor(x, _NEGATIVE_ONE) | ||
external lsl: (t, t) => t = "%lslint" | ||
external asr: (t, t) => t = "%asrint" | ||
|
||
external negate: t => t = "%negfloat" | ||
external add: (t, t) => t = "%addfloat" | ||
external subtract: (t, t) => t = "%subfloat" | ||
external multiply: (t, t) => t = "%mulfloat" | ||
external divide: (t, t) => t = "%divfloat" | ||
let modulo: (t, t) => t = Obj.magic(mod_float) | ||
let power: (t, t) => t = \"**" | ||
external logicalAnd: (t, t) => t = "%andint" | ||
external logicalOr: (t, t) => t = "%orint" | ||
external logicalXor: (t, t) => t = "%xorint" | ||
let logicalNot: t => t = x => lxor(x, _NEGATIVE_ONE) | ||
external logicalShiftLeft: (t, t) => t = "%lslint" | ||
external arithmeticShiftRight: (t, t) => t = "%asrint" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.