tw5-typed 0.3.8 → 0.3.9

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.3.8",
5
+ "version": "0.3.9",
6
6
  "url": "https://github.com/tiddly-gittly/tw5-typed",
7
7
  "homepage": "https://github.com/tiddly-gittly/tw5-typed",
8
8
  "bugs": {
@@ -23,6 +23,12 @@ declare module 'tiddlywiki' {
23
23
  * Notifier mechanism
24
24
  */
25
25
  Notifier: typeof Notifier;
26
+ /**
27
+ * Copy plain text to the clipboard on browsers that support it.
28
+ *
29
+ * And send a notification to the user if doNotNotify is not true.
30
+ */
31
+ copyToClipboard(text: string, option?: { doNotNotify?: boolean }): void;
26
32
  }
27
33
  export class Notifier {
28
34
  /**
@@ -470,6 +470,14 @@ declare module 'tiddlywiki' {
470
470
  event: IWidgetEvent,
471
471
  variables: Record<string, IWidgetVariable>,
472
472
  ): boolean;
473
+
474
+ /**
475
+ * The destroy method will be called by parent widget.
476
+ * If you widget don't have any child widget, you can just write your own tear down logic. If it may have some child widget, don't forget to call original destroy method in the Widget class to destroy children widgets.
477
+ * @version >=5.3.0
478
+ * @url https://tiddlywiki.com/dev/#Widget%20%60destroy%60%20method%20examples
479
+ */
480
+ destroy(): void;
473
481
  }
474
482
 
475
483
  export type ModalWidget = {