@nxtedition/lib 23.3.30 → 23.3.31
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/logger.d.ts +2 -2
- package/package.json +1 -1
- package/util/template/index.d.ts +43 -0
package/logger.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { FirstValueFromConfig } from 'rxjs/internal/firstValueFrom'
|
|
2
|
+
import type * as rx from 'rxjs'
|
|
3
|
+
|
|
4
|
+
export function makeTemplateCompiler(params: MakeTemplateCompilerParams): TemplateCompiler
|
|
5
|
+
|
|
6
|
+
export interface TemplateCompiler {
|
|
7
|
+
current: null
|
|
8
|
+
|
|
9
|
+
resolveTemplate<ReturnValue, Context>(
|
|
10
|
+
template: Nxtpression<ReturnValue, Context> | string,
|
|
11
|
+
args$?: Context | rx.Observable<Context>,
|
|
12
|
+
options?: FirstValueFromConfig,
|
|
13
|
+
): Promise<ReturnValue>
|
|
14
|
+
|
|
15
|
+
onResolveTemplate<ReturnValue, Context>(
|
|
16
|
+
template: Nxtpression<ReturnValue, Context> | string,
|
|
17
|
+
args$?: Context | rx.Observable<Context>,
|
|
18
|
+
): rx.Observable<ReturnValue>
|
|
19
|
+
|
|
20
|
+
compileTemplate<ReturnValue, Context>(
|
|
21
|
+
template: Nxtpression<ReturnValue, Context> | string,
|
|
22
|
+
): null | ((args$?: Context | rx.Observable<Context>) => rx.Observable<ReturnValue>)
|
|
23
|
+
|
|
24
|
+
isTemplate(value: unknown): value is Nxtpression
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type Nxtpression<ReturnValue = string, Context extends object = object> =
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
29
|
+
| (String & {
|
|
30
|
+
/**
|
|
31
|
+
* TS-HACK: this property doesn't really exist on the nxtpression string,
|
|
32
|
+
* it is only here to make sure the generic Context won't get stripped.
|
|
33
|
+
*/
|
|
34
|
+
__context: Context
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* TS-HACK: this property doesn't really exist on the nxtpression string,
|
|
38
|
+
* it is only here to make sure the generic Context won't get stripped.
|
|
39
|
+
*/
|
|
40
|
+
__returnValue: ReturnValue
|
|
41
|
+
})
|
|
42
|
+
| string
|
|
43
|
+
| ReturnValue
|