Skip to content

Commit dc8c49b

Browse files
committed
fix(isolated_declarations): fix broken snapshot files
1 parent 7284f16 commit dc8c49b

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/**
2-
* comment should be a leading comment of the arrow function
3-
*/
1+
/** comment should be a leading comment of the arrow function */
42
export default () => {
5-
return 0;
3+
return 0;
64
};
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
const Res = 0;
22

3-
/**
4-
* comment should be a leading comment of the function Foo
5-
*/
3+
/** comment should be a leading comment of the function Foo */
64
export = function Foo(): typeof Res {
7-
return Res;
5+
return Res;
86
};

crates/oxc_isolated_declarations/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod deno;
33
use std::{fmt::Write, fs, path::Path, sync::Arc};
44

55
use oxc_allocator::Allocator;
6-
use oxc_codegen::CodeGenerator;
6+
use oxc_codegen::Codegen;
77
use oxc_isolated_declarations::{IsolatedDeclarations, IsolatedDeclarationsOptions};
88
use oxc_parser::Parser;
99
use oxc_span::SourceType;
@@ -16,7 +16,7 @@ fn transform(path: &Path, source_text: &str) -> String {
1616
let id_ret =
1717
IsolatedDeclarations::new(&allocator, IsolatedDeclarationsOptions { strip_internal: true })
1818
.build(&parser_ret.program);
19-
let code = CodeGenerator::new().build(&id_ret.program).code;
19+
let code = Codegen::new().build(&id_ret.program).code;
2020

2121
let mut snapshot =
2222
format!("```\n==================== .D.TS ====================\n\n{code}\n\n");

crates/oxc_isolated_declarations/tests/snapshots/export-default2.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/export-default2.ts
55
```
66
==================== .D.TS ====================
77
8-
/**
9-
* comment should be a leading comment of the arrow function
10-
*/
8+
/** comment should be a leading comment of the arrow function */
119
declare const _default: () => number;
1210
export default _default;

crates/oxc_isolated_declarations/tests/snapshots/ts-export-assignment.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ input_file: crates/oxc_isolated_declarations/tests/fixtures/ts-export-assignment
66
==================== .D.TS ====================
77
88
declare const Res = 0;
9-
/**
10-
* comment should be a leading comment of the function Foo
11-
*/
9+
/** comment should be a leading comment of the function Foo */
1210
declare const _default: () => typeof Res;
1311
export = _default;

0 commit comments

Comments
 (0)