import { ContentType } from "../ContentType"; import { ContentTypeFactory } from "../ContentType.factory"; import { IContentType } from "../ContentType.interface"; export class User extends ContentType implements IContentType { readonly userName:string readonly avatarUrl:string constructor(userJsonRaw:any) { super(userJsonRaw) this.userName = this.content['name'] || '' this.avatarUrl = this.content['avatar_url'] || '' } toHTML(): string { const classList = ['notion', 'user'] const escapeUserName = this.userName.replace(/ /g, '_') const htmlUserName = `@${escapeUserName}` return `${htmlUserName}` } }