add pegjs.d.ts

This commit is contained in:
vvakame
2014-04-04 12:26:32 +09:00
parent 1f368c4187
commit e4cafe56f0
3 changed files with 25 additions and 0 deletions
+1
View File
@@ -222,6 +222,7 @@ List of Definitions
* [Parallel.js](https://github.com/adambom/parallel.js) (by [Josh Baldwin](https://github.com/jbaldwin))
* [Parsimmon](https://github.com/jayferd/parsimmon) (by [Bart van der Schoor](https://github.com/Bartvds))
* [PDF.js](https://github.com/mozilla/pdf.js) (by [Josh Baldwin](https://github.com/jbaldwin))
* [PEG.js](http://pegjs.majda.cz/) (by [vvakame](https://github.com/vvakame))
* [Persona](http://www.mozilla.org/en-US/persona) (by [James Frasca](https://github.com/Nycto))
* [PhantomJS](http://phantomjs.org) (by [Jed Hunsaker](https://github.com/jedhunsaker))
* [PhoneGap](http://phonegap.com) (by [Boris Yankov](https://github.com/borisyankov))
+5
View File
@@ -0,0 +1,5 @@
/// <reference path="./pegjs.d.ts" />
var input: string;
var result = PEG.parse(input);
console.log(result);
+19
View File
@@ -0,0 +1,19 @@
// Type definitions for PEG.js
// Project: http://pegjs.majda.cz/
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module PEG {
function parse(input:string):any;
class SyntaxError {
line:number;
column:number;
offset:number;
expected:any[];
found:any;
name:string;
message:string;
}
}