我正在思考一个简单的问题,是否可以在接口中包含方法或函数,如下所示:
等待您对此可能性或问题的意见和想法:
export interface INewsletter {
id: number;
title: string;
release_date: any;
filename: string;
original_filename: string;
notification: boolean;
file: File;
newsletterTranslations: any;
translations: any;
newsletterFiles: any;
newsletter_files: any;
myMethod() { something to do } // My method here
}