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
8 changes: 6 additions & 2 deletions crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,9 @@ impl Gen for TSTypeParameter<'_> {
constraint.print(p, ctx);
}
if let Some(default) = &self.default {
p.print_str(" = ");
p.print_soft_space();
p.print_ascii_byte(b'=');
p.print_soft_space();
default.print(p, ctx);
}
}
Expand Down Expand Up @@ -3833,7 +3835,9 @@ impl Gen for TSImportEqualsDeclaration<'_> {
fn r#gen(&self, p: &mut Codegen, ctx: Context) {
p.print_str("import ");
self.id.print(p, ctx);
p.print_str(" = ");
p.print_soft_space();
p.print_ascii_byte(b'=');
p.print_soft_space();
self.module_reference.print(p, ctx);
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/oxc_codegen/tests/integration/snapshots/minify.snap
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ div<T>``;
########## 35
export type Component<Props = any> = Foo;
----------
export type Component<Props = any>=Foo;
export type Component<Props=any>=Foo;
########## 36

export type Component<
Expand All @@ -166,7 +166,7 @@ export type Component<
| ComponentPublicInstanceConstructor<Props>

----------
export type Component<Props = any,RawBindings = any,D = any,C extends ComputedOptions = ComputedOptions,M extends MethodOptions = MethodOptions,E extends EmitsOptions|Record<string,any[]> = {},S extends Record<string,any> = any>=ConcreteComponent<Props,RawBindings,D,C,M,E,S>|ComponentPublicInstanceConstructor<Props>;
export type Component<Props=any,RawBindings=any,D=any,C extends ComputedOptions=ComputedOptions,M extends MethodOptions=MethodOptions,E extends EmitsOptions|Record<string,any[]>={},S extends Record<string,any>=any>=ConcreteComponent<Props,RawBindings,D,C,M,E,S>|ComponentPublicInstanceConstructor<Props>;
########## 37
(a || b) as any
----------
Expand Down Expand Up @@ -222,7 +222,7 @@ import a = require("a");
export import b = require("b");

----------
import a = require("a");export import b = require("b");
import a=require("a");export import b=require("b");
########## 42
class C {
static
Expand Down
Loading