From a507fdbc37b4a011d16fc1972165b512ddbdaa0d Mon Sep 17 00:00:00 2001 From: Blake Nussey Date: Fri, 10 Feb 2017 16:30:25 -0800 Subject: [PATCH 1/2] definition fixes for webpack and newestFirst --- nativescript-imagepicker/index.d.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nativescript-imagepicker/index.d.ts b/nativescript-imagepicker/index.d.ts index b949cfd..37f9c7c 100644 --- a/nativescript-imagepicker/index.d.ts +++ b/nativescript-imagepicker/index.d.ts @@ -1,6 +1,5 @@ -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"; export interface ImageOptions { /** @@ -15,14 +14,13 @@ export interface ImageOptions { } -export class SelectedAsset extends imageAssetModule.ImageAsset { +export class SelectedAsset extends Observable { /** - * [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. @@ -42,7 +40,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; + getImage(options?: ImageOptions): Promise; /** * Asynchronously retrieves an ArrayBuffer that represents the raw byte data from this selected image. @@ -86,6 +84,11 @@ interface Options { */ read_external_storage?: string; } + + /** + * Indicates if images should be ordered as newest first + */ + newestFirst?: boolean; } export function create(options?: Options): ImagePicker; From 00fff762f0761fd2e98b2362a6a76eaa10064640 Mon Sep 17 00:00:00 2001 From: Blake Nussey Date: Fri, 10 Feb 2017 16:35:53 -0800 Subject: [PATCH 2/2] Fix to ImageAsset --- nativescript-imagepicker/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nativescript-imagepicker/index.d.ts b/nativescript-imagepicker/index.d.ts index 37f9c7c..9d59428 100644 --- a/nativescript-imagepicker/index.d.ts +++ b/nativescript-imagepicker/index.d.ts @@ -1,5 +1,6 @@ import { Observable } from "data/observable"; import { ImageSource } from "image-source"; +import { ImageAsset } from "image-asset"; export interface ImageOptions { /** @@ -14,7 +15,7 @@ export interface ImageOptions { } -export class SelectedAsset extends Observable { +export class SelectedAsset extends ImageAsset { /** * A 100x100 pixels thumb of the selected image. * This property will be initialized on demand. The first access will return undefined or null.