mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
feat(prettier) print TS literals (#1380)
This commit is contained in:
parent
7e9adeb222
commit
6d0e647c13
1 changed files with 10 additions and 1 deletions
|
|
@ -587,7 +587,16 @@ impl<'a> Format<'a> for TSIntersectionType<'a> {
|
|||
|
||||
impl<'a> Format<'a> for TSLiteralType<'a> {
|
||||
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
|
||||
Doc::Line
|
||||
match &self.literal {
|
||||
TSLiteral::BooleanLiteral(v) => v.format(p),
|
||||
TSLiteral::NullLiteral(v) => v.format(p),
|
||||
TSLiteral::NumberLiteral(v) => v.format(p),
|
||||
TSLiteral::BigintLiteral(v) => v.format(p),
|
||||
TSLiteral::RegExpLiteral(v) => v.format(p),
|
||||
TSLiteral::StringLiteral(v) => v.format(p),
|
||||
TSLiteral::TemplateLiteral(v) => v.format(p),
|
||||
TSLiteral::UnaryExpression(v) => v.format(p),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue