diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ef83ff093..e6143b17b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -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/)) diff --git a/opn/opn-tests.ts b/opn/opn-tests.ts new file mode 100644 index 000000000..361725970 --- /dev/null +++ b/opn/opn-tests.ts @@ -0,0 +1,10 @@ +/// + +import opn = require('opn'); + +var errorCallback: (err: Error) => void; + +opn('foo'); +opn('foo', 'bar'); +opn('foo', errorCallback); +opn('foo', 'bar', errorCallback); diff --git a/opn/opn.d.ts b/opn/opn.d.ts new file mode 100644 index 000000000..10a34ce60 --- /dev/null +++ b/opn/opn.d.ts @@ -0,0 +1,10 @@ +// Type definitions for opn 1.0.0 +// Project: https://github.com/sindresorhus/opn +// Definitions by: Shinnosuke Watanabe +// 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; +}