MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / hasField

Function hasField

packages/@contentlayer/client/src/guards.ts:68–70  ·  view source on GitHub ↗
(_: T, property: P)

Source from the content-addressed store, hash-verified

66
67type AllPropertyNames<X> = keyof UnionToIntersection<X>
68function hasField<T extends {}, P extends AllPropertyNames<T>>(_: T, property: P): _ is T & Record<P, any> {
69 return _.hasOwnProperty(property)
70}
71
72// function withField<T extends {}, P extends AllPropertyNames<T>>(
73// _: T,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…