@joist/ssr 4.0.0-next.32 → 4.0.0-next.34
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
package/src/lib/applicator.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class Applicator {
|
|
|
17
17
|
this.#templateLoader = templateLoader;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async apply(document: string, elements: string[]) {
|
|
20
|
+
async apply(document: string, elements: string[]): Promise<string> {
|
|
21
21
|
const $ = load(document);
|
|
22
22
|
|
|
23
23
|
return this.build($, elements);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export class TemplateCache {
|
|
2
2
|
#cache = new Map<string, string>();
|
|
3
3
|
|
|
4
|
-
async get(key: string) {
|
|
4
|
+
async get(key: string): Promise<string | undefined> {
|
|
5
5
|
return this.#cache.get(key);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
async set(key: string, val: string) {
|
|
8
|
+
async set(key: string, val: string): Promise<this> {
|
|
9
9
|
this.#cache.set(key, val);
|
|
10
10
|
|
|
11
11
|
return this;
|
|
@@ -13,11 +13,11 @@ export class TemplateCache {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export class NoopTemplateCache extends TemplateCache {
|
|
16
|
-
async get(_: string) {
|
|
16
|
+
async get(_: string): Promise<undefined> {
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async set(_key: string, _val: string) {
|
|
20
|
+
async set(_key: string, _val: string): Promise<this> {
|
|
21
21
|
return this;
|
|
22
22
|
}
|
|
23
23
|
}
|