我有以下接口:
export interface ITransaction {
id: number;
description: string;
category: string;
tags: array;
date: string;
amount: number;
}
显然,我在编辑器中看到了错误,所以我的声明是错误的。正如你所见,tags应该是一个数组。这是JSON格式的数据:
{
"id": 1,
"description": "Sandwich",
"date": "2017-09-01",
"category": "Take away",
"tags": ["Holidays"],
"amount": -2
}
我在文档中找不到这个内容。如何将此属性正确地放入接口中?