Skip to content

Commit cc9b6ed

Browse files
committed
version 1.10.4
1 parent f1c2e27 commit cc9b6ed

19 files changed

+50
-564
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
**Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
1515
high state of flux, you're at risk of it changing without notice.
1616

17+
# 1.10.4
18+
19+
- **Polish**
20+
- remove unneeded internal code (@gcanti)
21+
1722
# 1.10.3
1823

1924
- **Bug Fix**

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "io-ts",
3-
"version": "1.10.3",
3+
"version": "1.10.4",
44
"description": "TypeScript compatible runtime type system for IO validation",
55
"files": [
66
"lib",
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib/* es6/*",
2020
"build": "npm run clean && tsc && tsc -p tsconfig.es6.json",
2121
"prepublish": "npm run build",
22-
"perf": "node perf/index",
22+
"perf": "ts-node perf/index",
2323
"dtslint": "dtslint dtslint",
2424
"declaration": "tsc -p declaration/tsconfig.json",
2525
"mocha": "TS_NODE_CACHE=false mocha -r ts-node/register test/*.ts",

perf/InterfaceType.encode.js

-92
This file was deleted.

perf/SpaceObject.ts

-98
This file was deleted.

perf/array.js

-24
This file was deleted.

perf/benchmark.ts

-25
This file was deleted.

perf/dictionary.js

-44
This file was deleted.

perf/getIndexRecord.ts

-27
This file was deleted.

perf/index.js renamed to perf/index.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
var Benchmark = require('benchmark')
2-
var t = require('../lib/index')
1+
import * as Benchmark from 'benchmark'
2+
import * as t from '../src'
33

44
/*
5-
space-object (good) x 371,834 ops/sec ±1.06% (80 runs sampled)
6-
space-object (bad) x 376,063 ops/sec ±0.76% (89 runs sampled)
5+
space-object (good) x 404,422 ops/sec ±0.84% (85 runs sampled)
6+
space-object (bad) x 366,083 ops/sec ±0.88% (80 runs sampled)
77
*/
88

99
const suite = new Benchmark.Suite()
@@ -46,7 +46,7 @@ const Ship = t.type({
4646
crew: t.array(CrewMember)
4747
})
4848

49-
const T = t.taggedUnion('type', [Asteroid, Planet, Ship])
49+
const T = t.union([Asteroid, Planet, Ship])
5050

5151
const good = {
5252
type: 'ship',
@@ -100,10 +100,10 @@ suite
100100
.add('space-object (bad)', function() {
101101
T.decode(bad)
102102
})
103-
.on('cycle', function(event) {
103+
.on('cycle', function(event: any) {
104104
console.log(String(event.target))
105105
})
106-
.on('complete', function() {
106+
.on('complete', function(this: any) {
107107
console.log('Fastest is ' + this.filter('fastest').map('name'))
108108
})
109109
.run({ async: true })

0 commit comments

Comments
 (0)