You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b3f2c80
Browse filesBrowse the repository at this point in the historyBrowse files
Indent copied declarations in created interfaces at their place (#9144)
* 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).
Format modified (createInterface output):
Example:
module Make = (X: {type t}) => {
type u = X.t
}
Before (rescript):
module Make: (
X: {
type t
},
) =>
{
type u = X.t
}
After (rescript):
module Make: (
X: {
type t
},
) =>
{
type u = X.t
}
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.
Fixes#9135
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gHYkomifc8JyphPGqu
Signed-off-by: Christoph Knittel <ck@cca.io>
* Copy lines inside multi-line string literals verbatim in created interfaces
Answers Codex's finding: reindenting the lines after the first also
shifted lines inside a multi-line string or template literal, changing
its value, such as an `@as` name. The extractor now scans the copied text
and leaves lines that start inside a literal as they are.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gHYkomifc8JyphPGqu
Signed-off-by: Christoph Knittel <ck@cca.io>
---------
Signed-off-by: Christoph Knittel <ck@cca.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments