From 3963c4498b7208e0591af6a7873e1aab0afee488 Mon Sep 17 00:00:00 2001 From: MIZUNE Pine Date: Sat, 26 Apr 2014 10:37:50 +0900 Subject: [PATCH] Add url --- CONTRIBUTORS.md | 1 + js-url/js-url-test.ts | 9 +++++++++ js-url/js-url.d.ts | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 js-url/js-url-test.ts create mode 100644 js-url/js-url.d.ts diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d68e3061c..7806a004a 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -156,6 +156,7 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.Watermark](http://jquery-watermark.googlecode.com) (by [Anwar Javed](https://github.com/anwarjaved)) * [jQuery.base64](https://github.com/yatt/jquery.base64) (by [Shinya Mochizuki](https://github.com/enrapt-mochizuki)) * [js-git](https://github.com/creationix/js-git) (by [Bart van der Schoor](https://github.com/Bartvds)) +* [js-url](https://github.com/websanova/js-url) (by [MIZUNE Pine](https://github.com/pine613)) * [js-yaml](https://github.com/nodeca/js-yaml) (by [Bart van der Schoor](https://github.com/Bartvds/)) * [jScrollPane](http://jscrollpane.kelvinluck.com) (by [Dániel Tar](https://github.com/qcz)) * [JSDeferred](http://cho45.stfuawsc.com/jsdeferred/) (by [Daisuke Mino](https://github.com/minodisk)) diff --git a/js-url/js-url-test.ts b/js-url/js-url-test.ts new file mode 100644 index 000000000..0b26f6175 --- /dev/null +++ b/js-url/js-url-test.ts @@ -0,0 +1,9 @@ +/// + +url(); + +url('domain'); +url(1); + +url('domain', 'test.www.example.com/path/here'); +url(-1, 'test.www.example.com/path/here'); diff --git a/js-url/js-url.d.ts b/js-url/js-url.d.ts new file mode 100644 index 000000000..ff974f15e --- /dev/null +++ b/js-url/js-url.d.ts @@ -0,0 +1,14 @@ +// Type definitions for url() v1.8.6 +// Project: https://github.com/websanova/js-url +// Definitions by: MIZUNE Pine +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +interface UrlStatic { + (): string; + (pattern: string): string; + (pattern: number): string; + (pattern: string, url: string): string; + (pattern: number, url: string): string; +} + +declare var url: UrlStatic;