export interface IFileServeService {
UploadFileStatus(hash: string, totalChunks: number): Promise<IExistFileExistResponse>;
upload(data: IUploadForm): Promise<{code: number, item: IFileStruct|null, success: boolean}>;
convertModelBySelf(fileId: string,modelGroupId: string): Promise<{success: boolean, data: {done: boolean, found: boolean, success: boolean, percent: number}}>
}
class FakeFileServeService implements IFileServeService {
upload(data: IUploadForm): Promise<{code: number, item: IFileStruct, success: boolean}>{
return ''
}
UploadFileStatus(hash: string, totalChunck: number): Promise<IExistFileExistResponse> {
}
convertModelBySelf(): any {
}
}
我实现接口,但是我实现的方法返回值类型与接口定义的返回值类型完全不一致,居然不报错。
我如果在实现接口的地方不写返回值类型,他又要报错。
在实现接口的地方写了返回值类型,鼠标放上去显示的返回值是any
上面是 vscode,下面是 webstorm。都会报错。不知道你的是什么配置?