<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>aknow2</author_name>
  <author_url>https://blog.hatena.ne.jp/aknow2/</author_url>
  <blog_title>aknow2</blog_title>
  <blog_url>https://aknow2.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Typescriptには、JavaやC＃と同じ様にinterfaceがあります。 が、JavaやC#と同じ様に扱うと怪我をします。 instanceofでinterfaceは使えない。 最初に私がビックリした事です。JavaやC#では'instanceof 'で型をチェックしたり、条件分岐で使えたりします。が、Typescriptでは使えません。 例えば、IActionを定義してActionというクラスで実装して見ます。それをinstaceof IActionでチェックしてみると、、、 interface IAction { dosomething(): void; } class Actio…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faknow2.hatenablog.com%2Fentry%2F2018%2F11%2F21%2F231049&quot; title=&quot;TypescriptのInterfaceにはinstanceofは使えない。 - aknow2&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-11-21 23:10:49</published>
  <title>TypescriptのInterfaceにはinstanceofは使えない。</title>
  <type>rich</type>
  <url>https://aknow2.hatenablog.com/entry/2018/11/21/231049</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
