interface myService { getIndexInfo(obj: { name: string, id: string }) : Promise < any > } class IndexService implements myService { async getIndexInfo(obj: { name: string, id: string }) : Promise < any > { return new Promise((resolve, reject) => { resolve(obj); }); } } let service = new IndexService(); async function getResult() { let result = await service.getIndexInfo({ name: 'xiaoming', id: 'ssss' }); console.log(result); }