<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>susisu</author_name>
  <author_url>https://blog.hatena.ne.jp/susisu/</author_url>
  <blog_title>Object.create(null)</blog_title>
  <blog_url>https://susisu.hatenablog.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
    <anon>TypeScript</anon>
    <anon>日記</anon>
  </categories>
  <description>TL; DR コードの greppability のために文字列操作を禁止する目的で string literal type (の union) なら受け付けるが string は受け付けないという関数を作っていたのだけれど, どうにも TypeScript が賢くなりすぎてしまった— 塩水うに (@susisu2413) January 13, 2021 コード中の定数の greppability 以下のように翻訳の ID を引数にとって, 各言語に翻訳されたメッセージを返す関数というのはよくあるのではないかと思います. declare function translate(id: stri…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsusisu.hatenablog.com%2Fentry%2F2021%2F01%2F16%2F214959&quot; title=&quot;コード中の定数の greppability と TypeScript の進化 - Object.create(null)&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>2021-01-16 21:49:59</published>
  <title>コード中の定数の greppability と TypeScript の進化</title>
  <type>rich</type>
  <url>https://susisu.hatenablog.com/entry/2021/01/16/214959</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
