pull/18474/merge
Manuel 3 days ago committed by GitHub
commit 6070fd40df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
chore: provide `indent` option for `print`

@ -30,7 +30,10 @@ export function print(ast, options = undefined) {
}),
...svelte_visitors(comments),
...css_visitors
})
}),
{
indent: options?.indent
}
);
}

@ -4,4 +4,5 @@ import type ts from 'esrap/languages/ts';
export type Options = {
getLeadingComments?: NonNullable<Parameters<typeof ts>[0]>['getLeadingComments'] | undefined;
getTrailingComments?: NonNullable<Parameters<typeof ts>[0]>['getTrailingComments'] | undefined;
indent?: string; // default tab
};

@ -1854,6 +1854,7 @@ declare module 'svelte/compiler' {
type Options = {
getLeadingComments?: NonNullable<Parameters<typeof ts>[0]>['getLeadingComments'] | undefined;
getTrailingComments?: NonNullable<Parameters<typeof ts>[0]>['getTrailingComments'] | undefined;
indent?: string; // default tab
};
export {};

Loading…
Cancel
Save