[hir] Simplify HookKind

This commit is contained in:
Sathya Gunasekaran
2023-02-14 23:07:16 +00:00
parent 81b23f9242
commit 12ca0ba61b
@@ -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;