Skip to content

Commit

Permalink
Fix type "RuntimeOptions" also accepting string partials
Browse files Browse the repository at this point in the history
  • Loading branch information
bvallee-thefork authored and jaylinski committed Sep 21, 2023
1 parent ce1f2ab commit 1fc4ef0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.d.ts
Expand Up @@ -31,7 +31,7 @@ declare namespace Handlebars {
partial?: boolean;
depths?: any[];
helpers?: { [name: string]: Function };
partials?: { [name: string]: HandlebarsTemplateDelegate };
partials?: { [name: string]: Template };
decorators?: { [name: string]: Function };
data?: any;
blockParams?: any[];
Expand Down Expand Up @@ -63,7 +63,7 @@ declare namespace Handlebars {
export function unregisterHelper(name: string): void;

export function registerPartial(name: string, fn: Template): void;
export function registerPartial(spec: { [name: string]: HandlebarsTemplateDelegate }): void;
export function registerPartial(spec: { [name: string]: Template }): void;
export function unregisterPartial(name: string): void;

// TODO: replace Function with actual signature
Expand Down
3 changes: 3 additions & 0 deletions types/test.ts
Expand Up @@ -250,6 +250,9 @@ function testProtoAccessControlControlOptions() {
allowedProtoProperties: { allowedProperty: true, forbiddenProperty: false },
allowProtoMethodsByDefault: true,
allowProtoPropertiesByDefault: false,
partials: {
link: '<a href="/people/{{id}}">{{name}}</a>'
}
}
);
}
Expand Down

0 comments on commit 1fc4ef0

Please sign in to comment.