@types/prettier-linter-helpers
TypeScript definitions for prettier-linter-helpers
Last updated 3 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/prettier-linter-helpers 
SYNC missed versions from official npm registry.

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

// Type definitions for prettier-linter-helpers 1.0
// Project: https://github.com/prettier/prettier-linter-helpers
// Definitions by: JounQin <https://github.com/JounQin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * 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: Sun, 24 Sep 2023 06:37:28 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by JounQin.

Current Tags

  • 1.0.2                                ...           latest (3 years ago)
  • 1.0.0                                ...           ts2.8 (6 years ago)
  • 1.0.0                                ...           ts2.9 (6 years ago)
  • 1.0.0                                ...           ts3.0 (6 years ago)
  • 1.0.0                                ...           ts3.1 (6 years ago)
  • 1.0.0                                ...           ts3.2 (6 years ago)
  • 1.0.0                                ...           ts3.3 (6 years ago)
  • 1.0.0                                ...           ts3.4 (6 years ago)
  • 1.0.0                                ...           ts3.5 (6 years ago)
  • 1.0.1                                ...           ts3.6 (5 years ago)
  • 1.0.1                                ...           ts3.7 (5 years ago)
  • 1.0.1                                ...           ts3.8 (5 years ago)
  • 1.0.1                                ...           ts3.9 (5 years ago)
  • 1.0.1                                ...           ts4.0 (5 years ago)
  • 1.0.1                                ...           ts4.1 (5 years ago)
  • 1.0.1                                ...           ts4.2 (5 years ago)
  • 1.0.1                                ...           ts4.3 (5 years ago)
  • 1.0.1                                ...           ts4.4 (5 years ago)
  • 1.0.2                                ...           ts4.5 (3 years ago)
  • 1.0.2                                ...           ts4.6 (3 years ago)
  • 1.0.2                                ...           ts4.7 (3 years ago)
  • 1.0.2                                ...           ts4.8 (3 years ago)
  • 1.0.2                                ...           ts4.9 (3 years ago)
  • 1.0.2                                ...           ts5.0 (3 years ago)
  • 1.0.2                                ...           ts5.1 (3 years ago)
  • 1.0.2                                ...           ts5.2 (3 years ago)
  • 1.0.2                                ...           ts5.3 (3 years ago)

3 Versions

  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |