<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>panda_noir</author_name>
  <author_url>https://blog.hatena.ne.jp/panda_noir/</author_url>
  <blog_title>Panda Noir</blog_title>
  <blog_url>https://www.pandanoir.info/</blog_url>
  <categories>
    <anon>TypeScript</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>const obj1 = { foo: 42, ...({ foo: undefined }), }; // {foo: undefined} const obj2 = { foo: 42, ...({}), }; // {foo: 42} ↑こんな感じで、undefinedが指定されているときとプロパティ自体がないときでは動作が異なります。 (実は上のコードはそのままだとfooが二重で定義されているとTSに怒られるので、実際に問題になるケースは少ないです) 問題になるケース const props: {style: CSSProperties} = { style: { background…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.pandanoir.info%2Fentry%2F2024%2F08%2F07%2F095116&quot; title=&quot;spread演算子を使うときに {} と {foo:undefined} は挙動が異なる - Panda Noir&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>2024-08-07 09:51:16</published>
  <title>spread演算子を使うときに {} と {foo:undefined} は挙動が異なる</title>
  <type>rich</type>
  <url>https://www.pandanoir.info/entry/2024/08/07/095116</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
