Socket
Socket
Sign inDemoInstall

@types/prettier

Package Overview
Dependencies
0
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.9.0 to 1.10.0

74

prettier/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for prettier 1.9
// Type definitions for prettier 1.10
// Project: https://github.com/prettier/prettier

@@ -7,6 +7,6 @@ // Definitions by: Ika <https://github.com/ikatyang>

import { File } from 'babel-types';
export type AST = any;
export type Doc = any; // https://github.com/prettier/prettier/blob/master/commands.md
export type FastPath = any; // https://github.com/prettier/prettier/blob/master/src/common/fast-path.js
export type AST = File;
export type BuiltInParser = (text: string, options?: any) => AST;

@@ -23,3 +23,4 @@ export type BuiltInParserName =

| 'graphql'
| 'markdown';
| 'markdown'
| 'vue';

@@ -102,4 +103,33 @@ export type CustomParser = (text: string, parsers: Record<BuiltInParserName, BuiltInParser>, options: Options) => AST;

arrowParens?: 'avoid' | 'always';
/**
* The plugin API is in a beta state.
*/
plugins?: Array<string | Plugin>;
}
export interface Plugin {
languages: SupportLanguage;
parsers: { [parserName: string]: Parser };
printers: { [astFormat: string]: Printer };
}
export interface Parser {
parse: (text: string, parsers: { [parserName: string]: Parser }, options: object) => AST;
astFormat: string;
}
export interface Printer {
print(
path: FastPath,
options: object,
print: (path: FastPath) => Doc,
): Doc;
embed(
path: FastPath,
print: (path: FastPath) => Doc,
textToDoc: (text: string, options: object) => Doc,
options: object,
): Doc | null;
}
export interface CursorOptions extends Options {

@@ -199,4 +229,38 @@ /**

export interface SupportOption {
since: string;
type: 'int' | 'boolean' | 'choice' | 'path';
deprecated?: string;
redirect?: SupportOptionRedirect;
description: string;
oppositeDescription?: string;
default: SupportOptionValue;
range?: SupportOptionRange;
choices?: SupportOptionChoice;
}
export interface SupportOptionRedirect {
options: string;
value: SupportOptionValue;
}
export interface SupportOptionRange {
start: number;
end: number;
step: number;
}
export interface SupportOptionChoice {
value: boolean | string;
description?: string;
since?: string;
deprecated?: string;
redirect?: SupportOptionValue;
}
export type SupportOptionValue = number | boolean | string;
export interface SupportInfo {
languages: SupportLanguage[];
options: SupportOption[];
}

@@ -203,0 +267,0 @@

8

prettier/package.json
{
"name": "@types/prettier",
"version": "1.9.0",
"version": "1.10.0",
"description": "TypeScript definitions for prettier",

@@ -19,7 +19,5 @@ "license": "MIT",

"scripts": {},
"dependencies": {
"@types/babel-types": "*"
},
"typesPublisherContentHash": "4c67a44c06fbc982df29c65dda835173812ac06c4cbdf09d9d3328c8ee058ea4",
"dependencies": {},
"typesPublisherContentHash": "fe86d0d4e5f625bc870e5b531ad01e51f060ed72b100ffcd36816e3d07abccd3",
"typeScriptVersion": "2.3"
}

@@ -11,4 +11,4 @@ # Installation

Additional Details
* Last updated: Mon, 11 Dec 2017 19:14:19 GMT
* Dependencies: babel-types
* Last updated: Wed, 17 Jan 2018 22:17:28 GMT
* Dependencies: none
* Global values: none

@@ -15,0 +15,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc