Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* comment should be a leading comment of the arrow function
*/
/** comment should be a leading comment of the arrow function */
export default () => {
return 0;
return 0;
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const Res = 0;

/**
* comment should be a leading comment of the function Foo
*/
/** comment should be a leading comment of the function Foo */
export = function Foo(): typeof Res {
return Res;
return Res;
};
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod deno;
use std::{fmt::Write, fs, path::Path, sync::Arc};

use oxc_allocator::Allocator;
use oxc_codegen::CodeGenerator;
use oxc_codegen::Codegen;
use oxc_isolated_declarations::{IsolatedDeclarations, IsolatedDeclarationsOptions};
use oxc_parser::Parser;
use oxc_span::SourceType;
Expand All @@ -16,7 +16,7 @@ fn transform(path: &Path, source_text: &str) -> String {
let id_ret =
IsolatedDeclarations::new(&allocator, IsolatedDeclarationsOptions { strip_internal: true })
.build(&parser_ret.program);
let code = CodeGenerator::new().build(&id_ret.program).code;
let code = Codegen::new().build(&id_ret.program).code;

let mut snapshot =
format!("```\n==================== .D.TS ====================\n\n{code}\n\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/export-default2.ts
```
==================== .D.TS ====================

/**
* comment should be a leading comment of the arrow function
*/
/** comment should be a leading comment of the arrow function */
declare const _default: () => number;
export default _default;
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/ts-export-assignment
==================== .D.TS ====================

declare const Res = 0;
/**
* comment should be a leading comment of the function Foo
*/
/** comment should be a leading comment of the function Foo */
declare const _default: () => typeof Res;
export = _default;
Loading