MCPcopy
hub / github.com/facebook/react / hasNode

Function hasNode

compiler/packages/babel-plugin-react-compiler/src/Utils/utils.ts:170–179  ·  view source on GitHub ↗
(
  input: NodePath<T | null | undefined>,
)

Source from the content-addressed store, hash-verified

168}
169
170export function hasNode<T>(
171 input: NodePath<T | null | undefined>,
172): input is NodePath<NonNullable<T>> {
173 /*
174 * Internal babel is on an older version that does not have hasNode (v7.17)
175 * See https://github.com/babel/babel/pull/13940/files for impl
176 * https://github.com/babel/babel/blob/5ebab544af2f1c6fc6abdaae6f4e5426975c9a16/packages/babel-traverse/src/path/index.ts#L128-L130
177 */
178 return input.node != null;
179}
180
181export function hasOwnProperty<T>(
182 obj: T,

Callers 2

lowerFunction · 0.90
lowerStatementFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected