From efbe12737541a566da5fd50a12685b31300f9d17 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 3 Jul 2017 14:23:26 +0200 Subject: [PATCH] Fix cyclic dependencies --- src/fillers/vscode-nls.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/fillers/vscode-nls.ts b/src/fillers/vscode-nls.ts index b9566a77..51166074 100644 --- a/src/fillers/vscode-nls.ts +++ b/src/fillers/vscode-nls.ts @@ -5,7 +5,21 @@ import {LocalizeInfo, LocalizeFunc, Options, LoadFunc} from 'vscode-nls'; -export {LocalizeInfo, LocalizeFunc, Options, LoadFunc}; +export interface Options { + locale?: string; + cacheLanguageResolution?: boolean; +} +export interface LocalizeInfo { + key: string; + comment: string[]; +} +export interface LocalizeFunc { + (info: LocalizeInfo, message: string, ...args: any[]): string; + (key: string, message: string, ...args: any[]): string; +} +export interface LoadFunc { + (file?: string): LocalizeFunc; +} function format(message: string, args: any[]): string { let result:string; @@ -26,9 +40,9 @@ function localize(key: string | LocalizeInfo, message: string, ...args: any[]): } export function loadMessageBundle(file?: string): LocalizeFunc { - return localize; + return localize; } export function config(opt?: Options | string): LoadFunc { - return loadMessageBundle; + return loadMessageBundle; } \ No newline at end of file