Skip to content

Commit

Permalink
upgrade typescript modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaplus1 committed Mar 6, 2021
1 parent c16bd4a commit bc345d3
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 46 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@types/mocha": "^8.0.1",
"@types/node": "^13.13.2",
"@types/type-detect": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"benchmark": "^2.1.4",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
Expand All @@ -40,7 +40,7 @@
"rollup": "^2.26.2",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript": "^1.0.1",
"typescript": "^3.8.3"
"typescript": "^4.2.3"
},
"engines": {
"node": ">=12"
Expand Down
10 changes: 6 additions & 4 deletions test/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,17 +368,19 @@ describe('clone', function () {
}
});
it('WeakMap', function () {
const data = new WeakMap<object, unknown>();
const data = new WeakMap<Record<string, unknown>, unknown>();
const result = clone(data, detectType(data)) as WeakMap<
object,
Record<string, unknown>,
unknown
>;

assert(result === data);
});
it('WeakSet', function () {
const data = new WeakSet<object>();
const result = clone(data, detectType(data)) as WeakSet<object>;
const data = new WeakSet<Record<string, unknown>>();
const result = clone(data, detectType(data)) as WeakSet<
Record<string, unknown>
>;

assert(result === data);
});
Expand Down
Loading

1 comment on commit bc345d3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: bc345d3 Previous: c16bd4a Ratio
deepcopy:fixture1 23987 ops/sec (±0.71%) 24437 ops/sec (±0.56%) 1.02

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.