From bfc96c0e3414238f7d1f2d313ec7d0803a3953fc Mon Sep 17 00:00:00 2001 From: Dennis Date: Sun, 17 Apr 2016 21:13:33 +0700 Subject: [PATCH] Missing locale functions and types (#8981) * added svgRendering property to Html2CanvasOptions interface * added an empty namespace in koa-bodyparser.d.ts (#8979) Without this, there will be `Module '"koa-bodyparser"' resolves to a non-module entity and cannot be imported using this construct. (2497)` error This solution is found (here)[https://github.com/Microsoft/TypeScript/issues/5073]. koa-json's `.d.ts` file has such namespace. * Missing locale functions and types --- knockout.validation/knockout.validation.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/knockout.validation/knockout.validation.d.ts b/knockout.validation/knockout.validation.d.ts index a308a60f02..40a8a83d4f 100644 --- a/knockout.validation/knockout.validation.d.ts +++ b/knockout.validation/knockout.validation.d.ts @@ -106,6 +106,10 @@ interface KnockoutValidationGroup { isAnyMessageShown?: () => boolean; } +interface KnockoutValidationLocalizationDictionary { + [key: string]: string; +} + interface KnockoutValidationStatic { init(options?: KnockoutValidationConfiguration, force?: boolean): void; reset(): void; @@ -127,7 +131,9 @@ interface KnockoutValidationStatic { registerExtenders(): void; utils: KnockoutValidationUtils; - localize(msgTranslations: any): void; + localize(msgTranslations: KnockoutValidationLocalizationDictionary): void; + defineLocale(newLocale: string, msgTranslations: KnockoutValidationLocalizationDictionary): KnockoutValidationLocalizationDictionary; + locale(newLocale: string): string; validateObservable(observable: KnockoutObservable): boolean; }