Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions nativescript-imagepicker/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import observable = require("data/observable");
import imagesource = require("image-source");
import imageAssetModule = require("image-asset");
import { Observable } from "data/observable";
import { ImageSource } from "image-source";
import { ImageAsset } from "image-asset";

export interface ImageOptions {
/**
Expand All @@ -15,14 +15,13 @@ export interface ImageOptions {
}


export class SelectedAsset extends imageAssetModule.ImageAsset {
export class SelectedAsset extends ImageAsset {
/**
* [Deprecated. SelectedAsset will be used directly as a source for the thumb image]
* A 100x100 pixels thumb of the selected image.
* This property will be initialized on demand. The first access will return undefined or null.
* It will trigger an async load and when the thumb is obtained, a property changed notification will occur.
*/
thumb: imagesource.ImageSource;
thumb: ImageSource;

/**
* URI that identifies the image asset.
Expand All @@ -42,7 +41,7 @@ export class SelectedAsset extends imageAssetModule.ImageAsset {
* Asynchronously retrieves an ImageSource object that represents this selected image.
* Scaled to the given size. (Aspect-ratio is preserved by default)
*/
getImage(options?: ImageOptions): Promise<imagesource.ImageSource>;
getImage(options?: ImageOptions): Promise<ImageSource>;

/**
* Asynchronously retrieves an ArrayBuffer that represents the raw byte data from this selected image.
Expand Down Expand Up @@ -86,6 +85,11 @@ interface Options {
*/
read_external_storage?: string;
}

/**
* Indicates if images should be ordered as newest first
*/
newestFirst?: boolean;
}

export function create(options?: Options): ImagePicker;