Reputation: 2175
I want to use javascript file object but can't able to use because ionic native file object already has a same key File
Look at below example:
import { File } from '@ionic-native/file';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage{
constructor(private file: File) { }
test(buf){
let file = new File([buf],'test.txt',{type:'text/plain'})
//above javascript File Object is determined as File of @ionic-native/file
}
}
Upvotes: 0
Views: 278
Reputation: 2175
Answer to my own question:
We can import with alias in typescript look below line to get ride of this.
import { File as ionicFile } from '@ionic-native/file';
Upvotes: 1