- 追加された行はこの色です。
- 削除された行はこの色です。
- TypeScript/型/型の比較 - instanceof typeOf へ行く。
- TypeScript/型/型の比較 - instanceof typeOf の差分を削除
#author("2020-06-13T22:41:11+09:00","default:ryuichi","ryuichi") * 型の比較 - instanceof typeOf [#x69a8182] #author("2020-06-13T22:41:29+09:00","default:ryuichi","ryuichi") * 型の比較 - instanceof typeof [#x69a8182] class Book { } const book = new Book(); if (book instanceof Book) { console.log("OK"); } if (typeof book == "object") { console.log("OK"); } // if (typeof book == "Book") { // console.log("OK"); // } // // typeofはプリミティブ型しか返さない