@types/rison
Advanced tools
| // Type definitions for Rison | ||
| // Project: https://github.com/Nanonid/rison | ||
| // Definitions by: Andrei Kurosh <https://github.com/impworks> | ||
| // Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
| declare var rison: IRison; | ||
| interface IRison { | ||
| /** | ||
| * Rison-encodes a javascript structure. | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode(obj: any): string; | ||
| /** | ||
| * Rison-encodes a javascript object without surrounding parens (O-Rison). | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_object<T>(obj: T): string; | ||
| /** | ||
| * Rison-encodes a javascript array without surrounding parens (A-Rison). | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_array<T>(arr: T[]): string; | ||
| /** | ||
| * Rison-encodes and then url-escapes a javascript structure. | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_uri(obj: any): string; | ||
| /** | ||
| * Parses a Rison string into a javascript structure. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting array or object. | ||
| */ | ||
| decode<T>(encoded: string): T; | ||
| /** | ||
| * Parses a O-Rison string into a javascript object. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting object. | ||
| */ | ||
| decode_object<T>(encoded: string): T; | ||
| /** | ||
| * Parses a A-Rison string into a javascript array. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting array. | ||
| */ | ||
| decode_array<T>(encoded: string): T[]; | ||
| } |
| { | ||
| "name": "@types/rison", | ||
| "version": "0.0.4", | ||
| "version": "0.0.5", | ||
| "description": "TypeScript definitions for Rison", | ||
@@ -14,4 +14,5 @@ "license": "MIT", | ||
| "dependencies": {}, | ||
| "typings": "rison.d.ts", | ||
| "typesPublisherContentHash": "ec8d5f66750220a7f3a9ed1cb51e702d5e5a5e19e9a68b6781894babfadb2225" | ||
| "peerDependencies": {}, | ||
| "typings": "index.d.ts", | ||
| "typesPublisherContentHash": "4775f3c06e1a304330ca4ab62200d5a5c0d24a815629db43600399b20b618676" | ||
| } |
+1
-1
@@ -11,3 +11,3 @@ # Installation | ||
| Additional Details | ||
| * Last updated: Mon, 19 Sep 2016 17:28:59 GMT | ||
| * Last updated: Wed, 05 Oct 2016 20:53:39 GMT | ||
| * File structure: Global | ||
@@ -14,0 +14,0 @@ * Library Dependencies: none |
| { | ||
| "authors": "Andrei Kurosh <https://github.com/impworks>", | ||
| "definitionFilename": "rison.d.ts", | ||
| "definitionFilename": "index.d.ts", | ||
| "libraryDependencies": [], | ||
@@ -19,6 +19,6 @@ "moduleDependencies": [], | ||
| "files": [ | ||
| "rison.d.ts" | ||
| "index.d.ts" | ||
| ], | ||
| "hasPackageJson": false, | ||
| "contentHash": "ec8d5f66750220a7f3a9ed1cb51e702d5e5a5e19e9a68b6781894babfadb2225" | ||
| "contentHash": "4775f3c06e1a304330ca4ab62200d5a5c0d24a815629db43600399b20b618676" | ||
| } |
| // Type definitions for Rison | ||
| // Project: https://github.com/Nanonid/rison | ||
| // Definitions by: Andrei Kurosh <https://github.com/impworks> | ||
| // Definitions: https://github.com/borisyankov/DefinitelyTyped | ||
| declare var rison: IRison; | ||
| interface IRison { | ||
| /** | ||
| * Rison-encodes a javascript structure. | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode(obj: any): string; | ||
| /** | ||
| * Rison-encodes a javascript object without surrounding parens (O-Rison). | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_object<T>(obj: T): string; | ||
| /** | ||
| * Rison-encodes a javascript array without surrounding parens (A-Rison). | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_array<T>(arr: T[]): string; | ||
| /** | ||
| * Rison-encodes and then url-escapes a javascript structure. | ||
| * @param obj Object to encode. | ||
| * @returns {} Encoded string. | ||
| */ | ||
| encode_uri(obj: any): string; | ||
| /** | ||
| * Parses a Rison string into a javascript structure. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting array or object. | ||
| */ | ||
| decode<T>(encoded: string): T; | ||
| /** | ||
| * Parses a O-Rison string into a javascript object. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting object. | ||
| */ | ||
| decode_object<T>(encoded: string): T; | ||
| /** | ||
| * Parses a A-Rison string into a javascript array. | ||
| * @param encoded Encoded string. | ||
| * @returns {} Resulting array. | ||
| */ | ||
| decode_array<T>(encoded: string): T[]; | ||
| } |
3429
2.51%