Revert default export

TypeScript does not automatically assign the only default export to exports, or at least not with my configuration. Not worth testing around, and this also makes it easier to use for normal JavaScript.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2023-03-19 01:29:05 +01:00
parent 3483a6c60e
commit 4db9ab23eb
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ Simple but effective way to rate limit Tasks in JavaScript. Anything can be rate
## Usage
```js
var RateLimiter = require("@xaymar/ratelimiter");
var { RateLimiter } = require("@xaymar/ratelimiter");
let limitMany = new RateLimiter(4);
let limitOne = new RateLimiter(1);
@@ -40,7 +40,7 @@ No, but it is relatively easy to do without official support. See the example be
```js
// main.js
var RateLimiter = require("@xaymar/ratelimiter");
var { RateLimiter } = require("@xaymar/ratelimiter");
let worker = new Worker("worker.js");
let workerRL = new RateLimiter(1);
+1 -1
View File
@@ -31,7 +31,7 @@ type RateLimiterExecutor = RateLimiterSyncExecutor | RateLimiterAsyncExecutor;
/** A simple but effective way to rate limit Tasks.
*
*/
export default class RateLimiter {
export class RateLimiter {
private _maximum: number = 0;
private _available: number = 0;
private _instances: any[];