文件堆栈错误文件在角度 8 中找不到名称"文件堆栈转换".ts(2304)



请参阅此图像1image 2无法创建我的angular 8项目的内部版本抛出找不到名称FilestackTransform

onUploadSuccess(res: object) {
console.log('###uploadSuccess', res);
this.tempData = res;
this.tempUrl = this.tempData.filesUploaded[0].url;
const client = filestack.init(this.apikey); // initialize Filestack Client with your API key
const tr = new FilestackTransform(); // initialize Transformations UI
tr.setConfigKey('output.blob', true); // set Transformations UI to return blob
tr.open(this.tempUrl).then(res => {
client.upload(res).then((uploadRes) => { // upload result of the transformation
this.tempTranssformUrl = JSON.stringify(uploadRes.url, null, 2).split('"');
(<HTMLImageElement>document.querySelector("#result")).src = this.tempTranssformUrl[1];
this.isPicker = false;
})
});

}

在类内部,TypeScript不允许用var允许const

声明FilestackTransform:any;const tr=这个。FilestackTransform((;

最新更新