Create Missing Struct Types with all Fields
Prototype your code then worry about creating the types
Place the cursor on a type that's not yet defined but used.
Then, press ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) and select the Create type action.
A type will be created. It will include all the fields too.