In TypeScript, What is the type of Image?

后端 未结 1 517
青春惊慌失措
青春惊慌失措 2021-01-01 08:58

I\'m declaring an interface which will contains image also. What type do i need to give to it.

export interface AdInterface {
    email: string;
    mobile:          


        
相关标签:
1条回答
  • 2021-01-01 09:09

    If your image property contains ...

    Image used as <img> element

    image?: HTMLImageElement
    

    URL to image.

    image?: String
    

    Image as file from <input> element

    image?: File
    

    0 讨论(0)
提交回复
热议问题