Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: typescript File override #1460

Closed
akz92 opened this issue May 3, 2017 · 4 comments · Fixed by #1553
Closed

bug: typescript File override #1460

akz92 opened this issue May 3, 2017 · 4 comments · Fixed by #1553
Assignees

Comments

@akz92
Copy link
Contributor

akz92 commented May 3, 2017

The File class definition makes it impossible to cast a file as a blob.

Using Typescript's File definition makes the following work:

declare const file: File;

const blob = file as Blob;

When using IonicNative's File definition it stops working.

@ejiyuan
Copy link

ejiyuan commented May 4, 2017

+1

@ihadeed ihadeed self-assigned this May 10, 2017
@ihadeed
Copy link
Collaborator

ihadeed commented May 14, 2017

@akz92 can you provide sample code demonstrating what you're trying to do?

@ihadeed
Copy link
Collaborator

ihadeed commented May 14, 2017

Nevermind, I figured out what you're looking for. I will create an interface named IFile that follows the Web API spec and extends Blob.

@airstep
Copy link

airstep commented Nov 15, 2017

So, how to use and separate File from typescript and File constructor from plugin. Bcz now code going throght File contructor from plugin but I need to go throught typescript dom type....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants