1 Star 0 Fork 0

刘依科/ts-mail

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Message.ts 778 Bytes
一键复制 编辑 原始数据 按行查看 历史
import { Folder } from './Folder';
export interface MessageHeaders {
uid: string;
size?: number;
date?: number;
from?: string;
to?: string;
cc?: string;
bcc?: string;
subject?: string;
contentType?: string;
}
export class Message {
private folder: Folder;
private headers: MessageHeaders;
constructor(folder: Folder, uid: string) {
this.folder = folder;
this.headers = { uid };
}
private getClient() {
return this.folder['store']['client'];
}
// 获取邮件结构
public async getHeaders() {
if (!this.headers) {
await this.folder.updateHeaders([this]);
}
return this.headers;
}
public get uid() {
return this.headers.uid;
}
public get contentType() {
return this.headers.contentType;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/liuyike233/ts-mail.git
git@gitee.com:liuyike233/ts-mail.git
liuyike233
ts-mail
ts-mail
master

搜索帮助