UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

53 lines (52 loc) 1.97 kB
import { CoreTypes } from '../../core-types'; export declare namespace PercentLength { function parse(fromValue: string | CoreTypes.LengthType): CoreTypes.PercentLengthType; const equals: { (a: CoreTypes.PercentLengthType, b: CoreTypes.PercentLengthType): boolean; }; /** * Converts PercentLengthType unit to device pixels. * @param length The PercentLengthType to convert. * @param auto Value to use for conversion of "auto". By default is Math.NaN. * @param parentAvailableWidth Value to use as base when converting percent unit. By default is Math.NaN. */ const toDevicePixels: { (length: CoreTypes.PercentLengthType, auto: number, parentAvailableWidth: number): number; }; const convertToString: { (length: CoreTypes.PercentLengthType): string; }; } export declare namespace FixedLength { function parse(fromValue: string | CoreTypes.FixedLengthType): CoreTypes.FixedLengthType; const equals: { (a: CoreTypes.FixedLengthType, b: CoreTypes.FixedLengthType): boolean; }; /** * Converts FixedLengthType unit to device pixels. * @param length The FixedLengthType to convert. */ const toDevicePixels: { (length: CoreTypes.FixedLengthType): number; }; const convertToString: { (length: CoreTypes.FixedLengthType): string; }; } export declare namespace Length { function parse(fromValue: string | CoreTypes.LengthType): CoreTypes.LengthType; const equals: { (a: CoreTypes.LengthType, b: CoreTypes.LengthType): boolean; }; /** * Converts LengthType unit to device pixels. * @param length The LengthType to convert. * @param auto Value to use for conversion of "auto". By default is Math.NaN. */ const toDevicePixels: { (length: CoreTypes.LengthType, auto?: number): number; }; const convertToString: { (length: CoreTypes.LengthType): string; }; }