prettier-plugin-apex
Version:
Salesforce Apex plugin for Prettier
59 lines (58 loc) • 2.08 kB
TypeScript
import type { SupportOptions } from "prettier";
import * as jorje from "../vendor/apex-ast-serializer/typings/jorje.d.js";
import { canAttachComment, handleEndOfLineComment, handleOwnLineComment, handleRemainingComment, hasPrettierIgnore, isBlockComment, printComment, willPrintOwnComments } from "./comments.js";
import parse from "./parser.js";
import { hasPragma, insertPragma } from "./pragma.js";
import printFn from "./printer.js";
import { massageAstNode } from "./util.js";
export declare const languages: {
name: string;
parsers: string[];
extensions: string[];
linguistLanguageId: number;
vscodeLanguageIds: string[];
}[];
interface WithLocation {
location: jorje.Location;
}
type Locatable = jorje.Locatable & WithLocation;
declare function locStart(node: Locatable): number;
declare function locEnd(node: Locatable): number;
export declare const parsers: {
apex: {
astFormat: string;
parse: typeof parse;
locStart: typeof locStart;
locEnd: typeof locEnd;
hasPragma: typeof hasPragma;
preprocess: (text: string) => string;
};
"apex-anonymous": {
astFormat: string;
parse: typeof parse;
locStart: typeof locStart;
locEnd: typeof locEnd;
hasPragma: typeof hasPragma;
preprocess: (text: string) => string;
};
};
export declare const printers: {
apex: {
print: typeof printFn;
massageAstNode: typeof massageAstNode;
hasPrettierIgnore: typeof hasPrettierIgnore;
insertPragma: typeof insertPragma;
isBlockComment: typeof isBlockComment;
canAttachComment: typeof canAttachComment;
printComment: typeof printComment;
willPrintOwnComments: typeof willPrintOwnComments;
handleComments: {
ownLine: typeof handleOwnLineComment;
endOfLine: typeof handleEndOfLineComment;
remaining: typeof handleRemainingComment;
};
};
};
export declare const options: SupportOptions;
export declare const defaultOptions: {};
export {};