tw5-typed 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Wiki.d.ts +9 -1
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.1.1",
5
+ "version": "0.1.2",
6
6
  "url": "https://github.com/tiddly-gittly/tw5-typed",
7
7
  "homepage": "https://github.com/tiddly-gittly/tw5-typed",
8
8
  "bugs": {
package/src/Wiki.d.ts CHANGED
@@ -27,7 +27,15 @@ declare module 'tiddlywiki' {
27
27
  * Update existed tiddler based on the title field.
28
28
  */
29
29
  addTiddler: (tiddler: Tiddler | ITiddlerFields) => void;
30
- getTiddlerText: (title: string, fallbackText?: string) => string | undefined;
30
+ /**
31
+ * Get tiddler's text field, with an optional default text.
32
+ * If have _is_skinny field, will just return null (this is a rare case, so not put in the return type for now).
33
+ *
34
+ * @param title will return undefined (or fallback) if the tiddler isn't found
35
+ * @param fallbackText default text when text field is empty or undefined
36
+ */
37
+ getTiddlerText(title: string, fallbackText: string): string;
38
+ getTiddlerText(title: string, fallbackText?: string): string | undefined;
31
39
  /**
32
40
  * Set tiddler text of any field.
33
41
  *