mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
fix(core): improve strong type src of Image (#10265)
This commit is contained in:

committed by
GitHub

parent
2b64e179a5
commit
f54966707d
@ -1,5 +1,6 @@
|
||||
import { ImageBase, stretchProperty, imageSourceProperty, tintColorProperty, srcProperty } from './image-common';
|
||||
import { ImageSource } from '../../image-source';
|
||||
import { ImageAsset } from '../../image-asset';
|
||||
import { Color } from '../../color';
|
||||
import { Trace } from '../../trace';
|
||||
import { layout, queueGC } from '../../utils';
|
||||
@ -190,7 +191,7 @@ export class Image extends ImageBase {
|
||||
this._setNativeImage(value ? value.ios : null);
|
||||
}
|
||||
|
||||
[srcProperty.setNative](value: any) {
|
||||
[srcProperty.setNative](value: string | ImageSource | ImageAsset) {
|
||||
this._createImageSourceFromSrc(value);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user