Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1// Copied from `@types/prettier`2// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5bb07fc4b087cb7ee91084afa6fe750551a7bbb1/types/prettier/index.d.ts3 4// Minimum TypeScript Version: 4.25 6// Add `export {}` here to shut off automatic exporting from index.d.ts. There7// are quite a few utility types here that don't need to be shipped with the8// exported module.9export {};10 11import { builders, printer, utils } from "./doc.js";12 13export namespace doc {14 export { builders, printer, utils };15}16 17// This utility is here to handle the case where you have an explicit union18// between string literals and the generic string type. It would normally19// resolve out to just the string type, but this generic LiteralUnion maintains20// the intellisense of the original union.21//22// It comes from this issue: microsoft/TypeScript#29729:23// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-70052722724export type LiteralUnion<T extends U, U = string> =25 | T26 | (Pick<U, never> & { _?: never | undefined });27 28export type AST = any;29export type Doc = doc.builders.Doc;30 31// The type of elements that make up the given array T.32type ArrayElement<T> = T extends Array<infer E> ? E : never;33 34// A union of the properties of the given object that are arrays.35type ArrayProperties<T> = {36 [K in keyof T]: NonNullable<T[K]> extends readonly any[] ? K : never;37}[keyof T];38 39// A union of the properties of the given array T that can be used to index it.40// If the array is a tuple, then that's going to be the explicit indices of the41// array, otherwise it's going to just be number.42type IndexProperties<T extends { length: number }> =43 IsTuple<T> extends true ? Exclude<Partial<T>["length"], T["length"]> : number;44 45// Effectively performing T[P], except that it's telling TypeScript that it's46// safe to do this for tuples, arrays, or objects.47type IndexValue<T, P> = T extends any[]48 ? P extends number49 ? T[P]50 : never51 : P extends keyof T52 ? T[P]53 : never;54 55// Determines if an object T is an array like string[] (in which case this56// evaluates to false) or a tuple like [string] (in which case this evaluates to57// true).58// eslint-disable-next-line @typescript-eslint/no-unused-vars59type IsTuple<T> = T extends []60 ? true61 : T extends [infer First, ...infer Remain]62 ? IsTuple<Remain>63 : false;64 65type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;66type IterProperties<T> = T extends any[]67 ? IndexProperties<T>68 : ArrayProperties<T>;69 70type CallCallback<T, U> = (path: AstPath<T>, index: number, value: any) => U;71type EachCallback<T> = (72 path: AstPath<ArrayElement<T>>,73 index: number,74 value: any,75) => void;76type MapCallback<T, U> = (77 path: AstPath<ArrayElement<T>>,78 index: number,79 value: any,80) => U;81 82// https://github.com/prettier/prettier/blob/next/src/common/ast-path.js83export class AstPath<T = any> {84 constructor(value: T);85 86 get key(): string | null;87 get index(): number | null;88 get node(): T;89 get parent(): T | null;90 get grandparent(): T | null;91 get isInArray(): boolean;92 get siblings(): T[] | null;93 get next(): T | null;94 get previous(): T | null;95 get isFirst(): boolean;96 get isLast(): boolean;97 get isRoot(): boolean;98 get root(): T;99 get ancestors(): T[];100 101 stack: T[];102 103 callParent<U>(callback: (path: this) => U, count?: number): U;104 105 /**106 * @deprecated Please use `AstPath#key` or `AstPath#index`107 */108 getName(): PropertyKey | null;109 110 /**111 * @deprecated Please use `AstPath#node` or `AstPath#siblings`112 */113 getValue(): T;114 115 getNode(count?: number): T | null;116 117 getParentNode(count?: number): T | null;118 119 match(120 ...predicates: Array<121 (node: any, name: string | null, number: number | null) => boolean122 >123 ): boolean;124 125 // For each of the tree walk functions (call, each, and map) this provides 5126 // strict type signatures, along with a fallback at the end if you end up127 // calling more than 5 properties deep. This helps a lot with typing because128 // for the majority of cases you're calling fewer than 5 properties, so the129 // tree walk functions have a clearer understanding of what you're doing.130 //131 // Note that resolving these types is somewhat complicated, and it wasn't132 // even supported until TypeScript 4.2 (before it would just say that the133 // type instantiation was excessively deep and possibly infinite).134 135 call<U>(callback: CallCallback<T, U>): U;136 call<U, P1 extends CallProperties<T>>(137 callback: CallCallback<IndexValue<T, P1>, U>,138 prop1: P1,139 ): U;140 call<U, P1 extends keyof T, P2 extends CallProperties<T[P1]>>(141 callback: CallCallback<IndexValue<IndexValue<T, P1>, P2>, U>,142 prop1: P1,143 prop2: P2,144 ): U;145 call<146 U,147 P1 extends keyof T,148 P2 extends CallProperties<T[P1]>,149 P3 extends CallProperties<IndexValue<T[P1], P2>>,150 >(151 callback: CallCallback<152 IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>,153 U154 >,155 prop1: P1,156 prop2: P2,157 prop3: P3,158 ): U;159 call<160 U,161 P1 extends keyof T,162 P2 extends CallProperties<T[P1]>,163 P3 extends CallProperties<IndexValue<T[P1], P2>>,164 P4 extends CallProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,165 >(166 callback: CallCallback<167 IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,168 U169 >,170 prop1: P1,171 prop2: P2,172 prop3: P3,173 prop4: P4,174 ): U;175 call<U, P extends PropertyKey>(176 callback: CallCallback<any, U>,177 prop1: P,178 prop2: P,179 prop3: P,180 prop4: P,181 ...props: P[]182 ): U;183 184 each(callback: EachCallback<T>): void;185 each<P1 extends IterProperties<T>>(186 callback: EachCallback<IndexValue<T, P1>>,187 prop1: P1,188 ): void;189 each<P1 extends keyof T, P2 extends IterProperties<T[P1]>>(190 callback: EachCallback<IndexValue<IndexValue<T, P1>, P2>>,191 prop1: P1,192 prop2: P2,193 ): void;194 each<195 P1 extends keyof T,196 P2 extends IterProperties<T[P1]>,197 P3 extends IterProperties<IndexValue<T[P1], P2>>,198 >(199 callback: EachCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>>,200 prop1: P1,201 prop2: P2,202 prop3: P3,203 ): void;204 each<205 P1 extends keyof T,206 P2 extends IterProperties<T[P1]>,207 P3 extends IterProperties<IndexValue<T[P1], P2>>,208 P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,209 >(210 callback: EachCallback<211 IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>212 >,213 prop1: P1,214 prop2: P2,215 prop3: P3,216 prop4: P4,217 ): void;218 each(219 callback: EachCallback<any[]>,220 prop1: PropertyKey,221 prop2: PropertyKey,222 prop3: PropertyKey,223 prop4: PropertyKey,224 ...props: PropertyKey[]225 ): void;226 227 map<U>(callback: MapCallback<T, U>): U[];228 map<U, P1 extends IterProperties<T>>(229 callback: MapCallback<IndexValue<T, P1>, U>,230 prop1: P1,231 ): U[];232 map<U, P1 extends keyof T, P2 extends IterProperties<T[P1]>>(233 callback: MapCallback<IndexValue<IndexValue<T, P1>, P2>, U>,234 prop1: P1,235 prop2: P2,236 ): U[];237 map<238 U,239 P1 extends keyof T,240 P2 extends IterProperties<T[P1]>,241 P3 extends IterProperties<IndexValue<T[P1], P2>>,242 >(243 callback: MapCallback<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, U>,244 prop1: P1,245 prop2: P2,246 prop3: P3,247 ): U[];248 map<249 U,250 P1 extends keyof T,251 P2 extends IterProperties<T[P1]>,252 P3 extends IterProperties<IndexValue<T[P1], P2>>,253 P4 extends IterProperties<IndexValue<IndexValue<T[P1], P2>, P3>>,254 >(255 callback: MapCallback<256 IndexValue<IndexValue<IndexValue<IndexValue<T, P1>, P2>, P3>, P4>,257 U258 >,259 prop1: P1,260 prop2: P2,261 prop3: P3,262 prop4: P4,263 ): U[];264 map<U>(265 callback: MapCallback<any[], U>,266 prop1: PropertyKey,267 prop2: PropertyKey,268 prop3: PropertyKey,269 prop4: PropertyKey,270 ...props: PropertyKey[]271 ): U[];272}273 274/** @deprecated `FastPath` was renamed to `AstPath` */275export type FastPath<T = any> = AstPath<T>;276 277export type BuiltInParser = (text: string, options?: any) => AST;278export type BuiltInParserName =279 | "acorn"280 | "angular"281 | "babel-flow"282 | "babel-ts"283 | "babel"284 | "css"285 | "espree"286 | "flow"287 | "glimmer"288 | "graphql"289 | "html"290 | "json-stringify"291 | "json"292 | "json5"293 | "jsonc"294 | "less"295 | "lwc"296 | "markdown"297 | "mdx"298 | "meriyah"299 | "mjml"300 | "scss"301 | "typescript"302 | "vue"303 | "yaml";304export type BuiltInParsers = Record<BuiltInParserName, BuiltInParser>;305 306/**307 * For use in `.prettierrc.js`, `.prettierrc.ts`, `.prettierrc.cjs`, `.prettierrc.cts`, `prettierrc.mjs`, `prettierrc.mts`, `prettier.config.js`, `prettier.config.ts`, `prettier.config.cjs`, `prettier.config.cts`, `prettier.config.mjs`, `prettier.config.mts`308 */309export interface Config extends Options {310 overrides?: Array<{311 files: string | string[];312 excludeFiles?: string | string[];313 options?: Options;314 }>;315}316 317export interface Options extends Partial<RequiredOptions> {}318 319export interface RequiredOptions extends doc.printer.Options {320 /**321 * Print semicolons at the ends of statements.322 * @default true323 */324 semi: boolean;325 /**326 * Use single quotes instead of double quotes.327 * @default false328 */329 singleQuote: boolean;330 /**331 * Use single quotes in JSX.332 * @default false333 */334 jsxSingleQuote: boolean;335 /**336 * Print trailing commas wherever possible.337 * @default "all"338 */339 trailingComma: "none" | "es5" | "all";340 /**341 * Print spaces between brackets in object literals.342 * @default true343 */344 bracketSpacing: boolean;345 /**346 * How to wrap object literals.347 * @default "preserve"348 */349 objectWrap: "preserve" | "collapse";350 /**351 * Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being352 * alone on the next line (does not apply to self closing elements).353 * @default false354 */355 bracketSameLine: boolean;356 /**357 * Format only a segment of a file.358 * @default 0359 */360 rangeStart: number;361 /**362 * Format only a segment of a file.363 * @default Number.POSITIVE_INFINITY364 */365 rangeEnd: number;366 /**367 * Specify which parser to use.368 */369 parser: LiteralUnion<BuiltInParserName>;370 /**371 * Specify the input filepath. This will be used to do parser inference.372 */373 filepath: string;374 /**375 * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.376 * This is very useful when gradually transitioning large, unformatted codebases to prettier.377 * @default false378 */379 requirePragma: boolean;380 /**381 * Prettier can insert a special @format marker at the top of files specifying that382 * the file has been formatted with prettier. This works well when used in tandem with383 * the --require-pragma option. If there is already a docblock at the top of384 * the file then this option will add a newline to it with the @format marker.385 * @default false386 */387 insertPragma: boolean;388 /**389 * Prettier can allow individual files to opt out of formatting if they contain a special comment, called a pragma, at the top of the file.390 * @default false391 */392 checkIgnorePragma: boolean;393 /**394 * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer.395 * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.396 * @default "preserve"397 */398 proseWrap: "always" | "never" | "preserve";399 /**400 * Include parentheses around a sole arrow function parameter.401 * @default "always"402 */403 arrowParens: "avoid" | "always";404 /**405 * Provide ability to support new languages to prettier.406 */407 plugins: Array<string | URL | Plugin>;408 /**409 * How to handle whitespaces in HTML.410 * @default "css"411 */412 htmlWhitespaceSensitivity: "css" | "strict" | "ignore";413 /**414 * Which end of line characters to apply.415 * @default "lf"416 */417 endOfLine: "auto" | "lf" | "crlf" | "cr";418 /**419 * Change when properties in objects are quoted.420 * @default "as-needed"421 */422 quoteProps: "as-needed" | "consistent" | "preserve";423 /**424 * Whether or not to indent the code inside <script> and <style> tags in Vue files.425 * @default false426 */427 vueIndentScriptAndStyle: boolean;428 /**429 * Control whether Prettier formats quoted code embedded in the file.430 * @default "auto"431 */432 embeddedLanguageFormatting: "auto" | "off";433 /**434 * Enforce single attribute per line in HTML, Vue and JSX.435 * @default false436 */437 singleAttributePerLine: boolean;438 /**439 * Where to print operators when binary expressions wrap lines.440 * @default "end"441 */442 experimentalOperatorPosition: "start" | "end";443 /**444 * Use curious ternaries, with the question mark after the condition, instead445 * of on the same line as the consequent.446 * @default false447 */448 experimentalTernaries: boolean;449 /**450 * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line.451 * @default false452 * @deprecated use bracketSameLine instead453 */454 jsxBracketSameLine?: boolean;455 /**456 * Arbitrary additional values on an options object are always allowed.457 */458 [_: string]: unknown;459}460 461export interface ParserOptions<T = any> extends RequiredOptions {462 locStart: (node: T) => number;463 locEnd: (node: T) => number;464 originalText: string;465}466 467export interface Plugin<T = any> {468 languages?: SupportLanguage[] | undefined;469 parsers?: { [parserName: string]: Parser<T> } | undefined;470 printers?: { [astFormat: string]: Printer<T> } | undefined;471 options?: SupportOptions | undefined;472 defaultOptions?: Partial<RequiredOptions> | undefined;473}474 475export interface Parser<T = any> {476 parse: (text: string, options: ParserOptions<T>) => T | Promise<T>;477 astFormat: string;478 hasPragma?: ((text: string) => boolean) | undefined;479 hasIgnorePragma?: ((text: string) => boolean) | undefined;480 locStart: (node: T) => number;481 locEnd: (node: T) => number;482 preprocess?:483 | ((text: string, options: ParserOptions<T>) => string | Promise<string>)484 | undefined;485}486 487export interface Printer<T = any> {488 print(489 path: AstPath<T>,490 options: ParserOptions<T>,491 print: (path: AstPath<T>) => Doc,492 args?: unknown,493 ): Doc;494 printPrettierIgnored?(495 path: AstPath<T>,496 options: ParserOptions<T>,497 print: (path: AstPath<T>) => Doc,498 args?: unknown,499 ): Doc;500 embed?:501 | ((502 path: AstPath,503 options: Options,504 ) =>505 | ((506 textToDoc: (text: string, options: Options) => Promise<Doc>,507 print: (508 selector?: string | number | Array<string | number> | AstPath,509 ) => Doc,510 path: AstPath,511 options: Options,512 ) => Promise<Doc | undefined> | Doc | undefined)513 | Doc514 | null)515 | undefined;516 preprocess?:517 | ((ast: T, options: ParserOptions<T>) => T | Promise<T>)518 | undefined;519 insertPragma?: (text: string) => string;520 /**521 * @returns `null` if you want to remove this node522 * @returns `void` if you want to use modified `cloned`523 * @returns anything if you want to replace the node with it524 */525 massageAstNode?:526 | ((original: any, cloned: any, parent: any) => any)527 | undefined;528 hasPrettierIgnore?: ((path: AstPath<T>) => boolean) | undefined;529 canAttachComment?: ((node: T, ancestors: T[]) => boolean) | undefined;530 isBlockComment?: ((node: T) => boolean) | undefined;531 willPrintOwnComments?: ((path: AstPath<T>) => boolean) | undefined;532 printComment?:533 | ((commentPath: AstPath<T>, options: ParserOptions<T>) => Doc)534 | undefined;535 /**536 * By default, Prettier searches all object properties (except for a few predefined ones) of each node recursively.537 * This function can be provided to override that behavior.538 * @param node The node whose children should be returned.539 * @param options Current options.540 * @returns `[]` if the node has no children or `undefined` to fall back on the default behavior.541 */542 getCommentChildNodes?:543 | ((node: T, options: ParserOptions<T>) => T[] | undefined)544 | undefined;545 handleComments?:546 | {547 ownLine?:548 | ((549 commentNode: any,550 text: string,551 options: ParserOptions<T>,552 ast: T,553 isLastComment: boolean,554 ) => boolean)555 | undefined;556 endOfLine?:557 | ((558 commentNode: any,559 text: string,560 options: ParserOptions<T>,561 ast: T,562 isLastComment: boolean,563 ) => boolean)564 | undefined;565 remaining?:566 | ((567 commentNode: any,568 text: string,569 options: ParserOptions<T>,570 ast: T,571 isLastComment: boolean,572 ) => boolean)573 | undefined;574 }575 | undefined;576 getVisitorKeys?:577 | ((node: T, nonTraversableKeys: Set<string>) => string[])578 | undefined;579}580 581export interface CursorOptions extends Options {582 /**583 * Specify where the cursor is.584 */585 cursorOffset: number;586}587 588export interface CursorResult {589 formatted: string;590 cursorOffset: number;591}592 593/**594 * `format` is used to format text using Prettier. [Options](https://prettier.io/docs/options) may be provided to override the defaults.595 */596export function format(source: string, options?: Options): Promise<string>;597 598/**599 * `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`.600 * This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios.601 */602export function check(source: string, options?: Options): Promise<boolean>;603 604/**605 * `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code.606 * This is useful for editor integrations, to prevent the cursor from moving when code is formatted.607 *608 * The `cursorOffset` option should be provided, to specify where the cursor is.609 */610export function formatWithCursor(611 source: string,612 options: CursorOptions,613): Promise<CursorResult>;614 615export interface ResolveConfigOptions {616 /**617 * If set to `false`, all caching will be bypassed.618 */619 useCache?: boolean | undefined;620 /**621 * Pass directly the path of the config file if you don't wish to search for it.622 */623 config?: string | URL | undefined;624 /**625 * If set to `true` and an `.editorconfig` file is in your project,626 * Prettier will parse it and convert its properties to the corresponding prettier configuration.627 * This configuration will be overridden by `.prettierrc`, etc. Currently,628 * the following EditorConfig properties are supported:629 * - indent_style630 * - indent_size/tab_width631 * - max_line_length632 */633 editorconfig?: boolean | undefined;634}635 636/**637 * `resolveConfig` can be used to resolve configuration for a given source file,638 * passing its path or url as the first argument. The config search will start at639 * the directory of the file location and continue to search up the directory.640 *641 * A promise is returned which will resolve to:642 *643 * - An options object, providing a [config file](https://prettier.io/docs/configuration) was found.644 * - `null`, if no file was found.645 *646 * The promise will be rejected if there was an error parsing the configuration file.647 */648export function resolveConfig(649 fileUrlOrPath: string | URL,650 options?: ResolveConfigOptions,651): Promise<Options | null>;652 653/**654 * `resolveConfigFile` can be used to find the path of the Prettier configuration file,655 * that will be used when resolving the config (i.e. when calling `resolveConfig`).656 *657 * A promise is returned which will resolve to:658 *659 * - The path of the configuration file.660 * - `null`, if no file was found.661 *662 * The promise will be rejected if there was an error parsing the configuration file.663 */664export function resolveConfigFile(665 fileUrlOrPath?: string | URL,666): Promise<string | null>;667 668/**669 * As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache.670 * Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.671 */672export function clearConfigCache(): Promise<void>;673 674export interface SupportLanguage {675 name: string;676 parsers: BuiltInParserName[] | string[];677 group?: string | undefined;678 tmScope?: string | undefined;679 aceMode?: string | undefined;680 codemirrorMode?: string | undefined;681 codemirrorMimeType?: string | undefined;682 aliases?: string[] | undefined;683 extensions?: string[] | undefined;684 filenames?: string[] | undefined;685 linguistLanguageId?: number | undefined;686 vscodeLanguageIds?: string[] | undefined;687 interpreters?: string[] | undefined;688 isSupported?: ((options: { filepath: string }) => boolean) | undefined;689}690 691export interface SupportOptionRange {692 start: number;693 end: number;694 step: number;695}696 697export type SupportOptionType =698 | "int"699 | "string"700 | "boolean"701 | "choice"702 | "path";703 704export type CoreCategoryType =705 | "Config"706 | "Editor"707 | "Format"708 | "Other"709 | "Output"710 | "Global"711 | "Special";712 713export interface BaseSupportOption<Type extends SupportOptionType> {714 readonly name?: string | undefined;715 /**716 * Usually you can use {@link CoreCategoryType}717 */718 category: string;719 /**720 * The type of the option.721 *722 * When passing a type other than the ones listed below, the option is723 * treated as taking any string as argument, and `--option <${type}>` will724 * be displayed in --help.725 */726 type: Type;727 /**728 * Indicate that the option is deprecated.729 *730 * Use a string to add an extra message to --help for the option,731 * for example to suggest a replacement option.732 */733 deprecated?: true | string | undefined;734 /**735 * Description to be displayed in --help. If omitted, the option won't be736 * shown at all in --help.737 */738 description?: string | undefined;739}740 741export interface IntSupportOption extends BaseSupportOption<"int"> {742 default?: number | undefined;743 array?: false | undefined;744 range?: SupportOptionRange | undefined;745}746 747export interface IntArraySupportOption extends BaseSupportOption<"int"> {748 default?: Array<{ value: number[] }> | undefined;749 array: true;750}751 752export interface StringSupportOption extends BaseSupportOption<"string"> {753 default?: string | undefined;754 array?: false | undefined;755}756 757export interface StringArraySupportOption extends BaseSupportOption<"string"> {758 default?: Array<{ value: string[] }> | undefined;759 array: true;760}761 762export interface BooleanSupportOption extends BaseSupportOption<"boolean"> {763 default?: boolean | undefined;764 array?: false | undefined;765 description: string;766 oppositeDescription?: string | undefined;767}768 769export interface BooleanArraySupportOption extends BaseSupportOption<"boolean"> {770 default?: Array<{ value: boolean[] }> | undefined;771 array: true;772}773 774export interface ChoiceSupportOption<775 Value = any,776> extends BaseSupportOption<"choice"> {777 default?: Value | Array<{ value: Value }> | undefined;778 description: string;779 choices: Array<{780 value: Value;781 description: string;782 }>;783}784 785export interface PathSupportOption extends BaseSupportOption<"path"> {786 default?: string | undefined;787 array?: false | undefined;788}789 790export interface PathArraySupportOption extends BaseSupportOption<"path"> {791 default?: Array<{ value: string[] }> | undefined;792 array: true;793}794 795export type SupportOption =796 | IntSupportOption797 | IntArraySupportOption798 | StringSupportOption799 | StringArraySupportOption800 | BooleanSupportOption801 | BooleanArraySupportOption802 | ChoiceSupportOption803 | PathSupportOption804 | PathArraySupportOption;805 806export interface SupportOptions extends Record<string, SupportOption> {}807 808export interface SupportInfo {809 languages: SupportLanguage[];810 options: SupportOption[];811}812 813export interface FileInfoOptions {814 ignorePath?: string | URL | (string | URL)[] | undefined;815 withNodeModules?: boolean | undefined;816 plugins?: Array<string | URL | Plugin> | undefined;817 resolveConfig?: boolean | undefined;818}819 820export interface FileInfoResult {821 ignored: boolean;822 inferredParser: string | null;823}824 825export function getFileInfo(826 file: string | URL,827 options?: FileInfoOptions,828): Promise<FileInfoResult>;829 830export interface SupportInfoOptions {831 plugins?: Array<string | URL | Plugin> | undefined;832 showDeprecated?: boolean | undefined;833}834 835/**836 * Returns an object representing the parsers, languages and file types Prettier supports for the current version.837 */838export function getSupportInfo(839 options?: SupportInfoOptions,840): Promise<SupportInfo>;841 842/**843 * `version` field in `package.json`844 */845export const version: string;846 847// https://github.com/prettier/prettier/blob/main/src/utilities/public.js848export namespace util {849 interface SkipOptions {850 backwards?: boolean | undefined;851 }852 853 type Quote = "'" | '"';854 855 function getMaxContinuousCount(text: string, searchString: string): number;856 857 function getStringWidth(text: string): number;858 859 function getAlignmentSize(860 text: string,861 tabWidth: number,862 startIndex?: number | undefined,863 ): number;864 865 function getIndentSize(value: string, tabWidth: number): number;866 867 function skipNewline(868 text: string,869 startIndex: number | false,870 options?: SkipOptions | undefined,871 ): number | false;872 873 function skipInlineComment(874 text: string,875 startIndex: number | false,876 ): number | false;877 878 function skipTrailingComment(879 text: string,880 startIndex: number | false,881 ): number | false;882 883 function skipTrailingComment(884 text: string,885 startIndex: number | false,886 ): number | false;887 888 function hasNewline(889 text: string,890 startIndex: number,891 options?: SkipOptions | undefined,892 ): boolean;893 894 function hasNewlineInRange(895 text: string,896 startIndex: number,897 endIndex: number,898 ): boolean;899 900 function hasSpaces(901 text: string,902 startIndex: number,903 options?: SkipOptions | undefined,904 ): boolean;905 906 function getNextNonSpaceNonCommentCharacterIndex(907 text: string,908 startIndex: number,909 ): number | false;910 911 function getNextNonSpaceNonCommentCharacter(912 text: string,913 startIndex: number,914 ): string;915 916 function isNextLineEmpty(text: string, startIndex: number): boolean;917 918 function isPreviousLineEmpty(text: string, startIndex: number): boolean;919 920 function makeString(921 rawText: string,922 enclosingQuote: Quote,923 unescapeUnnecessaryEscapes?: boolean | undefined,924 ): string;925 926 function skip(927 characters: string | RegExp,928 ): (929 text: string,930 startIndex: number | false,931 options?: SkipOptions,932 ) => number | false;933 934 const skipWhitespace: (935 text: string,936 startIndex: number | false,937 options?: SkipOptions,938 ) => number | false;939 940 const skipSpaces: (941 text: string,942 startIndex: number | false,943 options?: SkipOptions,944 ) => number | false;945 946 const skipToLineEnd: (947 text: string,948 startIndex: number | false,949 options?: SkipOptions,950 ) => number | false;951 952 const skipEverythingButNewLine: (953 text: string,954 startIndex: number | false,955 options?: SkipOptions,956 ) => number | false;957 958 function addLeadingComment(node: any, comment: any): void;959 960 function addDanglingComment(node: any, comment: any, marker: any): void;961 962 function addTrailingComment(node: any, comment: any): void;963 964 function getPreferredQuote(965 text: string,966 preferredQuoteOrPreferSingleQuote: Quote | boolean,967 ): Quote;968}969 