Skip to content

Commit 1fc4ef0

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

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
@@ -31,7 +31,7 @@ declare namespace Handlebars {
3131
partial?: boolean;
3232
depths?: any[];
3333
helpers?: { [name: string]: Function };
34-
partials?: { [name: string]: HandlebarsTemplateDelegate };
34+
partials?: { [name: string]: Template };
3535
decorators?: { [name: string]: Function };
3636
data?: any;
3737
blockParams?: any[];
@@ -63,7 +63,7 @@ declare namespace Handlebars {
6363
export function unregisterHelper(name: string): void;
6464

6565
export function registerPartial(name: string, fn: Template): void;
66-
export function registerPartial(spec: { [name: string]: HandlebarsTemplateDelegate }): void;
66+
export function registerPartial(spec: { [name: string]: Template }): void;
6767
export function unregisterPartial(name: string): void;
6868

6969
// TODO: replace Function with actual signature

types/test.ts

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

0 commit comments

Comments
 (0)