Add definitions for opn

This commit is contained in:
Shinnosuke Watanabe
2014-09-10 17:12:57 +09:00
parent 50dd84eb5d
commit 3fec21e86e
3 changed files with 21 additions and 0 deletions
+1
View File
@@ -283,6 +283,7 @@ All definitions files include a header with the author and editors, so at some p
* [object-path](https://github.com/mariocasciaro/object-path) (by [Paulo Cesar](https://github.com/pocesar/))
* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/))
* [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/))
* [opn](https://github.com/sindresorhus/opn) (by [Shinnosuke Watanabe](https://github.com/shinnn))
* [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
* [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/))
* [passport-facebook](https://github.com/jaredhanson/passport-facebook) (by [James Roland Cabresos](https://github.com/staticfunction/))
+10
View File
@@ -0,0 +1,10 @@
/// <reference path="opn.d.ts" />
import opn = require('opn');
var errorCallback: (err: Error) => void;
opn('foo');
opn('foo', 'bar');
opn('foo', errorCallback);
opn('foo', 'bar', errorCallback);
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for opn 1.0.0
// Project: https://github.com/sindresorhus/opn
// Definitions by: Shinnosuke Watanabe <https://github.com/shinnn>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'opn' {
function opn(target: string, callback?: (err: Error) => void): void;
function opn(target: string, app: string, callback?: (err: Error) => void): void;
export = opn;
}