2017-09-12から1日間の記事一覧

Interfaceのメンバ競合の問題

import * as ReduxActions from 'redux-actions'; import * as Redux from 'redux'; // 型の競合エラーがでる interface ExAction extends Redux.Action, ReduxActions.Action<string> {} 現実感の無い実験のためのこのコードは、今日時点では残念ながらコンパイラを</string>…

The hidden power of Jest matchers

medium.com 素晴らしい記事。これらの「The hidden power」を知らず、expect(rec.prop).toBe(val)の組み合わせをプロパティの数だけ並べてましたよ。 function fn() { return { a: 1, b: true, c: 'hello', d: { d1: 2, d2: false }, e: 3, f: 4 }; } // 今…