Fix type "RuntimeOptions" also accepting string partials

This commit is contained in:
Benoit Vallée
2020-10-08 19:19:54 +02:00
committed by Jay Linski
parent de4414d7fc
commit eab1d141cb
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ declare namespace Handlebars {
partial?: boolean; partial?: boolean;
depths?: any[]; depths?: any[];
helpers?: { [name: string]: Function }; helpers?: { [name: string]: Function };
partials?: { [name: string]: HandlebarsTemplateDelegate }; partials?: { [name: string]: Template };
decorators?: { [name: string]: Function }; decorators?: { [name: string]: Function };
data?: any; data?: any;
blockParams?: any[]; blockParams?: any[];
@@ -60,7 +60,7 @@ declare namespace Handlebars {
export function unregisterHelper(name: string): void; export function unregisterHelper(name: string): void;
export function registerPartial(name: string, fn: Template): 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; export function unregisterPartial(name: string): void;
// TODO: replace Function with actual signature // TODO: replace Function with actual signature
+3
View File
@@ -249,6 +249,9 @@ function testProtoAccessControlControlOptions() {
allowedProtoProperties: { allowedProperty: true, forbiddenProperty: false }, allowedProtoProperties: { allowedProperty: true, forbiddenProperty: false },
allowProtoMethodsByDefault: true, allowProtoMethodsByDefault: true,
allowProtoPropertiesByDefault: false, allowProtoPropertiesByDefault: false,
partials: {
link: '<a href="/people/{{id}}">{{name}}</a>'
}
} }
); );
} }