<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nanto_vi</author_name>
  <author_url>https://blog.hatena.ne.jp/nanto_vi/</author_url>
  <blog_title>Hatena Developer Blog</blog_title>
  <blog_url>https://developer.hatenastaff.com/</blog_url>
  <categories>
    <anon>はてなエンジニアアドベントカレンダー2020</anon>
  </categories>
  <description>こんにちは、エンジニア職の id:nanto_vi です。(この記事は、はてなエンジニア Advent Calendar 2020 の 12 日目の記事です。昨日は id:cohalz さんによる「Webサービスのモニタリングについてのチェックリスト」でした。) 結論 TypeScript で querySelector、querySelectorAll メソッドを呼び出すときは、型引数を指定しましょう (メソッド名の直後の &lt; &gt; で囲んだ部分です)。 const foo = document.querySelector&lt;HTMLElement&gt;('.foo'); if (foo) { fo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdeveloper.hatenastaff.com%2Fentry%2F2020%2F12%2F12%2F121212&quot; title=&quot;TypeScript で querySelector メソッドを使うときに型引数を指定する - Hatena Developer Blog&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-12-12 12:12:12</published>
  <title>TypeScript で querySelector メソッドを使うときに型引数を指定する</title>
  <type>rich</type>
  <url>https://developer.hatenastaff.com/entry/2020/12/12/121212</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
