エントリーの編集
                エントリーの編集は全ユーザーに共通の機能です。
                    必ずガイドラインを一読の上ご利用ください。
記事へのコメント0件
- 注目コメント
 - 新着コメント
 
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
          - バナー広告なし
 - ミュート機能あり
 - ダークモード搭載
 
関連記事
io-tsでJSONの型検査をする - Qiita
import * as t from "io-ts"; import { isRight, map, right } from "fp-ts/lib/Either"; import { pipe... import * as t from "io-ts"; import { isRight, map, right } from "fp-ts/lib/Either"; import { pipe } from "fp-ts/lib/pipeable"; describe("JSON.parse()のみ", () => { test("stringをobjectと処理するとundefined", () => { const x = JSON.parse(`"a"`); expect(x.b).toBeUndefined(); }); test("存在しない属性はundefined", () => { const x = JSON.parse(`{"a":123}`); expect(x.b).toBeUndefined(); }); test("stringをnumberとして処理するとNa
              
            

