<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>karupanerura</author_name>
  <author_url>https://blog.hatena.ne.jp/karupanerura/</author_url>
  <blog_title>時計を壊せ</blog_title>
  <blog_url>https://techblog.karupas.org/</blog_url>
  <categories>
    <anon>TypeScript</anon>
  </categories>
  <description>たとえば、 [1, 2, 3] というタプル型があった場合に [1, 2, 3] | [1, 3, 2] | [2, 1, 3] | [2, 3, 1] | [3, 1, 2] | [3, 2, 1] みたいな組み合わせが欲しい。 これは順序を指定するようなケースに型制約を持たせるときに役立ち、io-tsなどを使ってType Guard関数を生成すれば外部入力に対しても型エラーが捕捉できる。 サッとググった感じ、自分のググりパワーが足りないのかうまいソリューションがみつからなかったので、あーでもないこーでもないとやって諦めてベタッと書いたところこんな感じになった。 type Permutati…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftechblog.karupas.org%2Fentry%2F2020%2F09%2F09%2F180401&quot; title=&quot;TypeScriptでタプル型の順列を得たい - 時計を壊せ&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>2020-09-09 18:04:01</published>
  <title>TypeScriptでタプル型の順列を得たい</title>
  <type>rich</type>
  <url>https://techblog.karupas.org/entry/2020/09/09/180401</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
