Skip to content
Open
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
15 changes: 13 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Config } from 'prettier';
import { Config, SupportOption, SupportLanguage, Parser, Printer } from 'prettier';

export interface PluginConfig {
svelteSortOrder?: SortOrder;
Expand All @@ -9,7 +9,7 @@ export interface PluginConfig {

export type PrettierConfig = PluginConfig & Config;

type SortOrder =
export type SortOrder =
| 'options-scripts-markup-styles'
| 'options-scripts-styles-markup'
| 'options-markup-styles-scripts'
Expand All @@ -35,3 +35,14 @@ type SortOrder =
| 'styles-markup-scripts-options'
| 'styles-scripts-markup-options'
| 'none';

export declare const options: Record<keyof PluginConfig, SupportOption>;
export declare const languages: Partial<SupportLanguage>[];
export declare const parsers: {
svelte: Parser;
svelteExpressionParser: Parser;
svelteTSExpressionParser: Parser;
};
export declare const printers: {
'svelte-ast': Printer;
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"types": "./index.d.ts",
"default": "./plugin.js"
},
"./browser": "./browser.js",
"./browser": {
"types": "./index.d.ts",
"default": "./browser.js"
},
"./package.json": "./package.json"
},
"scripts": {
Expand Down