diff --git a/package.json b/package.json index 9c44d41..47c5081 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "@babel/cli": "^7.6.4", "@babel/core": "^7.6.4", "@babel/preset-env": "^7.6.3", + "@types/jest": "^24.0.19", "@types/lodash": "^4.14.144", "babel-jest": "^24.9.0", "jest": "^24.9.0", diff --git a/src/splat.test.js b/src/splat.test.ts similarity index 81% rename from src/splat.test.js rename to src/splat.test.ts index 57ac5bf..abbd335 100644 --- a/src/splat.test.js +++ b/src/splat.test.ts @@ -1,13 +1,13 @@ import updux from '.'; import u from 'updeep'; -const tracer = chr => u({ tracer: s => (s||'') + chr }); +const tracer = (chr:string) => u({ tracer: (s='') => s + chr }); test( 'mutations, simple', () => { const dux = updux({ mutations: { foo: () => tracer('a'), - '*': (p,a) => tracer('b'), + '*': () => tracer('b'), }, }); @@ -28,14 +28,14 @@ test( 'with subduxes', () => { const dux = updux({ mutations: { foo: () => tracer('a'), - '*': (dummy,a) => tracer('b'), - bar: () => ({bar}) => ({ bar, tracer: bar.tracer }) + '*': () => tracer('b'), + bar: () => ({bar}:any) => ({ bar, tracer: bar.tracer }) }, subduxes: { bar: updux({ mutations: { foo: () => tracer('d'), - '*': (dummy,a) => tracer('e'), + '*': () => tracer('e'), }, }), },