Files
NativeScript/camera/camera.d.ts
2015-04-16 16:50:14 +03:00

22 lines
763 B
TypeScript

/**
* Allows you to take pictrues with the device's camera.
*/
declare module "camera" {
import imageSource = require("image-source");
/**
* Take a photo using the camera.
* @param width - Optional parameter which defines the required width of the taken picture.
* @param height - Optional parameter which defines the required height of the taken picture.
* @param keepAspectRatio - Optional parameter which controls if the result picture will keep the aspect ratio of the picture taken by camera.
*/
export function takePicture(options?: CameraOptions): Promise<imageSource.ImageSource>;
export interface CameraOptions {
width?: number;
height?: number;
keepAspectRatio?: boolean;
}
}