Skip to content

Commit eab1d14

Browse files
bvallee-theforkjaylinski
authored andcommitted
Fix type "RuntimeOptions" also accepting string partials
1 parent de4414d commit eab1d14

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare namespace Handlebars {
2525
partial?: boolean;
2626
depths?: any[];
2727
helpers?: { [name: string]: Function };
28-
partials?: { [name: string]: HandlebarsTemplateDelegate };
28+
partials?: { [name: string]: Template };
2929
decorators?: { [name: string]: Function };
3030
data?: any;
3131
blockParams?: any[];
@@ -60,7 +60,7 @@ declare namespace Handlebars {
6060
export function unregisterHelper(name: string): void;
6161

6262
export function registerPartial(name: string, fn: Template): void;
63-
export function registerPartial(spec: { [name: string]: HandlebarsTemplateDelegate }): void;
63+
export function registerPartial(spec: { [name: string]: Template }): void;
6464
export function unregisterPartial(name: string): void;
6565

6666
// TODO: replace Function with actual signature

types/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ function testProtoAccessControlControlOptions() {
249249
allowedProtoProperties: { allowedProperty: true, forbiddenProperty: false },
250250
allowProtoMethodsByDefault: true,
251251
allowProtoPropertiesByDefault: false,
252+
partials: {
253+
link: '<a href="/people/{{id}}">{{name}}</a>'
254+
}
252255
}
253256
);
254257
}

0 commit comments

Comments
 (0)