<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>konosumi</author_name>
  <author_url>https://blog.hatena.ne.jp/konosumi/</author_url>
  <blog_title>konosumi note</blog_title>
  <blog_url>https://www.konosumi.net/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>オライリーの『プログラミングTypeScript』を読んでいるのですが、その中でenumとconst enumの違いが述べられています。 内容が気になったので、実際にプログラムを書いて実験してみました。 実験内容 サンプルコード 次のサンプルコードを作成しました。 これをnpx tsc index.tsでコンパイルし、JavaScriptを出力します。 // enum enum Ab { C = 1, D = &quot;Two&quot; } console.log(&quot;This is enum&quot;, Ab.C) console.log(&quot;This is enum&quot;, Ab.D) // const enum con…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.konosumi.net%2Fentry%2F2021%2F05%2F09%2F130648&quot; title=&quot;TypeScriptにおけるenumとconst enumの違いを、tscのコンパイル結果から確認してみる - konosumi note&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>https://m.media-amazon.com/images/I/51vjj+osAgL._SL500_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-05-09 13:06:48</published>
  <title>TypeScriptにおけるenumとconst enumの違いを、tscのコンパイル結果から確認してみる</title>
  <type>rich</type>
  <url>https://www.konosumi.net/entry/2021/05/09/130648</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
