Skip to content

Commit cde478a

Browse files
adidahiyaaciccarello
authored andcommitted
Fix reference to deprecated handlebars type (TypeStrong#1022)
1 parent 9a76bec commit cde478a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/lib/output/events.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { TemplateDelegate } from 'handlebars';
12
import * as Path from 'path';
23

34
import { Event } from '../utils/events';
@@ -110,7 +111,7 @@ export class PageEvent extends Event {
110111
/**
111112
* The template that should be used to render this page.
112113
*/
113-
template?: HandlebarsTemplateDelegate;
114+
template?: TemplateDelegate;
114115

115116
/**
116117
* The name of the template that should be used to render this page.

src/lib/output/utils/resources/templates.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import * as Handlebars from 'handlebars';
33
import { readFile } from '../../../utils/fs';
44
import { ResourceStack, Resource } from './stack';
55

6-
export class Template extends Resource {
7-
private template?: HandlebarsTemplateDelegate;
6+
export class Template<T = any> extends Resource {
7+
private template?: Handlebars.TemplateDelegate<T>;
88

9-
getTemplate(): HandlebarsTemplateDelegate {
9+
getTemplate(): Handlebars.TemplateDelegate<T> {
1010
if (!this.template) {
1111
const raw = readFile(this.fileName);
1212
this.template = Handlebars.compile(raw, {

0 commit comments

Comments
 (0)