tw5-typed 0.4.8 → 0.4.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
|
@@ -114,7 +114,7 @@ As with [JavaScript Macros](#JavaScript%20Macros), filter operators should not m
|
|
|
114
114
|
|
|
115
115
|
Construct the iterator using $tw.wiki.makeTiddlerIterator
|
|
116
116
|
*/
|
|
117
|
-
export type SourceIterator = (tiddler: Tiddler, title: string) => void;
|
|
117
|
+
export type SourceIterator = (tiddler: Tiddler | undefined, title: string) => void;
|
|
118
118
|
export interface ISearchOptions {
|
|
119
119
|
/** If true, forces all but regexp searches to be anchored to the start of text */
|
|
120
120
|
anchored?: boolean;
|
|
@@ -141,6 +141,8 @@ As with [JavaScript Macros](#JavaScript%20Macros), filter operators should not m
|
|
|
141
141
|
export interface IFilterOperatorParameterOperator {
|
|
142
142
|
/** the operand for the filter step (as a string; if the filter specified it in angle brackets or braces, the text reference or letiable name will have already been resolved); */
|
|
143
143
|
operand: string;
|
|
144
|
+
/** Filter can have one or more operands, like `charcode[13],[10]`. */
|
|
145
|
+
operands: string[];
|
|
144
146
|
/** the name of the filter operator specified in the WikiText; */
|
|
145
147
|
operator: string;
|
|
146
148
|
/** (optional) a string containing a single exclamation mark if the filter operator is to be negated; */
|
|
@@ -379,10 +379,11 @@ declare module 'tiddlywiki' {
|
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
381
|
* Add a list of event listeners from an array [{type:,handler:},...]
|
|
382
|
+
* See also `addEventListener`.
|
|
382
383
|
*/
|
|
383
384
|
addEventListeners(
|
|
384
385
|
listeners: {
|
|
385
|
-
handler: (event: IWidgetEvent) => void | Promise<void
|
|
386
|
+
handler: (event: IWidgetEvent) => void | Promise<void> | boolean;
|
|
386
387
|
type: string;
|
|
387
388
|
}[],
|
|
388
389
|
): void;
|
|
@@ -395,7 +396,7 @@ declare module 'tiddlywiki' {
|
|
|
395
396
|
*/
|
|
396
397
|
addEventListener(
|
|
397
398
|
type: string,
|
|
398
|
-
handler: (event: IWidgetEvent) => void | Promise<void
|
|
399
|
+
handler: (event: IWidgetEvent) => void | Promise<void> | boolean,
|
|
399
400
|
): void;
|
|
400
401
|
|
|
401
402
|
/**
|
package/src/wiki/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ declare module 'tiddlywiki' {
|
|
|
85
85
|
compileFilter(
|
|
86
86
|
filterString: string,
|
|
87
87
|
): (
|
|
88
|
-
source?: SourceIterator | string[] | Record<string, unknown>,
|
|
88
|
+
source?: (iterator: SourceIterator) => void | string[] | Record<string, unknown>,
|
|
89
89
|
widget?: Widget,
|
|
90
90
|
) => string[];
|
|
91
91
|
/**
|