Input
type Foo = {
// Type comment
};
interface Bar {
// Interface comment
}
enum Baz {
// Enum comment, this will break after formatting
}
Config
Oxfmt output
Oxfmt version: latest
type Foo = {
// Type comment
};
interface Bar {
// Interface comment
}
enum Baz {// Enum comment, this will break after formatting}
Oxfmt playground link
click
Prettier output
Prettier version: 3.8.1
type Foo = {
// Type comment
};
interface Bar {
// Interface comment
}
enum Baz {
// Enum comment, this will break after formatting
}
Prettier playground link
click
Additional notes
A fairly rare case of an empty enum with a single-line comment inside.
Formatting causes terminating brace on an enum to be a part of the comment. This doesn't seem to be the case for other similar declarations.
Input
Config
{}Oxfmt output
Oxfmt version:
latestOxfmt playground link
click
Prettier output
Prettier version:
3.8.1Prettier playground link
click
Additional notes
A fairly rare case of an empty enum with a single-line comment inside.
Formatting causes terminating brace on an enum to be a part of the comment. This doesn't seem to be the case for other similar declarations.