mirror of
https://github.com/swc-project/swc.git
synced 2024-11-26 09:54:22 +03:00
fix(html/minifier): Fix HTML minifier TS types (#9615)
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
Some checks failed
CI / Cargo fmt (push) Has been cancelled
CI / Cargo clippy (push) Has been cancelled
CI / Check license of dependencies (push) Has been cancelled
CI / Check (macos-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / Test wasm (binding_core_wasm) (push) Has been cancelled
CI / Test wasm (binding_minifier_wasm) (push) Has been cancelled
CI / Test wasm (binding_typescript_wasm) (push) Has been cancelled
CI / List crates (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (macos-latest) (push) Has been cancelled
CI / Test node bindings - ${{ matrix.os }} (windows-latest) (push) Has been cancelled
CI / Test with @swc/cli (push) Has been cancelled
CI / Miri (better_scoped_tls) (push) Has been cancelled
CI / Miri (string_enum) (push) Has been cancelled
CI / Miri (swc) (push) Has been cancelled
CI / Miri (swc_bundler) (push) Has been cancelled
CI / Miri (swc_ecma_codegen) (push) Has been cancelled
CI / Miri (swc_ecma_minifier) (push) Has been cancelled
Benchmark / Bench everything (push) Has been cancelled
CI / Test - ${{ matrix.settings.crate }} - ${{ matrix.settings.os }} (push) Has been cancelled
CI / Done (push) Has been cancelled
**Description:** - `preserveComments` is optional but required in the TS type - `removeRedundantAttributes` is an enum and passing a boolean leads to errors See https://github.com/swc-project/swc/blob/main/crates/swc_html_minifier/src/option.rs#L54 **Related issue:** - https://github.com/facebook/docusaurus/pull/10554
This commit is contained in:
parent
2480bb00fc
commit
7b98bb5e93
@ -16,10 +16,13 @@ export type Options = {
|
||||
| "only-metadata";
|
||||
removeEmptyMetadataElements?: boolean;
|
||||
removeComments?: boolean;
|
||||
preserveComments: string[];
|
||||
preserveComments?: string[];
|
||||
minifyConditionalComments?: boolean;
|
||||
removeEmptyAttributes?: boolean;
|
||||
removeRedundantAttributes?: boolean;
|
||||
removeRedundantAttributes?:
|
||||
| "none"
|
||||
| "all"
|
||||
| "smart";
|
||||
collapseBooleanAttributes?: boolean;
|
||||
normalizeAttributes?: boolean;
|
||||
minifyJson?: boolean | { pretty?: boolean };
|
||||
|
Loading…
Reference in New Issue
Block a user