-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
822097f
commit bd17ca1
Showing
12 changed files
with
1,132 additions
and
16 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
nodejs-tools/nodejs-compiler-tools/formatter-xml/google3/main.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { LexerError } from '@vighnesh153/lexer-core'; | ||
import { ParserError } from '@vighnesh153/parser-xml'; | ||
|
||
type FormattingOptions = { | ||
indentation?: number; | ||
sortAttributes?: boolean; | ||
}; | ||
|
||
type FormatResponse = { | ||
type: 'lexer-error'; | ||
lexerErrors: readonly LexerError[]; | ||
} | { | ||
type: 'parser-error'; | ||
parserErrors: readonly ParserError[]; | ||
} | { | ||
type: 'unknown-error'; | ||
err: unknown; | ||
} | { | ||
type: 'success'; | ||
formattedXml: string; | ||
}; | ||
declare function format(rawXml: string, { indentation, sortAttributes }: FormattingOptions): FormatResponse; | ||
|
||
export { type FormatResponse, format }; |
Oops, something went wrong.