Indent copied declarations in created interfaces at their place
Why
createInterface copied a type declaration or external with its source column as indentation, so a type written after { on the same line was pushed far right (#9135).
modifiedFormat createInterface output
module Make = (X: {type t}) => { type u = X.t}
rescript
Before
After
module Make: (module Make: ( X: { X: { type t type t }, },) =>) =>{{ type u = X.t type u = X.t}}
Fixes #9135
Review
- What happens to the lines after the first? They keep their indentation relative to the line the declaration starts on, re-based onto the interface's indentation.