UNPKG

vk-io

Version:

Modern VK API SDK for Node.js

36 lines (35 loc) 1.08 kB
import { API } from '../../api'; import { IAttachmentOptions, AttachmentFactoryOptions } from './attachment'; import { kSerializeData, AttachmentType } from '../../utils/constants'; export type IExternalAttachmentOptions<P, Type extends string = string> = IAttachmentOptions<P, Type>; export type ExternalAttachmentFactoryOptions<P> = AttachmentFactoryOptions<P>; export declare class ExternalAttachment<P = object, Type extends string | AttachmentType = string> { type: Type; protected $filled: boolean; protected api: API; protected payload: P; /** * Constructor */ constructor(options: IExternalAttachmentOptions<P, Type>); /** * Returns custom tag */ get [Symbol.toStringTag](): string; /** * Returns whether the attachment is filled */ get isFilled(): boolean; /** * Can be attached via string representation */ get canBeAttached(): boolean; /** * Returns data for JSON */ toJSON(): object; /** * Returns the custom data */ [kSerializeData](): object; }