Skip to content

⬅️ Back to Table of Contents

📄 has-own-property.ts

📊 Analysis Summary

Metric Count
🔧 Functions 1

📚 Table of Contents

🛠️ File Location:

📂 packages/website/src/components/lib/has-own-property.ts

Functions

hasOwnProperty(property: Key, object: Container): object is Container & Record<Key, unknown>

Code
export function hasOwnProperty<
  Container extends object,
  Key extends PropertyKey,
>(
  property: Key,
  object: Container,
): object is Container & Record<Key, unknown> {
  return property in object;
}
  • Parameters:
  • property: Key
  • object: Container
  • Return Type: object is Container & Record<Key, unknown>