Microsoft/TypeScript

`IDBObjectStore` `keyPath` missing `null` type.

Open

#61,209 创建于 2025年2月18日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: lib.d.tsHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

🔎 Search Terms

  • IDBObjectStore
  • IDBKeyPath
  • keyPath

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about IDBObjectStore keyPath.

🙁 Actual behavior

IDBObjectStore instance member keyPath does not include null in its union of types.

🙂 Expected behavior

All versions of the IndexedDB specification has stated that keyPath will be the key path value provided at time of store creation, or null if not specified or when using a key generation such as autoIncrement. The type should be string | string[] | null.

Additional information about the issue

贡献者指南