import { Block } from '../Block' type FileContentType = { caption: any[], type: string, external: { url: string } } export class File extends Block { static tagName:string = 'a' toHTML(): string { const fileContent:FileContentType = this.content as FileContentType const attachmentUrl = fileContent.external?.url || '#' const classTag = ['notion', 'file'] return `<${File.tagName} class="${classTag.join(' ')}" src="${attachmentUrl}" target="_blank">` } }