Skip to content

Commit

Permalink
Update rescript-debounce to rescript@11
Browse files Browse the repository at this point in the history
  • Loading branch information
alex35mil committed Feb 16, 2024
1 parent da76cc8 commit 5546f71
Show file tree
Hide file tree
Showing 12 changed files with 6,086 additions and 7,081 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules/
lib/
.merlin
.bsb.lock
*.bs.js
*.res.js
6 changes: 3 additions & 3 deletions rescript-debounce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Then add it to `bsconfig.json`:

```rescript
// Pass function you want to debounce
let fn = Debounce.make(fn)
let fn = fn->Debounce.make
// You can configure timeout. Default is 100ms.
let fn = Debounce.make(~wait=500, fn)
let fn = fn->Debounce.make(~wait=500)
// This call is debounced
fn()
Expand All @@ -44,7 +44,7 @@ fn()
Also, you can get more control over the debouncing:

```rescript
let fn = Debounce.makeControlled(fn)
let fn = fn->Debounce.makeControlled
// Schedule invocation
fn.schedule()
Expand Down
120 changes: 0 additions & 120 deletions rescript-debounce/__tests__/Debounce_test.res

This file was deleted.

4 changes: 4 additions & 0 deletions rescript-debounce/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
plugins: [],
};
21 changes: 0 additions & 21 deletions rescript-debounce/bsconfig.json

This file was deleted.

5 changes: 5 additions & 0 deletions rescript-debounce/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
testEnvironment: "node",
testRegex: "tests/.*\\.res\\.js$",
transformIgnorePatterns: ["node_modules/(?!(rescript|@glennsl/rescript-jest)/)"],
};
Loading

0 comments on commit 5546f71

Please sign in to comment.