@types/uritemplate
Advanced tools
+27
-43
@@ -1,4 +0,5 @@ | ||
| // Type definitions for URI Template JS 0.3.4 | ||
| // Type definitions for URI Template JS 0.3 | ||
| // Project: https://github.com/fxa/uritemplate-js | ||
| // Definitions by: Chui Tey <https://github.com/teyc> | ||
| // Ruben Taelman <https://github.com/rubensworks> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -11,47 +12,30 @@ | ||
| declare namespace uritemplate { | ||
| export class UriTemplate { | ||
| /** | ||
| * Expands template into a string using parameter | ||
| * supplied | ||
| */ | ||
| expand(data: {}): string; | ||
| } | ||
| interface UriTemplate { | ||
| /** | ||
| * Expands template into a string using parameter | ||
| * supplied | ||
| */ | ||
| expand(data: {}): string; | ||
| } | ||
| export interface UriTemplateErrorOptions { | ||
| expressionText: string; | ||
| message: string; | ||
| position: number; | ||
| } | ||
| interface UriTemplateErrorOptions { | ||
| expressionText: string | ||
| message: string | ||
| position: number | ||
| } | ||
| interface UriTemplateError { | ||
| new (options: UriTemplateErrorOptions): UriTemplateError | ||
| } | ||
| interface UriTemplateStatic { | ||
| /** | ||
| * parse template text returning instance of UriTemplate | ||
| * @param template text | ||
| * @return instance of UriTemplate | ||
| * @example | ||
| * import UriTemplate = require('uritemplate'); | ||
| * let template = UriTemplate.parse('http://localhost/query{?name,city}'); | ||
| * let result = template.expand({name: 'Jayden', city: 'Wodonga'}); | ||
| * // returns http://localhost/query?name=Jayden&city=Wodonga | ||
| */ | ||
| parse(templateText: string): uritemplate.UriTemplate; | ||
| UriTemplateError: new (options: uritemplate.UriTemplateErrorOptions) => uritemplate.UriTemplateError; | ||
| } | ||
| export class UriTemplateError { | ||
| constructor(options: UriTemplateErrorOptions); | ||
| } | ||
| declare module 'uritemplate' { | ||
| export var UriTemplate: uritemplate.UriTemplateStatic; | ||
| } | ||
| /** | ||
| * parse template text returning instance of UriTemplate | ||
| * @param template text | ||
| * @return instance of UriTemplate | ||
| * @example | ||
| * import UriTemplate = require('uritemplate'); | ||
| * let template = UriTemplate.parse('http://localhost/query{?name,city}'); | ||
| * let result = template.expand({name: 'Jayden', city: 'Wodonga'}); | ||
| * // returns http://localhost/query?name=Jayden&city=Wodonga | ||
| */ | ||
| export function parse(templateText: string): UriTemplate; |
@@ -0,0 +0,0 @@ MIT License |
| { | ||
| "name": "@types/uritemplate", | ||
| "version": "0.3.3", | ||
| "version": "0.3.4", | ||
| "description": "TypeScript definitions for URI Template JS", | ||
@@ -9,3 +9,9 @@ "license": "MIT", | ||
| "name": "Chui Tey", | ||
| "url": "https://github.com/teyc" | ||
| "url": "https://github.com/teyc", | ||
| "githubUsername": "teyc" | ||
| }, | ||
| { | ||
| "name": "Ruben Taelman", | ||
| "url": "https://github.com/rubensworks", | ||
| "githubUsername": "rubensworks" | ||
| } | ||
@@ -20,4 +26,4 @@ ], | ||
| "dependencies": {}, | ||
| "typesPublisherContentHash": "d072d679a706d2d5fce55df8f24a7f81afe06b1dc2423f21c8ac0be6fe7b9e65", | ||
| "typesPublisherContentHash": "05f2345a479c03b73e07cd2f62a76de3bcd995d52aec60126606b739b8d4a9c0", | ||
| "typeScriptVersion": "2.0" | ||
| } |
@@ -11,3 +11,3 @@ # Installation | ||
| Additional Details | ||
| * Last updated: Mon, 21 Aug 2017 22:03:22 GMT | ||
| * Last updated: Thu, 09 Nov 2017 15:19:58 GMT | ||
| * Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
| # Credits | ||
| These definitions were written by Chui Tey <https://github.com/teyc>. | ||
| These definitions were written by Chui Tey <https://github.com/teyc>, Ruben Taelman <https://github.com/rubensworks>. |
3757
-1.7%35
-16.67%