In this code snippet there is an error: Argument of type '(fileInfo: TemplateFileInfo)…
- User
In this code snippet there is an error: Argument of type '(fileInfo: TemplateFileInfo) => Observable | undefined' is not assignable to parameter of type '(value: TemplateFileInfo, index: number) => ObservableInput'. Type 'Observable | undefined' is not assignable to type 'ObservableInput'. Type 'undefined' is not assignable to type 'ObservableInput'.ts(2345)
this.fileStorageHttpService .uploadFile(this.templateFileStore.templateFile.data) .pipe( takeUntil(this.destroy$), switchMap(fileInfo => { this.spinnerService.remove(spinner.id); if (!fileInfo) { this.showMessageProcessingService .handle("Загрузка файла не удалась"); return; }
return this.checkMissingMacros(fileInfo.fileContetInfo.macrosNames) .pipe( switchMap(result => { if (result === DialogResultType.Cancel) { this.onTemplateFileRestore(); return; } return of(fileInfo); }) ); }) )
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.