18 lines
528 B
TypeScript
18 lines
528 B
TypeScript
import type { EditorView } from '@codemirror/view';
|
|
|
|
export interface FormatSuccess {
|
|
ok: true;
|
|
source: string;
|
|
}
|
|
|
|
export interface FormatFailure {
|
|
ok: false;
|
|
error: string;
|
|
}
|
|
|
|
export type FormatResult = FormatSuccess | FormatFailure;
|
|
|
|
export declare function initDecodalFormatter(moduleOrPath?: RequestInfo | URL | Response | BufferSource | WebAssembly.Module): Promise<void>;
|
|
export declare function formatDecodal(source: string): FormatResult;
|
|
export declare function formatDecodalCommand(view: EditorView): boolean;
|