forked from rome/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rome_js_parser): export default function in declare module rome#…
- Loading branch information
1 parent
9f0ba14
commit 6a59be4
Showing
21 changed files
with
872 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
crates/rome_js_formatter/src/ts/declarations/declare_function_export_default_declaration.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use crate::js::declarations::function_declaration::FormatFunction; | ||
use crate::prelude::*; | ||
use crate::utils::FormatStatementSemicolon; | ||
use rome_formatter::write; | ||
use rome_js_syntax::TsDeclareFunctionExportDefaultDeclaration; | ||
|
||
#[derive(Debug, Clone, Default)] | ||
pub struct FormatTsDeclareFunctionExportDefaultDeclaration; | ||
impl FormatNodeRule<TsDeclareFunctionExportDefaultDeclaration> | ||
for FormatTsDeclareFunctionExportDefaultDeclaration | ||
{ | ||
fn fmt_fields( | ||
&self, | ||
node: &TsDeclareFunctionExportDefaultDeclaration, | ||
f: &mut JsFormatter, | ||
) -> FormatResult<()> { | ||
write![ | ||
f, | ||
[ | ||
FormatFunction::from(node.clone()), | ||
FormatStatementSemicolon::new(node.semicolon_token().as_ref()) | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.