declare global { interface String { cutEndBy: (e: string) => string; cutBy: (s: string, e: string) => string; cutByNext: (s: string, e: string) => string; clearSE: (v?: string) => string; getSuffix(str: string): string; getFileName(): string; getPxWidth(fontSize?: number, fontFamily?: string): number; toTex(imgUrl: string, onload: (dataURL: string) => void, color?: string, fontSize?: number, yb?: number, isBold?: boolean): void; /**十六进制转为RGB/rgba 数组 默认 0-1 */ hex2rgb(is255?: boolean, forceAlpha?: boolean): number[]; } } /**定义不可枚举方法 */ declare const dsf: (o: any, n: string, f: any) => void; export { dsf };