feat(printer) Print PrivateIdentifier (#1268)

This commit is contained in:
Cameron 2023-11-13 15:06:49 +00:00 committed by GitHub
parent 5c1637b786
commit 1cc003f194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -967,7 +967,12 @@ impl<'a> Format<'a> for AccessorProperty<'a> {
impl<'a> Format<'a> for PrivateIdentifier {
fn format(&self, p: &mut Prettier<'a>) -> Doc<'a> {
Doc::Line
let mut parts = p.vec();
parts.push(p.str("#"));
parts.push(p.str(self.name.as_str()));
Doc::Array(parts)
}
}