Skip to content

Commit

Permalink
update @types/node
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Nov 12, 2023
1 parent c8b6e02 commit 595deb5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ UMD=$(UMD_DIR)/$(JS)
all: $(PJ) $(JS) $(COMMONJS) $(UMD)

$(JS): $(PJ) $(TS)
tsc -d --target es2020 $(TS)
tsc -d --module nodenext $(TS)

$(COMMONJS): $(PJ) $(TS)
tsc --module commonjs --outDir $(COMMONJS_DIR) --target es2020 $(TS)

$(UMD): $(PJ) $(TS)
tsc --module umd --outDir $(UMD_DIR) --target es2020 $(TS)
-tsc --module umd --outDir $(UMD_DIR) --target es2020 $(TS) > /dev/null

test: all
mocha
Expand Down
4 changes: 2 additions & 2 deletions combinatorics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export declare const version = "2.1.1";
*
* https://github.com/streamich/memfs/issues/275
*/
declare type anyint = number | bigint;
type anyint = number | bigint;
/**
* Optional<T> will not be official so
* @link: https://github.com/microsoft/TypeScript/issues/19944
*/
declare type Optional<T> = T | undefined;
type Optional<T> = T | undefined;
/**
* calculates `P(n, k)`.
*
Expand Down
14 changes: 14 additions & 0 deletions combinatorics.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ class _CBase {
* an alias of `at`
*/
nth(n) { return this.at(n); }
/**
* the seed iterable
*/
seed;
/**
* the size (# of elements) of each element.
*/
size;
/**
* the number of elements
*/
length;
/**
* pick random element
*/
Expand Down Expand Up @@ -264,6 +276,7 @@ export class Permutation extends _CBase {
* Combination
*/
export class Combination extends _CBase {
comb;
constructor(seed, size = 0) {
super();
this.seed = [...seed];
Expand Down Expand Up @@ -317,6 +330,7 @@ export class Combination extends _CBase {
* Base N
*/
export class BaseN extends _CBase {
base;
constructor(seed, size = 1) {
if (size < 1)
throw new RangeError(`${size} is out of range`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"runkitExample": "require=require(\"esm\")(module);\nvar Combinatorics=require(\"js-combinatorics\");\n",
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^18.15.11",
"@types/node": "^20.9.0",
"mocha": "^10.0.0",
"chai": "^4.2.0"
},
Expand Down

0 comments on commit 595deb5

Please sign in to comment.