tw5-typed 0.2.13 → 0.2.15
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 +7 -7
- package/src/Wiki.d.ts +2 -2
- package/src/server.d.ts +1 -1
- package/src/tw.d.ts +6 -1
- package/src/widget.d.ts +3 -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.2.
|
|
5
|
+
"version": "0.2.15",
|
|
6
6
|
"url": "https://github.com/tiddly-gittly/tw5-typed",
|
|
7
7
|
"homepage": "https://github.com/tiddly-gittly/tw5-typed",
|
|
8
8
|
"bugs": {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"prepublishOnly": "npx tsc --noEmit"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/node": "^18.11.
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "5.46.
|
|
25
|
-
"@typescript-eslint/parser": "5.46.
|
|
26
|
-
"eslint": "8.
|
|
23
|
+
"@types/node": "^18.11.16",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
25
|
+
"@typescript-eslint/parser": "5.46.1",
|
|
26
|
+
"eslint": "8.30.0",
|
|
27
27
|
"eslint-config-prettier": "8.5.0",
|
|
28
28
|
"eslint-config-standard": "17.0.0",
|
|
29
|
-
"eslint-config-standard-with-typescript": "
|
|
29
|
+
"eslint-config-standard-with-typescript": "24.0.0",
|
|
30
30
|
"eslint-import-resolver-alias": "1.1.2",
|
|
31
31
|
"eslint-import-resolver-typescript": "3.5.2",
|
|
32
32
|
"eslint-plugin-html": "7.1.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"eslint-plugin-security": "1.5.0",
|
|
41
41
|
"eslint-plugin-security-node": "1.1.1",
|
|
42
42
|
"eslint-plugin-typescript-sort-keys": "2.1.0",
|
|
43
|
-
"eslint-plugin-unicorn": "45.0.
|
|
43
|
+
"eslint-plugin-unicorn": "45.0.2",
|
|
44
44
|
"prettier": "2.8.1",
|
|
45
45
|
"typescript": "4.9.4"
|
|
46
46
|
}
|
package/src/Wiki.d.ts
CHANGED
|
@@ -69,11 +69,11 @@ declare module 'tiddlywiki' {
|
|
|
69
69
|
* Create or update tiddler.
|
|
70
70
|
* Update existed tiddler based on the title field.
|
|
71
71
|
*/
|
|
72
|
-
addTiddler: (tiddler: Tiddler | Partial<ITiddlerFieldsParam>) => void;
|
|
72
|
+
addTiddler: (tiddler: Tiddler | Partial<ITiddlerFieldsParam> | Partial<ITiddlerFields>) => void;
|
|
73
73
|
/**
|
|
74
74
|
* Call `addTiddler` for each iton of the list, but should passing `tiddler.fields`, directly passing tiddler object may failed to add in some cases.
|
|
75
75
|
*/
|
|
76
|
-
addTiddlers: (tiddler: Array<Partial<ITiddlerFieldsParam>>) => void;
|
|
76
|
+
addTiddlers: (tiddler: Array<Partial<ITiddlerFieldsParam>| Partial<ITiddlerFields>>) => void;
|
|
77
77
|
/**
|
|
78
78
|
* Get tiddler's text field, with an optional default text.
|
|
79
79
|
* If have _is_skinny field, will just return null (this is a rare case, so not put in the return type for now).
|
package/src/server.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ declare module 'tiddlywiki' {
|
|
|
103
103
|
* @link https://talk.tiddlywiki.org/t/what-is-the-state-in-server-route-handler/2877
|
|
104
104
|
*/
|
|
105
105
|
export type ServerEndpointHandler<T = Record<string, unknown>> = (
|
|
106
|
-
request: Http.ClientRequest,
|
|
106
|
+
request: Http.ClientRequest & Http.InformationEvent,
|
|
107
107
|
response: Http.ServerResponse,
|
|
108
108
|
context: ServerEndpointContext & T,
|
|
109
109
|
) => void;
|
package/src/tw.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ declare module 'tiddlywiki' {
|
|
|
41
41
|
flags: string[];
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export interface IStartUpOption {
|
|
45
|
+
bootPath?: string;
|
|
46
|
+
callback?: () => unknown;
|
|
47
|
+
}
|
|
48
|
+
|
|
44
49
|
export interface ITiddlyWiki {
|
|
45
50
|
Tiddler: typeof Tiddler;
|
|
46
51
|
Wiki: typeof Wiki;
|
|
@@ -51,7 +56,7 @@ declare module 'tiddlywiki' {
|
|
|
51
56
|
files: IBootFilesIndex;
|
|
52
57
|
log(logString: string): void;
|
|
53
58
|
logMessages: string[];
|
|
54
|
-
startup(options:
|
|
59
|
+
startup(options: IStartUpOption): void;
|
|
55
60
|
/** Default boot tasks */
|
|
56
61
|
tasks: {
|
|
57
62
|
readBrowserTiddlers: boolean;
|
package/src/widget.d.ts
CHANGED
|
@@ -4,8 +4,10 @@ declare module 'tiddlywiki' {
|
|
|
4
4
|
* Key is tiddler title
|
|
5
5
|
*/
|
|
6
6
|
export type IChangedTiddlers = Record<string, IChangedTiddlersMeta>;
|
|
7
|
+
/** Only one of these fields will be `true` */
|
|
7
8
|
export interface IChangedTiddlersMeta {
|
|
8
|
-
|
|
9
|
+
deleted?: boolean;
|
|
10
|
+
modified?: boolean;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
export interface IWidgetEvent {
|