@types/pegjs
Advanced tools
+60
-9
@@ -1,4 +0,4 @@ | ||
| // Type definitions for PEG.js | ||
| // Type definitions for PEG.js v0.10.0 | ||
| // Project: http://pegjs.org/ | ||
| // Definitions by: vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi> | ||
| // Definitions by: vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>, C.J. Bell <https://github.com/siegebell> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -64,16 +64,67 @@ | ||
| export interface BuildOptions { | ||
| export interface BuildOptionsBase { | ||
| /** rules the parser will be allowed to start parsing from (default: the first rule in the grammar) */ | ||
| allowedStartRules?: string[]; | ||
| /** if `true`, makes the parser cache results, avoiding exponential parsing time in pathological cases but making the parser slower (default: `false`) */ | ||
| cache?: boolean; | ||
| allowedStartRules?: string[]; | ||
| optimize?: string; | ||
| /** selects between optimizing the generated parser for parsing speed (`"speed"`) or code size (`"size"`) (default: `"speed"`) */ | ||
| optimize?: "speed" | "size"; | ||
| /** plugins to use */ | ||
| plugins?: any[]; | ||
| /** makes the parser trace its progress (default: `false`) */ | ||
| trace?: boolean | ||
| } | ||
| export interface OutputBuildOptions extends BuildOptions { | ||
| output?: string; | ||
| export interface ParserBuildOptions extends BuildOptionsBase { | ||
| /** if set to `"parser"`, the method will return generated parser object; if set to `"source"`, it will return parser source code as a string (default: `"parser"`) */ | ||
| output?: "parser" | ||
| } | ||
| export function buildParser(grammar: string, options?: BuildOptions): Parser; | ||
| export function buildParser(grammar: string, options?: OutputBuildOptions): Parser | string; | ||
| export interface OutputFormatAmdCommonjs extends BuildOptionsBase { | ||
| /** if set to `"parser"`, the method will return generated parser object; if set to `"source"`, it will return parser source code as a string (default: `"parser"`) */ | ||
| output: "source"; | ||
| /** format of the genreated parser (`"amd"`, `"bare"`, `"commonjs"`, `"globals"`, or `"umd"`); valid only when `output` is set to `"source"` (default: `"bare"`) */ | ||
| format: "amd" | "commonjs"; | ||
| /** parser dependencies, the value is an object which maps variables used to access the dependencies in the parser to module IDs used to load them; valid only when `format` is set to `"amd"`, `"commonjs"`, or `"umd"` (default: `{}`) */ | ||
| dependencies?: any | ||
| } | ||
| export interface OutputFormatUmd extends BuildOptionsBase { | ||
| /** if set to `"parser"`, the method will return generated parser object; if set to `"source"`, it will return parser source code as a string (default: `"parser"`) */ | ||
| output: "source"; | ||
| /** format of the genreated parser (`"amd"`, `"bare"`, `"commonjs"`, `"globals"`, or `"umd"`); valid only when `output` is set to `"source"` (default: `"bare"`) */ | ||
| format: "umd"; | ||
| /** parser dependencies, the value is an object which maps variables used to access the dependencies in the parser to module IDs used to load them; valid only when `format` is set to `"amd"`, `"commonjs"`, or `"umd"` (default: `{}`) */ | ||
| dependencies?: any | ||
| /** name of a global variable into which the parser object is assigned to when no module loader is detected; valid only when `format` is set to `"globals"` or `"umd"` (default: `null`) */ | ||
| exportVar?: any | ||
| } | ||
| export interface OutputFormatGlobals extends BuildOptionsBase { | ||
| /** if set to `"parser"`, the method will return generated parser object; if set to `"source"`, it will return parser source code as a string (default: `"parser"`) */ | ||
| output: "source"; | ||
| /** format of the genreated parser (`"amd"`, `"bare"`, `"commonjs"`, `"globals"`, or `"umd"`); valid only when `output` is set to `"source"` (default: `"bare"`) */ | ||
| format: "globals"; | ||
| /** name of a global variable into which the parser object is assigned to when no module loader is detected; valid only when `format` is set to `"globals"` or `"umd"` (default: `null`) */ | ||
| exportVar?: any | ||
| } | ||
| export interface OutputFormatBare extends BuildOptionsBase { | ||
| /** if set to `"parser"`, the method will return generated parser object; if set to `"source"`, it will return parser source code as a string (default: `"parser"`) */ | ||
| output: "source"; | ||
| /** format of the genreated parser (`"amd"`, `"bare"`, `"commonjs"`, `"globals"`, or `"umd"`); valid only when `output` is set to `"source"` (default: `"bare"`) */ | ||
| format?: "bare" | ||
| } | ||
| /** Returns a generated parser object. It will throw an exception if the grammar is invalid. The exception will contain `message` property with more details about the error. */ | ||
| export function generate(grammar: string, options?: ParserBuildOptions): Parser; | ||
| /** Returns the generated source code as a `string`. It will throw an exception if the grammar is invalid. The exception will contain `message` property with more details about the error. */ | ||
| export function generate(grammar: string, options: OutputFormatAmdCommonjs): string; | ||
| /** Returns the generated source code as a `string`. It will throw an exception if the grammar is invalid. The exception will contain `message` property with more details about the error. */ | ||
| export function generate(grammar: string, options: OutputFormatUmd): string; | ||
| /** Returns the generated source code as a `string`. It will throw an exception if the grammar is invalid. The exception will contain `message` property with more details about the error. */ | ||
| export function generate(grammar: string, options: OutputFormatGlobals): string; | ||
| /** Returns the generated source code as a `string`. It will throw an exception if the grammar is invalid. The exception will contain `message` property with more details about the error. */ | ||
| export function generate(grammar: string, options: OutputFormatBare): string; | ||
| export namespace parser { | ||
@@ -80,0 +131,0 @@ type SyntaxError = PegjsError; |
| { | ||
| "name": "@types/pegjs", | ||
| "version": "0.0.28", | ||
| "description": "TypeScript definitions for PEG.js", | ||
| "version": "0.10.0", | ||
| "description": "TypeScript definitions for PEG.js v0.10.0", | ||
| "license": "MIT", | ||
| "author": "vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>", | ||
| "author": "vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>, C.J. Bell <https://github.com/siegebell>", | ||
| "main": "", | ||
@@ -14,4 +14,5 @@ "repository": { | ||
| "dependencies": {}, | ||
| "peerDependencies": {}, | ||
| "typings": "index.d.ts", | ||
| "typesPublisherContentHash": "e4680a944ad1a517d37d6b79f32d7ba64fe343dc51a613ba058d93d135f0fd89" | ||
| "typesPublisherContentHash": "c942fdca7968a6d4a5b90d16d465bd8821c6fc73847fdb392909a6425949e118" | ||
| } |
+3
-3
@@ -5,3 +5,3 @@ # Installation | ||
| # Summary | ||
| This package contains type definitions for PEG.js (http://pegjs.org/). | ||
| This package contains type definitions for PEG.js v0.10.0 (http://pegjs.org/). | ||
@@ -12,3 +12,3 @@ # Details | ||
| Additional Details | ||
| * Last updated: Mon, 19 Sep 2016 17:28:59 GMT | ||
| * Last updated: Mon, 14 Nov 2016 19:35:00 GMT | ||
| * File structure: UMD | ||
@@ -20,2 +20,2 @@ * Library Dependencies: none | ||
| # Credits | ||
| These definitions were written by vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>. | ||
| These definitions were written by vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>, C.J. Bell <https://github.com/siegebell>. |
| { | ||
| "authors": "vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>", | ||
| "authors": "vvakame <https://github.com/vvakame>, Tobias Kahlert <https://github.com/SrTobi>, C.J. Bell <https://github.com/siegebell>", | ||
| "definitionFilename": "index.d.ts", | ||
| "libraryDependencies": [], | ||
| "moduleDependencies": [], | ||
| "libraryMajorVersion": "0", | ||
| "libraryMinorVersion": "0", | ||
| "libraryName": "PEG.js", | ||
| "libraryMajorVersion": 0, | ||
| "libraryMinorVersion": 10, | ||
| "libraryName": "PEG.js v0.10.0", | ||
| "typingsPackageName": "pegjs", | ||
@@ -22,3 +22,3 @@ "projectName": "http://pegjs.org/", | ||
| "hasPackageJson": false, | ||
| "contentHash": "e4680a944ad1a517d37d6b79f32d7ba64fe343dc51a613ba058d93d135f0fd89" | ||
| "contentHash": "c942fdca7968a6d4a5b90d16d465bd8821c6fc73847fdb392909a6425949e118" | ||
| } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8540
140.23%136
52.81%0
-100%