Ast Visitor Pattern

Use the frozen-class/visitor pattern for discriminated unions that have multiple dispatch sites. Use when creating a new set of variants (commands, IR nodes, factory calls) that will be switched over in 2+ places, or when refactoring an existing union type that has grown multiple switch sites.

prisma f328b9d 3.2 KB Updated

File contents

prisma/prisma-next/tree/main/skills-contrib/ast-visitor-pattern commit f328b9d026

Frequently asked questions

npx skillmds add prisma-prisma-next/ast-visitor-pattern