microsoft / microsoft/TypeScript
typeToString doesn't respect TypeFormatFlags.MultilineObjectLiterals
@weswigham đang làm issue này rồi.
Từ ngày 20/3/2025.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
🔎 Search Terms
typeToString
🕗 Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about typeToString
⏯ Playground Link
No response
💻 Code
const result = typeChecker.typeToString(
type,
enclosingDeclaration,
ts.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope
| ts.TypeFormatFlags.NoTruncation
| ts.TypeFormatFlags.MultilineObjectLiterals
)
🙁 Actual behavior
When type is the type of an object literal, the ts.TypeFormatFlags.MultilineObjectLiterals flag causes multiple spaces to be generated between the properties, but not newlines.
🙂 Expected behavior
When type is the type of an object literal, the ts.TypeFormatFlags.MultilineObjectLiterals flag should cause newlines to be generated between the properties.
Additional information about the issue
I'm reporting this because on investigation I found the problem, but in order to generate a PR, I need an issue to refer to!
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.