ProtoTools/typings/browser.d.ts
2020-10-22 15:52:53 +08:00

43 lines
876 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// <reference path="browser/ambient/node/index.d.ts" />
/// <reference path="browser/ambient/protobufjs/index.d.ts" />
interface String {
/**
* 替换字符串中{0}{1}{2}{a} {b}这样的数据用obj对应key替换或者是数组中对应key的数据替换
*/
substitute(...args): string;
}
interface Date {
/**
* 格式化日期
*/
format(mask: string): string;
}
// declare function ready(hander: () => void): void;
declare var nodeRequire: any;
interface cookiesUtils {
/**
* 设置cookie
*
* @param name
* @param value
*/
setCookie(name: string, value: string);
/**
* 获取cookie
*
* @param name
* @returns
*/
getCookie(name: string);
/**
* 删除cookie
*
* @param name
*/
delCookie(name: string);
}
declare var cookie: cookiesUtils;