StyLua icon indicating copy to clipboard operation
StyLua copied to clipboard

Type union inside sealed table collapses comments

Open stopdropandrew opened this issue 5 months ago • 0 comments

Union type Status with comments, inside table type Foo

type Foo = {
  Status: "loading" -- loading 
  | "error" -- error
  | "success" -- success
}

reformats to

type Foo = {
  Status: "loading" -- loading | "error" -- error | "success", -- success
}

In contract, this keeps comments as expected:

type Status =
  "loading" -- loading
  | "error" -- error
  | "success" -- success

stopdropandrew avatar Sep 16 '24 17:09 stopdropandrew