diff --git a/linq4js/index.d.ts b/linq4js/index.d.ts index e6b9084ea3..e7a77f2eaa 100644 --- a/linq4js/index.d.ts +++ b/linq4js/index.d.ts @@ -9,16 +9,37 @@ declare namespace Linq4JS { Id: number; } } +declare namespace Linq4JS { + class EvaluateCommand { + Command: string; + SplitRegex: RegExp[]; + Finder: RegExp[]; + constructor(command: string, ...identifier: string[]); + } + class EvaluateCommandResult { + Command: string; + DynamicFunction: string; + constructor(cmd: string, fn: string); + } +} declare namespace Linq4JS { class Helper { - private static ConvertStringFunction(functionString); - static ConvertFunction(testFunction: string | T): T; + private static ConvertStringFunction(functionString, noAutoReturn?, noBracketReplace?); + static ConvertFunction(testFunction: string | T, noAutoReturn?: boolean, noBracketReplace?: boolean): T; static OrderCompareFunction(valueSelector: (item: T) => any, a: T, b: T, invert: boolean): number; + static SplitCommand(command: string): string[]; + static MatchCommand(cmd: string): EvaluateCommandResult; + static Commands: EvaluateCommand[]; } } interface Array { Order: Linq4JS.OrderEntry[]; GroupValue: any; + /** + * Executes actions defined in the command-string + * @param command The command-string for execution + */ + Evaluate(command: string): any; /** * Creates a copy of the array */ @@ -281,3 +302,10 @@ declare namespace Linq4JS { Descending = 1, } } +declare namespace Linq4JS { + class SelectEntry { + property: string; + name: string; + constructor(n: string, p: string); + } +} \ No newline at end of file