mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Simplify HookKind
This commit is contained in:
@@ -837,8 +837,8 @@ const HOOKS: Map<string, Hook> = new Map([
|
||||
],
|
||||
]);
|
||||
|
||||
type HookKind = { kind: "State" } | { kind: "Ref" } | { kind: "Custom" };
|
||||
type Hook = HookKind & { effectKind: Effect; valueKind: ValueKind };
|
||||
type HookKind = "State" | "Ref" | "Custom";
|
||||
type Hook = { kind: HookKind; effectKind: Effect; valueKind: ValueKind };
|
||||
|
||||
export function parseHookCall(place: Place): Hook | null {
|
||||
const name = place.identifier.name;
|
||||
|
||||
Reference in New Issue
Block a user