declare module Activator { /** * @param properties 如果这个属性定义集合是一个object,则应该是一个IProperty接口的字典对象 */ function CreateInstance(properties: object | NamedValue[]): any; /** * 利用一个名称字符串集合创建一个js对象 * * @param names object的属性名称列表 * @param init 使用这个函数为该属性指定一个初始值 */ function EmptyObject(names: string[] | IEnumerator, init: (() => V) | V): object; /** * 从键值对集合创建object对象,键名或者名称属性会作为object对象的属性名称 */ function CreateObject(nameValues: NamedValue[] | IEnumerator> | MapTuple[] | IEnumerator>): object; } declare namespace data.sprintf { /** * 对占位符的匹配结果 */ class match { match: string; left: boolean; sign: string; pad: string; min: string; precision: string; code: string; negative: boolean; argument: string; toString(): string; } /** * 格式化占位符 * * Possible format values: * * + ``%%`` – Returns a percent sign * + ``%b`` – Binary number * + ``%c`` – The character according to the ASCII value * + ``%d`` – Signed decimal number * + ``%f`` – Floating-point number * + ``%o`` – Octal number * + ``%s`` – String * + ``%x`` – Hexadecimal number (lowercase letters) * + ``%X`` – Hexadecimal number (uppercase letters) * * Additional format values. These are placed between the % and the letter (example %.2f): * * + ``+`` (Forces both + and – in front of numbers. By default, only negative numbers are marked) * + ``–`` (Left-justifies the variable value) * + ``0`` zero will be used for padding the results to the right string size * + ``[0-9]`` (Specifies the minimum width held of to the variable value) * + ``.[0-9]`` (Specifies the number of decimal digits or maximum string length) * */ const placeholder: RegExp; /** * @param argumentList ERROR - "arguments" cannot be redeclared in strict mode */ function parseFormat(string: string, argumentList: any[]): { matches: match[]; convCount: number; strings: string[]; }; /** * ### Javascript sprintf * * > http://www.webtoolkit.info/javascript-sprintf.html#.W5sf9FozaM8 * * Several programming languages implement a sprintf function, to output a * formatted string. It originated from the C programming language, printf * function. Its a string manipulation function. * * This is limited sprintf Javascript implementation. Function returns a * string formatted by the usual printf conventions. See below for more details. * You must specify the string and how to format the variables in it. */ function doFormat(format: string, ...argv: any[]): string; /** * 进行格式化占位符对格式化参数的字符串替换操作 */ function doSubstitute(matches: sprintf.match[], strings: string[]): string; function convert(match: sprintf.match, nosign?: boolean): string; } /** * 可用于ES6的for循环的泛型迭代器对象,这个也是这个框架之中的所有序列模型的基础 * * ```js * var it = makeIterator(['a', 'b']); * * it.next() // { value: "a", done: false } * it.next() // { value: "b", done: false } * it.next() // { value: undefined, done: true } * * function makeIterator(array) { * var nextIndex = 0; * * return { * next: function() { * return nextIndex < array.length ? * {value: array[nextIndex++], done: false} : * {value: undefined, done: true}; * } * }; * } * ``` */ declare class LINQIterator { /** * The data sequence with specific generic type. */ protected sequence: T[]; private i; /** * 实现迭代器的关键元素之1 */ [Symbol.iterator](): this; /** * The number of elements in the data sequence. */ readonly Count: number; constructor(array: T[]); reset(): LINQIterator; /** * 实现迭代器的关键元素之2 */ next(): IPopulated; } /** * 迭代器对象所产生的一个当前的index状态值 */ interface IPopulated { value: T; done: boolean; } /** * The linq pipline implements at here. (在这个模块之中实现具体的数据序列算法) */ declare module Enumerable { function Range(from: number, to: number, steps?: number): number[]; function Min(...v: number[]): number; /** * 进行数据序列的投影操作 * */ function Select(source: T[], project: (e: T, i: number) => TOut): IEnumerator; /** * 进行数据序列的排序操作 * */ function OrderBy(source: T[], key: (e: T) => number): IEnumerator; function OrderByDescending(source: T[], key: (e: T) => number): IEnumerator; function Take(source: T[], n: number): IEnumerator; function Skip(source: T[], n: number): IEnumerator; function TakeWhile(source: T[], predicate: (e: T) => boolean): IEnumerator; function Where(source: T[], predicate: (e: T) => boolean): IEnumerator; function SkipWhile(source: T[], predicate: (e: T) => boolean): IEnumerator; function All(source: T[], predicate: (e: T) => boolean): boolean; function Any(source: T[], predicate: (e: T) => boolean): boolean; /** * Implements a ``group by`` operation by binary tree data structure. */ function GroupBy(source: T[], getKey: (e: T) => TKey, compares: (a: TKey, b: TKey) => number): IEnumerator>; function AllKeys(sequence: T[]): string[]; class JoinHelper { private xset; private yset; private keysT; private keysU; constructor(x: T[], y: U[]); JoinProject(x: T, y: U): V; Union(tKey: (x: T) => K, uKey: (x: U) => K, compare: (a: K, b: K) => number, project?: (x: T, y: U) => V): IEnumerator; private buildUtree; LeftJoin(tKey: (x: T) => K, uKey: (x: U) => K, compare: (a: K, b: K) => number, project?: (x: T, y: U) => V): IEnumerator; } } /** * Provides a set of static (Shared in Visual Basic) methods for querying * objects that implement ``System.Collections.Generic.IEnumerable``. * * (这个枚举器类型是构建出一个Linq查询表达式所必须的基础类型,这是一个静态的集合,不会发生元素的动态添加或者删除) */ declare class IEnumerator extends LINQIterator { /** * 获取序列的元素类型 */ readonly ElementType: TypeInfo; /** * Get the element value at a given index position * of this data sequence. * * @param index index value should be an integer value. */ ElementAt(index?: string | number): T; /** * 可以从一个数组或者枚举器构建出一个Linq序列 * * @param source The enumerator data source, this constructor will perform * a sequence copy action on this given data source sequence at here. */ constructor(source: T[] | IEnumerator); private static getArray; indexOf(x: T): number; /** * Get the first element in this sequence */ readonly First: T; /** * Get the last element in this sequence */ readonly Last: T; /** * If the sequence length is zero, then returns the default value. */ FirstOrDefault(Default?: T): T; /** * 两个序列求总和 */ Union(another: IEnumerator | U[], tKey: (x: T) => K, uKey: (x: U) => K, compare: (a: K, b: K) => number, project?: (x: T, y: U) => V): IEnumerator; /** * 如果在another序列之中找不到对应的对象,则当前序列会和一个空对象合并 * 如果another序列之中有多余的元素,即该元素在当前序列之中找不到的元素,会被扔弃 * * @param project 如果这个参数被忽略掉了的话,将会直接进行属性的合并 */ Join(another: IEnumerator | U[], tKey: (x: T) => K, uKey: (x: U) => K, compare: (a: K, b: K) => number, project?: (x: T, y: U) => V): IEnumerator; /** * Projects each element of a sequence into a new form. * * @typedef TOut The type of the value returned by selector. * * @param selector A transform function to apply to each element. * * @returns An ``System.Collections.Generic.IEnumerable`` * whose elements are the result of invoking the * transform function on each element of source. */ Select(selector: (o: T, i: number) => TOut): IEnumerator; /** * Groups the elements of a sequence according to a key selector function. * The keys are compared by using a comparer and each group's elements * are projected by using a specified function. * * @param compares 注意,javascript在进行中文字符串的比较的时候存在bug,如果当key的类型是字符串的时候, * 在这里需要将key转换为数值进行比较,遇到中文字符串可能会出现bug */ GroupBy(keySelector: (o: T) => TKey, compares?: (a: TKey, b: TKey) => number): IEnumerator>; /** * Filters a sequence of values based on a predicate. * * @param predicate A test condition function. * * @returns Sub sequence of the current sequence with all * element test pass by the ``predicate`` function. */ Where(predicate: (e: T) => boolean): IEnumerator; Which(predicate: (e: T) => boolean, first?: boolean): number | IEnumerator; /** * Get the min value in current sequence. * (求取这个序列集合的最小元素,使用这个函数要求序列之中的元素都必须能够被转换为数值) */ Min(project?: (e: T) => number): T; /** * Get the max value in current sequence. * (求取这个序列集合的最大元素,使用这个函数要求序列之中的元素都必须能够被转换为数值) */ Max(project?: (e: T) => number): T; /** * 求取这个序列集合的平均值,使用这个函数要求序列之中的元素都必须能够被转换为数值 */ Average(project?: (e: T) => number): number; /** * 求取这个序列集合的和,使用这个函数要求序列之中的元素都必须能够被转换为数值 */ Sum(project?: (e: T) => number): number; /** * Sorts the elements of a sequence in ascending order according to a key. * * @param key A function to extract a key from an element. * * @returns An ``System.Linq.IOrderedEnumerable`` whose elements are * sorted according to a key. */ OrderBy(key: (e: T) => number): IEnumerator; /** * Sorts the elements of a sequence in descending order according to a key. * * @param key A function to extract a key from an element. * * @returns An ``System.Linq.IOrderedEnumerable`` whose elements are * sorted in descending order according to a key. */ OrderByDescending(key: (e: T) => number): IEnumerator; /** * Split a sequence by elements count */ Split(size: number): IEnumerator; /** * 取出序列之中的前n个元素 */ Take(n: number): IEnumerator; /** * 跳过序列的前n个元素之后返回序列之中的所有剩余元素 */ Skip(n: number): IEnumerator; /** * 序列元素的位置反转 */ Reverse(): IEnumerator; /** * Returns elements from a sequence as long as a specified condition is true. * (与Where类似,只不过这个函数只要遇到第一个不符合条件的,就会立刻终止迭代) */ TakeWhile(predicate: (e: T) => boolean): IEnumerator; /** * Bypasses elements in a sequence as long as a specified condition is true * and then returns the remaining elements. */ SkipWhile(predicate: (e: T) => boolean): IEnumerator; /** * 判断这个序列之中的所有元素是否都满足特定条件 */ All(predicate: (e: T) => boolean): boolean; /** * 判断这个序列之中的任意一个元素是否满足特定的条件 */ Any(predicate?: (e: T) => boolean): boolean; /** * 对序列中的元素进行去重 */ Distinct(key?: (o: T) => string): IEnumerator; /** * 将序列按照符合条件的元素分成区块 * * @param isDelimiter 一个用于判断当前的元素是否是分割元素的函数 * @param reserve 是否保留下这个分割对象?默认不保留 */ ChunkWith(isDelimiter: (x: T) => boolean, reserve?: boolean): IEnumerator; /** * Performs the specified action for each element in an array. * * @param callbackfn A function that accepts up to three arguments. forEach * calls the callbackfn function one time for each element in the array. * */ ForEach(callbackfn: (x: T, index: number) => void): void; /** * Contract the data sequence to string * * @param deli Delimiter string that using for the string.join function * @param toString A lambda that describ how to convert the generic type object to string token * * @returns A contract string. */ JoinBy(deli: string, toString?: (x: T) => string): string; /** * 如果当前的这个数据序列之中的元素的类型是某一种元素类型的集合,或者该元素 * 可以描述为另一种类型的元素的集合,则可以通过这个函数来进行降维操作处理。 * * @param project 这个投影函数描述了如何将某一种类型的元素降维至另外一种元素类型的集合。 * 如果这个函数被忽略掉的话,会尝试强制将当前集合的元素类型转换为目标元素类型的数组集合。 */ Unlist(project?: (obj: T) => U[]): IEnumerator; /** * This function returns a clone copy of the source sequence. * * @param clone If this parameter is false, then this function will * returns the origin array sequence directly. */ ToArray(clone?: boolean): T[]; /** * 将当前的这个不可变的只读序列对象转换为可动态增添删除元素的列表对象 */ ToList(): List; /** * 将当前的这个数据序列对象转换为键值对字典对象,方便用于数据的查找操作 */ ToDictionary(keySelector: (x: T) => string, elementSelector?: (x: T) => V): Dictionary; /** * 将当前的这个数据序列转换为包含有内部位置指针数据的指针对象 */ ToPointer(): Pointer; /** * 将当前的这个序列转换为一个滑窗数据的集合 */ SlideWindows(winSize: number, step?: number): IEnumerator>; } declare class DOMEnumerator extends IEnumerator { /** * 1. IEnumerator * 2. NodeListOf * 3. HTMLCollection */ constructor(elements: T[] | IEnumerator | NodeListOf | HTMLCollection); /** * 这个函数确保所传递进来的集合总是输出一个数组,方便当前的集合对象向其基类型传递数据源 */ private static ensureElements; /** * 使用这个函数进行节点值的设置或者获取 * * 这个函数不传递任何参数则表示获取值 * * @param value 如果需要批量清除节点之中的值的话,需要传递一个空字符串,而非空值 */ val(value?: number | string | string[] | IEnumerator): IEnumerator; private static setVal; private static getVal; /** * 使用这个函数设置或者获取属性值 * * @param attrName 属性名称 * @param val + 如果为字符串值,则当前的结合之中的所有的节点的指定属性都将设置为相同的属性值 * + 如果为字符串集合或者字符串数组,则会分别设置对应的index的属性值 * + 如果是一个函数,则会设置根据该节点所生成的字符串为属性值 * * @returns 函数总是会返回所设置的或者读取得到的属性值的字符串集合 */ attr(attrName: string, val?: string | IEnumerator | string[] | ((x: T) => string)): IEnumerator; addClass(className: string): DOMEnumerator; addEvent(eventName: string, handler: (sender: T, event: Event) => void): void; onChange(handler: (sender: T, event: Event) => void): void; /** * 为当前的html节点集合添加鼠标点击事件处理函数 */ onClick(handler: (sender: T, event: MouseEvent) => void): void; removeClass(className: string): DOMEnumerator; /** * 通过设置css之中的display值来将集合之中的所有的节点元素都隐藏掉 */ hide(): DOMEnumerator; /** * 通过设置css之中的display值来将集合之中的所有的节点元素都显示出来 */ show(): DOMEnumerator; /** * 将所选定的节点批量删除 */ delete(): void; } declare namespace Internal.Handlers { function hasKey(object: object, key: string): boolean; /** * 这个函数确保给定的id字符串总是以符号``#``开始的 */ function EnsureNodeId(str: string): string; /** * 字符串格式的值意味着对html文档节点的查询 */ class stringEval implements IEval { private static ensureArguments; /** * @param query 函数会在这里自动的处理转义问题 * @param context 默认为当前的窗口文档 */ static select(query: string, context?: Window | HTMLElement): DOMEnumerator; doEval(expr: string, type: TypeInfo, args: object): any; /** * 创建新的HTML节点元素 */ static createNew(expr: string, args: Arguments, context?: Window): HTMLElement | HTMLTsElement; static setAttributes(node: HTMLElement, attrs: object): void; } } declare namespace Internal.Handlers { /** * 在这个字典之中的键名称主要有两大类型: * * + typeof 类型判断结果 * + TypeInfo.class 类型名称 */ const Shared: { /** * HTML document query handler */ string: () => stringEval; /** * Create a linq object */ array: () => arrayEval<{}>; NodeListOf: () => DOMCollection; HTMLCollection: () => DOMCollection; }; interface IEval { doEval(expr: T, type: TypeInfo, args: object): any; } /** * Create a Linq Enumerator */ class arrayEval implements IEval { doEval(expr: V[], type: TypeInfo, args: object): any; } class DOMCollection implements IEval { doEval(expr: V[], type: TypeInfo, args: object): DOMEnumerator; } } /** * 通用数据拓展函数集合 */ declare module DataExtensions { function arrayBufferToBase64(buffer: Array): string; /** * 将uri之中的base64字符串数据转换为一个byte数据流 */ function uriToBlob(uri: string): Blob; /** * 将URL查询字符串解析为字典对象,所传递的查询字符串应该是查询参数部分,即问号之后的部分,而非完整的url * * @param queryString URL查询参数 * @param lowerName 是否将所有的参数名称转换为小写形式? * * @returns 键值对形式的字典对象 */ function parseQueryString(queryString: string, lowerName?: boolean): object; /** * 尝试将任意类型的目标对象转换为数值类型 * * @returns 一个数值 */ function as_numeric(obj: any): number; /** * 因为在js之中没有类型信息,所以如果要取得类型信息必须要有一个目标对象实例 * 所以在这里,函数会需要一个实例对象来取得类型值 */ function AsNumeric(obj: T): (x: T) => number; /** * @param fill 进行向量填充的初始值,可能不适用于引用类型,推荐应用于初始的基元类型 */ function Dim(len: number, fill?: T): T[]; } /** * 描述了一个键值对集合 */ declare class MapTuple { /** * 键名称,一般是字符串 */ key: K; /** * 目标键名所映射的值 */ value: V; /** * 创建一个新的键值对集合 * */ constructor(key?: K, value?: V); valueOf(): V; ToArray(): any[]; toString(): string; } /** * 描述了一个带有名字属性的变量值 */ declare class NamedValue { /** * 变量值的名字属性 */ name: string; /** * 这个变量值 */ value: T; constructor(name?: string, val?: T); /** * 获取得到变量值的类型定义信息 */ readonly TypeOfValue: TypeInfo; /** * 这个之对象是否是空的? */ readonly IsEmpty: boolean; valueOf(): T; ToArray(): any[]; toString(): string; } /** * TypeScript string helpers. * (这个模块之中的大部分的字符串处理函数的行为是和VisualBasic之中的字符串函数的行为是相似的) */ declare module Strings { const x0: number; const x9: number; const asterisk: number; const cr: number; const lf: number; const a: number; const z: number; const A: number; const Z: number; const numericPattern: RegExp; /** * 判断所给定的字符串文本是否是任意实数的正则表达式模式 */ function isNumericPattern(text: string): boolean; /** * 对bytes数值进行格式自动优化显示 * * @param bytes * * @return 经过自动格式优化过后的大小显示字符串 */ function Lanudry(bytes: number): string; /** * how to escape xml entities in javascript? * * > https://stackoverflow.com/questions/7918868/how-to-escape-xml-entities-in-javascript */ function escapeXml(unsafe: string): string; /** * 这个函数会将字符串起始的数字给匹配出来 * 如果匹配失败会返回零 * * 与VB之中的val函数的行为相似,但是这个函数返回整形数 * * @param text 这个函数并没有执行trim操作,所以如果字符串的起始为空白符的话 * 会导致解析结果为零 */ function parseInt(text: string): number; /** * Create new string value by repeats a given char n times. * * @param c A single char * @param n n chars */ function New(c: string, n: number): string; /** * Round the number value or number text in given decimals. * * @param decimals 默认是保留3位有效数字的 */ function round(x: number | string, decimals?: number): number | false; /** * 判断当前的这个字符是否是一个数字? * * @param c A single character, length = 1 */ function isNumber(c: string): boolean; /** * 判断当前的这个字符是否是一个字母? * * @param c A single character, length = 1 */ function isAlphabet(c: string): boolean; /** * 将字符串转换为一个实数 * 这个函数是直接使用parseFloat函数来工作的,如果不是符合格式的字符串,则可能会返回NaN */ function Val(str: string): number; /** * 将文本字符串按照newline进行分割 */ function lineTokens(text: string): string[]; /** * 如果不存在``tag``分隔符,则返回来的``tuple``里面,``name``是输入的字符串,``value``则是空字符串 * * @param tag 分割name和value的分隔符,默认是一个空白符号 */ function GetTagValue(str: string, tag?: string): NamedValue; /** * 取出大文本之中指定的前n行文本 */ function PeekLines(text: string, n: number): string[]; /** * Get all regex pattern matches in target text value. */ function getAllMatches(text: string, pattern: string | RegExp): RegExpExecArray[]; /** * Removes the given chars from the begining of the given * string and the end of the given string. * * @param chars A collection of characters that will be trimmed. * (如果这个参数为空值,则会直接使用字符串对象自带的trim函数来完成工作) * * @returns 这个函数总是会确保返回来的值不是空值,如果输入的字符串参数为空值,则会直接返回零长度的空字符串 */ function Trim(str: string, chars?: string | number[]): string; function LTrim(str: string, chars?: string | number[]): string; function RTrim(str: string, chars?: string | number[]): string; /** * Determine that the given string is empty string or not? * (判断给定的字符串是否是空值?) * * @param stringAsFactor 假若这个参数为真的话,那么字符串``undefined``或者``NULL``以及``null``也将会被当作为空值处理 */ function Empty(str: string, stringAsFactor?: boolean): boolean; /** * 测试字符串是否是空白集合 * * @param stringAsFactor 如果这个参数为真,则``\t``和``\s``等也会被当作为空白 */ function Blank(str: string, stringAsFactor?: boolean): boolean; /** * Determine that the whole given string is match a given regex pattern. */ function IsPattern(str: string, pattern: RegExp | string): boolean; /** * Remove duplicate string values from JS array * * https://stackoverflow.com/questions/9229645/remove-duplicate-values-from-js-array */ function Unique(a: string[]): string[]; /** * 将字符串转换为字符数组 * * @description > https://jsperf.com/convert-string-to-char-code-array/9 * 经过测试,使用数组push的效率最高 * * @param charCode 返回来的数组是否应该是一组字符的ASCII值而非字符本身?默认是返回字符数组的。 * * @returns A character array, all of the string element in the array * is one character length. */ function ToCharArray(str: string, charCode?: boolean): string[] | number[]; /** * Measure the string length, a null string value or ``undefined`` * variable will be measured as ZERO length. */ function Len(s: string): number; /** * 比较两个字符串的大小,可以同于字符串的分组操作 */ function CompareTo(s1: string, s2: string): number; const sprintf: typeof data.sprintf.doFormat; /** * @param charsPerLine 每一行文本之中的字符数量的最大值 */ function WrappingLines(text: string, charsPerLine?: number, lineTrim?: boolean): string; } /** * 类似于反射类型 */ declare class TypeInfo { /** * 直接使用系统内置的``typeof``运算符得到的结果 * * This property have one of the values in these strings: * ``string object|string|number|boolean|symbol|undefined|function|array`` */ typeOf: string; /** * 类型class的名称,例如TypeInfo, IEnumerator等。 * 如果这个属性是空的,则说明是js之中的基础类型 */ class: string; namespace: string; /** * class之中的字段域列表 */ property: string[]; /** * 函数方法名称列表 */ methods: string[]; /** * 是否是js之中的基础类型? */ readonly IsPrimitive: boolean; /** * 是否是一个数组集合对象? */ readonly IsArray: boolean; /** * 是否是一个枚举器集合对象? */ readonly IsEnumerator: boolean; /** * 当前的对象是某种类型的数组集合对象 */ IsArrayOf(genericType: string): boolean; /** * 获取得到类型名称 */ static getClass(obj: any): string; private static getClassInternal; /** * 获取某一个对象的类型信息 */ static typeof(obj: T): TypeInfo; /** * 获取object对象上所定义的所有的函数 */ static GetObjectMethods(obj: T): string[]; toString(): string; /** * MetaReader对象和字典相似,只不过是没有类型约束,并且为只读集合 */ static CreateMetaReader(nameValues: NamedValue[] | IEnumerator>): TypeScript.Data.MetaReader; } /** * JavaScript MD5 1.0.1 * https://github.com/blueimp/JavaScript-MD5 * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT * * Based on * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ declare module MD5 { /** * Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ function safe_add(x: number, y: number): number; /** * Bitwise rotate a 32-bit number to the left. */ function bit_rol(num: number, cnt: number): number; function md5_cmn(q: number, a: number, b: number, x: number, s: number, t: number): number; function md5_ff(a: number, b: number, c: number, d: number, x: number, s: number, t: number): number; function md5_gg(a: number, b: number, c: number, d: number, x: number, s: number, t: number): number; function md5_hh(a: number, b: number, c: number, d: number, x: number, s: number, t: number): number; function md5_ii(a: number, b: number, c: number, d: number, x: number, s: number, t: number): number; /** * Calculate the MD5 of an array of little-endian words, and a bit length. */ function binl_md5(x: number[], len: number): number[]; /** * Convert an array of little-endian words to a string */ function binl2rstr(input: number[]): string; /** * Convert a raw string to an array of little-endian words * Characters >255 have their high-byte silently ignored. */ function rstr2binl(input: string): number[]; /** * Calculate the MD5 of a raw string */ function rstr_md5(s: string): string; /** * Calculate the HMAC-MD5, of a key and some data (raw strings) */ function rstr_hmac_md5(key: string, data: string): string; /** * Convert a raw string to a hex string */ function rstr2hex(input: string): string; /** * Encode a string as utf-8 */ function str2rstr_utf8(input: string): string; /** * Take string arguments and return either raw or hex encoded strings */ function raw_md5(s: string): string; function hex_md5(s: string): string; function raw_hmac_md5(k: string, d: string): string; function hex_hmac_md5(k: string, d: string): string; /** * 利用这个函数来进行字符串的MD5值的计算操作 */ function calculate(string: string, key?: string, raw?: string): string; } declare namespace Internal { /** * The internal typescript symbol */ interface TypeScript { /** * 这个属性控制着这个框架的调试器的输出行为 * * + 如果这个参数为``debug``,则会在浏览器的console上面输出各种和调试相关的信息 * + 如果这个参数为``production``,则不会在浏览器的console上面输出调试相关的信息,你会得到一个比较干净的console输出窗口 */ mode: Modes; (nodes: NodeListOf): DOMEnumerator; (nodes: NodeListOf): DOMEnumerator; /** * Create a new node or query a node by its id. * (创建或者查询节点) * * @param query + ``#xxxx`` query a node element by id * + ```` create a new node element by a given tag name * + ```` create a svg node. */ (query: string, args?: TypeScriptArgument): IHTMLElement; /** * Query by class name or tag name * * @param query A selector expression */ select: IquerySelector; /** * @param div 应该是带有``#``的id查询表达式 */ appendTable(rows: T[] | IEnumerator, div: string, headers?: string[] | IEnumerator | IEnumerator> | MapTuple[], attrs?: Internal.TypeScriptArgument): void; /** * 将目标序列转换为一个HTML节点元素 */ evalHTML: HtmlDocumentDeserializer; (array: T[]): IEnumerator; /** * query meta tag by name attribute value for its content. * * @param meta The meta tag name, it should be start with a ``@`` symbol. */ (meta: string): string; /** * Handles event on document load ready. * * @param ready The handler of the target event. */ (ready: () => void): void; /** * 动态的导入脚本 * * @param jsURL 需要进行动态导入的脚本的文件链接路径 * @param onErrorResumeNext 当加载出错的时候,是否继续执行下一个脚本?如果为false,则出错之后会抛出错误停止执行 */ imports(jsURL: string | string[], callback?: () => void, onErrorResumeNext?: boolean, echo?: boolean): void; /** * 将函数注入给定id编号的iframe之中 * * @param iframe ``#xxx``编号查询表达式 * @param fun 目标函数,请注意,这个函数应该是尽量不引用依赖其他对象的 */ inject(iframe: string, fun: (Delegate.Func | string)[] | string | Delegate.Func): void; /** * 动态加载脚本 * * @param script 脚本的文本内容 * @param lzw_decompress 目标脚本内容是否是lzw压缩过后的内容,如果是的话,则这个函数会进行lzw解压缩 */ eval(script: string, lzw_decompress?: boolean, callback?: () => void): void; /** * 从当前的html页面之中选择一个指定的节点,然后将节点内的文本以json格式进行解析 * * @param id HTML元素的id,可以同时兼容编号和带``#``的编号 */ loadJSON(id: string): any; /** * @param id HTML元素的id,可以同时兼容编号和带``#``的编号 * @param htmlText 主要是针对``
``标签之中的VB.NET代码
        */
        text(id: string, htmlText?: boolean): string;
        /**
         * 这个函数主要是应用于````, ``