mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings - Only use ambient mobules for global API's - Move single-file modules to a subdir with the same name so that we can provide a hand-written typing next to it (via package.json) - Delete all mentions of tns-core-modules.d.ts - Delete reference d.ts assembly build steps. Not needed anymore. - HACK! Use a <reference> for global typings in application.d.ts to avoid publishing a separate @types/tns-core-modules package. - Rename declarations.d.ts to tns-core-modules.d.ts to preserve JS project mappings in references.d.ts (the only place we use those)
This commit is contained in:
committed by
Hristo Deshev
parent
1af8c6ca8e
commit
b45cbe929b
96
tns-core-modules/ui/image/image.d.ts
vendored
96
tns-core-modules/ui/image/image.d.ts
vendored
@@ -1,62 +1,60 @@
|
||||
/**
|
||||
* Contains the Image class, which represents an image widget.
|
||||
*/
|
||||
declare module "ui/image" {
|
||||
import { View, Property, InheritedCssProperty, Color, Style } from "ui/core/view";
|
||||
import { ImageSource } from "image-source";
|
||||
|
||||
import { View, Property, InheritedCssProperty, Color, Style } from "ui/core/view";
|
||||
import { ImageSource } from "image-source";
|
||||
|
||||
/**
|
||||
* Represents a class that provides functionality for loading and streching image(s).
|
||||
*/
|
||||
export class Image extends View {
|
||||
/**
|
||||
* Represents a class that provides functionality for loading and streching image(s).
|
||||
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ImageView.html) that represents the user interface for this component. Valid only when running on Android OS.
|
||||
*/
|
||||
export class Image extends View {
|
||||
/**
|
||||
* Gets the native [android widget](http://developer.android.com/reference/android/widget/ImageView.html) that represents the user interface for this component. Valid only when running on Android OS.
|
||||
*/
|
||||
android: any /* android.widget.ImageView */;
|
||||
android: any /* android.widget.ImageView */;
|
||||
|
||||
/**
|
||||
* Gets the native iOS [UIImageView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/) that represents the user interface for this component. Valid only when running on iOS.
|
||||
*/
|
||||
ios: any /* UIImageView */;
|
||||
/**
|
||||
* Gets the native iOS [UIImageView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIImageView_Class/) that represents the user interface for this component. Valid only when running on iOS.
|
||||
*/
|
||||
ios: any /* UIImageView */;
|
||||
|
||||
/**
|
||||
* Gets or sets the image source of the image.
|
||||
*/
|
||||
imageSource: ImageSource;
|
||||
/**
|
||||
* Gets or sets the image source of the image.
|
||||
*/
|
||||
imageSource: ImageSource;
|
||||
|
||||
/**
|
||||
* Gets or sets the source of the Image. This can be either an URL string or a native image instance.
|
||||
*/
|
||||
src: any;
|
||||
/**
|
||||
* Gets or sets the source of the Image. This can be either an URL string or a native image instance.
|
||||
*/
|
||||
src: any;
|
||||
|
||||
/**
|
||||
* Gets a value indicating if the image is currently loading
|
||||
*/
|
||||
readonly isLoading: boolean;
|
||||
/**
|
||||
* Gets a value indicating if the image is currently loading
|
||||
*/
|
||||
readonly isLoading: boolean;
|
||||
|
||||
/**
|
||||
* Gets or sets the image stretch mode.
|
||||
*/
|
||||
stretch: "none" | "aspectFill" | "aspectFit" | "fill";
|
||||
/**
|
||||
* Gets or sets the image stretch mode.
|
||||
*/
|
||||
stretch: "none" | "aspectFill" | "aspectFit" | "fill";
|
||||
|
||||
/**
|
||||
* Gets or sets the loading strategy for images on the local file system:
|
||||
* - **sync** - blocks the UI if necessary to display immediately, good for small icons.
|
||||
* - **async** *(default)* - will load in the background, may appear with short delay, good for large images.
|
||||
* When loading images from web they are always loaded **async** no matter of loadMode value.
|
||||
*/
|
||||
loadMode: "sync" | "async";
|
||||
/**
|
||||
* Gets or sets the loading strategy for images on the local file system:
|
||||
* - **sync** - blocks the UI if necessary to display immediately, good for small icons.
|
||||
* - **async** *(default)* - will load in the background, may appear with short delay, good for large images.
|
||||
* When loading images from web they are always loaded **async** no matter of loadMode value.
|
||||
*/
|
||||
loadMode: "sync" | "async";
|
||||
|
||||
/**
|
||||
* A color used to tint template images.
|
||||
*/
|
||||
tintColor: Color;
|
||||
}
|
||||
/**
|
||||
* A color used to tint template images.
|
||||
*/
|
||||
tintColor: Color;
|
||||
}
|
||||
|
||||
export const imageSourceProperty: Property<Image, ImageSource>;
|
||||
export const srcProperty: Property<Image, any>;
|
||||
export const isLoadingProperty: Property<Image, string>;
|
||||
export const loadMode: Property<Image, "sync" | "async">;
|
||||
export const stretchProperty: Property<Image, "none" | "aspectFill" | "aspectFit" | "fill">;
|
||||
export const tintColorProperty: InheritedCssProperty<Style, Color>;
|
||||
}
|
||||
export const imageSourceProperty: Property<Image, ImageSource>;
|
||||
export const srcProperty: Property<Image, any>;
|
||||
export const isLoadingProperty: Property<Image, string>;
|
||||
export const loadMode: Property<Image, "sync" | "async">;
|
||||
export const stretchProperty: Property<Image, "none" | "aspectFill" | "aspectFit" | "fill">;
|
||||
export const tintColorProperty: InheritedCssProperty<Style, Color>;
|
||||
|
||||
Reference in New Issue
Block a user