11import { format as oxfmt } from 'oxfmt'
22import { defu as merge } from 'defu'
3- import type { FormatOptions } from 'oxfmt'
3+ import type { FormatConfig } from 'oxfmt'
44
5- export type { FormatOptions } from 'oxfmt'
5+ export type { FormatConfig } from 'oxfmt'
66
7- const DEFAULT_OPTIONS : FormatOptions = {
7+ const DEFAULT_OPTIONS : FormatConfig = {
88 printWidth : 320 ,
99 htmlWhitespaceSensitivity : 'ignore' ,
1010 embeddedLanguageFormatting : 'off' ,
@@ -17,15 +17,15 @@ const DEFAULT_OPTIONS: FormatOptions = {
1717 * you pass.
1818 *
1919 * @param html HTML string to format.
20- * @param options [oxfmt `FormatOptions `](https://github.com/oxc-project/oxfmt).
20+ * @param options [oxfmt `FormatConfig `](https://github.com/oxc-project/oxfmt).
2121 * @returns The formatted HTML string.
2222 *
2323 * @example
2424 * import { format } from '@maizzle/framework'
2525 *
2626 * const pretty = await format(html, { useTabs: true, tabWidth: 4 })
2727 */
28- export async function format ( html : string , options : FormatOptions = { } ) : Promise < string > {
28+ export async function format ( html : string , options : FormatConfig = { } ) : Promise < string > {
2929 const merged = merge ( options , DEFAULT_OPTIONS )
3030 const result = await oxfmt ( 'input.html' , html , merged )
3131 return result . code
0 commit comments