tw5-typed 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "description": "Types for tiddlywiki",
3
3
  "license": "MIT",
4
4
  "name": "tw5-typed",
5
- "version": "0.4.7",
5
+ "version": "0.4.8",
6
6
  "url": "https://github.com/tiddly-gittly/tw5-typed",
7
7
  "homepage": "https://github.com/tiddly-gittly/tw5-typed",
8
8
  "bugs": {
@@ -39,11 +39,18 @@ declare module 'tiddlywiki' {
39
39
  */
40
40
  getTiddlers(): string[];
41
41
  /**
42
- * Get JSON string of tiddlers. Note that this will make lists like tags/list to be string, instead of array.
42
+ * Get JSON string of tiddlers. Note that this will make lists like tags/list to be string, instead of array. And result is a string, not an array.
43
43
  * @param filter Filter string
44
44
  * @param spaces Last arg of `JSON.stringify`, default is `' '`
45
+ * @returns a stringified JSON with type ITiddlerJSONResult. You will need to use `JSON.parse` on it.
45
46
  */
46
- getTiddlersAsJson(filter: string, spaces?: string): ITiddlerJSONResult;
47
+ getTiddlersAsJson(filter: string, spaces?: string): string;
48
+ /**
49
+ * Get JSON string of tiddler. Note that this will make lists like tags/list to be string, instead of array. And result is a string, not an object.
50
+ * @param title
51
+ * @returns a stringified JSON with type ITiddlerJSONResult. You will need to use `JSON.parse` on it.
52
+ */
53
+ getTiddlerAsJson(title: string): string;
47
54
  deleteTiddler(title: string): void;
48
55
  each(callback: (tiddler: Tiddler, title: string) => void): void;
49
56
  /**