UNPKG

@types/prettier-linter-helpers

Version:
49 lines (40 loc) 1.58 kB
# Installation > `npm install --save @types/prettier-linter-helpers` # Summary This package contains type definitions for prettier-linter-helpers (https://github.com/prettier/prettier-linter-helpers). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettier-linter-helpers. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prettier-linter-helpers/index.d.ts) ````ts /** * Converts invisible characters to a commonly recognizable visible form. * @param str - The string with invisibles to convert. * @returns The converted string. */ export function showInvisibles(str: string): string; export interface GenerateDifferences { /** * Generate results for differences between source code and formatted version. * * @param source - The original source. * @param prettierSource - The Prettier formatted source. * @returns An array containing { operation, offset, insertText, deleteText } */ (source: string, prettierSource: string): Difference[]; INSERT: "insert"; DELETE: "delete"; REPLACE: "replace"; } export const generateDifferences: GenerateDifferences; export interface Difference { operation: "insert" | "delete" | "replace"; offset: number; insertText?: string | undefined; deleteText?: string | undefined; } ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: none # Credits These definitions were written by [JounQin](https://github.com/JounQin).