You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Callouttype="info"title="Why `is.API` / `is.APICall` instead of a hand-written check?">
304
+
<Accordions>
305
+
<Accordiontitle="Why `is.API` / `is.APICall` instead of a hand-written check?">
306
+
307
+
<Callouttype="warn"title="Under Construction">
308
+
This part is under construction.
309
+
</Callout>
310
+
300
311
Consider this single statement:
301
312
302
313
```ts
@@ -318,7 +329,9 @@ isCreateRefCall(node);
318
329
- matches on the **fully-qualified name**, so a single predicate covers both the bare `captureOwnerStack` and the namespaced `React.captureOwnerStack` (any name ending in `.captureOwnerStack`).
319
330
320
331
Use `is.API(name)` for the reference itself and `is.APICall(name)` for a call to it. Hand-rolling this means re-implementing unwrapping and member-expression resolution for **every** API — and breaking the moment someone adds a `?.`, an `as`, or a `React.` prefix. To additionally assert the symbol truly comes from React (and not a local same-named binding), pair it with [`is.APIFromReact`](#import-source).
0 commit comments