Options
All
  • Public
  • Public/Protected
  • All
Menu

Project NativeScript

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

GridUnitType

GridUnitType: "pixel" | "star" | "auto"

Headers

Headers: object

Type declaration

  • [key: string]: string | string[]

HorizontalAlignment

HorizontalAlignment: HorizontalAlignmentType
deprecated

Use CoreTypes.HorizontalAlignmentType instead.

InstrumentationMode

InstrumentationMode: "counters" | "timeline" | "lifecycle"

LengthDipUnit

LengthDipUnit: LengthDipUnit
deprecated

Use CoreTypes.LengthDipUnit instead.

LengthPercentUnit

LengthPercentUnit: LengthPercentUnit
deprecated

Use CoreTypes.LengthPercentUnit instead.

LengthPxUnit

LengthPxUnit: LengthPxUnit
deprecated

Use CoreTypes.LengthPxUnit instead.

LengthType

LengthType: LengthType
deprecated

Use CoreTypes.LengthType instead.

ModuleListProvider

ModuleListProvider: function

Type declaration

    • (): string[]
    • Returns string[]

PercentLengthType

PercentLengthType: PercentLengthType
deprecated

Use CoreTypes.PercentLengthType instead.

VerticalAlignment

VerticalAlignment: VerticalAlignmentType
deprecated

Use CoreTypes.VerticalAlignmentType instead.

WebViewNavigationType

WebViewNavigationType: "linkClicked" | "formSubmitted" | "backForward" | "reload" | "formResubmitted" | "other" | undefined

Represents navigation type

dip

dip: number
deprecated

Use CoreTypes.dip instead.

percent

percent: number
deprecated

Use CoreTypes.percent instead.

px

px: number
deprecated

Use CoreTypes.px instead.

Variables

Const AccessibilityEvents

AccessibilityEvents: object

Type declaration

  • accessibilityBlurEvent: string
  • accessibilityFocusChangedEvent: string
  • accessibilityFocusEvent: string

Const AnimationCurve

AnimationCurve: typeof AnimationCurve
deprecated

Use CoreTypes.AnimationCurve instead.

Const Application

Application: object

Type declaration

  • addCss: typeof addCss
  • android: AndroidApplication
  • discardedErrorEvent: string
  • displayedEvent: string
  • exitEvent: string
  • getCssFileName: typeof getCssFileName
  • getMainEntry: typeof getMainEntry
  • getNativeApplication: typeof getNativeApplication
  • getResources: typeof getResources
  • getRootView: typeof getRootView
  • hasLaunched: typeof hasLaunched
  • hasListeners: typeof hasListeners
  • ios: iOSApplication
  • launchEvent: string
  • loadAppCss: typeof loadAppCss
  • lowMemoryEvent: string
  • notify: typeof notify
  • off: typeof off
  • on: typeof on
  • orientation: typeof orientation
  • orientationChangedEvent: string
  • resetRootView: typeof _resetRootView
  • resumeEvent: string
  • run: typeof run
  • setCssFileName: typeof setCssFileName
  • setResources: typeof setResources
  • suspendEvent: string
  • systemAppearance: typeof systemAppearance
  • systemAppearanceChanged: typeof systemAppearanceChanged
  • systemAppearanceChangedEvent: string
  • uncaughtErrorEvent: string

Const ApplicationSettings

ApplicationSettings: object

Type declaration

  • clear: typeof clear
  • flush: typeof flush
  • getAllKeys: typeof getAllKeys
  • getBoolean: typeof getBoolean
  • getNumber: typeof getNumber
  • getString: typeof getString
  • hasKey: typeof hasKey
  • remove: typeof remove
  • setBoolean: typeof setBoolean
  • setNumber: typeof setNumber
  • setString: typeof setString

Const CSSHelper

CSSHelper: object

Type declaration

  • AttributeSelector: typeof AttributeSelector
  • ClassSelector: typeof ClassSelector
  • InvalidSelector: typeof InvalidSelector
  • PseudoClassSelector: typeof PseudoClassSelector
  • RuleSet: typeof RuleSet
  • Selector: typeof Selector
  • SelectorCore: typeof SelectorCore
  • SelectorsMap: typeof SelectorsMap
  • SelectorsMatch: typeof SelectorsMatch
  • SimpleSelector: typeof SimpleSelector
  • SimpleSelectorSequence: typeof SimpleSelectorSequence
  • TypeSelector: typeof TypeSelector
  • UniversalSelector: typeof UniversalSelector
  • createSelector: function
      • (sel: string): SimpleSelector | SimpleSelectorSequence | Selector
      • Parameters

        • sel: string

        Returns SimpleSelector | SimpleSelectorSequence | Selector

  • fromAstNodes: function
      • (astRules: cssParser.Node[]): RuleSet[]
      • Parameters

        • astRules: cssParser.Node[]

        Returns RuleSet[]

Const Connectivity

Connectivity: object

Type declaration

  • connectionType: typeof connectionType
  • getConnectionType: typeof getConnectionType
  • startMonitoring: typeof startMonitoring
  • stopMonitoring: typeof stopMonitoring

Const Device

Device: IDevice

Gets the current device information.

Const Dialogs

Dialogs: object

Singular rollup for convenience of all dialog methods

Type declaration

  • action: typeof action
  • alert: typeof alert
  • confirm: typeof confirm
  • login: typeof login
  • prompt: typeof prompt

Const Enums

Enums: object
deprecated

Use CoreTypes instead. Enums will be removed in 9.0

Type declaration

  • Accuracy: typeof Accuracy
  • AndroidActionBarIconVisibility: typeof AndroidActionBarIconVisibility
  • AndroidActionItemPosition: typeof AndroidActionItemPosition
  • AnimationCurve: typeof AnimationCurve
  • AutocapitalizationType: typeof AutocapitalizationType
  • BackgroundRepeat: typeof BackgroundRepeat
  • DeviceOrientation: typeof DeviceOrientation
  • DeviceType: typeof DeviceType
  • Dock: typeof Dock
  • FontAttributes: typeof FontAttributes
  • FontStyle: typeof FontStyle
  • FontWeight: typeof FontWeight
  • HorizontalAlignment: typeof HorizontalAlignment
  • IOSActionItemPosition: typeof IOSActionItemPosition
  • ImageFormat: typeof ImageFormat
  • KeyboardType: typeof KeyboardType
  • NavigationBarVisibility: typeof NavigationBarVisibility
  • Orientation: typeof Orientation
  • ReturnKeyType: typeof ReturnKeyType
  • StatusBarStyle: typeof StatusBarStyle
  • Stretch: typeof ImageStretch
  • SystemAppearance: typeof SystemAppearance
  • TextAlignment: typeof TextAlignment
  • TextDecoration: typeof TextDecoration
  • TextTransform: typeof TextTransform
  • UpdateTextTrigger: typeof UpdateTextTrigger
  • VerticalAlignment: typeof VerticalAlignment
  • Visibility: typeof Visibility
  • WhiteSpace: typeof WhiteSpace

Const Http

Http: object

Type declaration

  • getFile: typeof getFile
  • getImage: typeof getImage
  • getJSON: typeof getJSON
  • getString: typeof httpGetString
  • request: function
      • (options: HttpRequestOptions): Promise<HttpResponse>
      • Parameters

        • options: HttpRequestOptions

        Returns Promise<HttpResponse>

Const Utils

Utils: object

Type declaration

  • ClassInfo: typeof ClassInfo
  • FILE_PREFIX: string
  • GC: typeof GC
  • RESOURCE_PREFIX: string
  • Source: typeof Source
  • ad: typeof androidUtils
  • android: typeof androidUtils
  • clearInterval: typeof clearInterval
  • clearTimeout: typeof clearTimeout
  • convertString: typeof convertString
  • dispatchToMainThread: typeof dispatchToMainThread
  • escapeRegexSymbols: typeof escapeRegexSymbols
  • executeOnMainThread: typeof executeOnMainThread
  • getBaseClasses: typeof getBaseClasses
  • getClass: typeof getClass
  • getClassInfo: typeof getClassInfo
  • getModuleName: typeof getModuleName
  • ios: typeof iosUtils
  • isBoolean: typeof isBoolean
  • isDataURI: typeof isDataURI
  • isDefined: typeof isDefined
  • isFileOrResourcePath: typeof isFileOrResourcePath
  • isFontIconURI: typeof isFontIconURI
  • isFunction: typeof isFunction
  • isMainThread: typeof isMainThread
  • isNullOrUndefined: typeof isNullOrUndefined
  • isNumber: typeof isNumber
  • isObject: typeof isObject
  • isRealDevice: typeof isRealDevice
  • isString: typeof isString
  • isUndefined: typeof isUndefined
  • layout: typeof layout
  • mainThreadify: typeof mainThreadify
  • openFile: typeof openFile
  • openUrl: typeof openUrl
  • releaseNativeObject: typeof releaseNativeObject
  • setInterval: typeof setInterval
  • setTimeout: typeof setTimeout
  • toUIString: typeof toUIString
  • verifyCallback: typeof verifyCallback

Const androidDynamicElevationOffsetProperty

androidDynamicElevationOffsetProperty: CssProperty<Style, number>

Const androidElevationProperty

androidElevationProperty: CssProperty<Style, number>

Const autocapitalizationTypeProperty

autocapitalizationTypeProperty: Property<EditableTextBase, AutocapitalizationInputType>

Const autocorrectProperty

autocorrectProperty: Property<EditableTextBase, boolean>

Const backgroundColorProperty

backgroundColorProperty: CssAnimationProperty<Style, Color>

Const backgroundImageProperty

backgroundImageProperty: CssProperty<Style, string | LinearGradient>

Const backgroundInternalProperty

backgroundInternalProperty: CssProperty<Style, Background>

Const backgroundPositionProperty

backgroundPositionProperty: CssProperty<Style, string>

Const backgroundRepeatProperty

backgroundRepeatProperty: CssProperty<Style, BackgroundRepeatType>

Const backgroundSizeProperty

backgroundSizeProperty: CssProperty<Style, string>

Const borderBottomColorProperty

borderBottomColorProperty: CssProperty<Style, Color>

Const borderBottomLeftRadiusProperty

borderBottomLeftRadiusProperty: CssProperty<Style, LengthType>

Const borderBottomRightRadiusProperty

borderBottomRightRadiusProperty: CssProperty<Style, LengthType>

Const borderBottomWidthProperty

borderBottomWidthProperty: CssProperty<Style, LengthType>

Const borderLeftColorProperty

borderLeftColorProperty: CssProperty<Style, Color>

Const borderLeftWidthProperty

borderLeftWidthProperty: CssProperty<Style, LengthType>

Const borderRightColorProperty

borderRightColorProperty: CssProperty<Style, Color>

Const borderRightWidthProperty

borderRightWidthProperty: CssProperty<Style, LengthType>

Const borderTopColorProperty

borderTopColorProperty: CssProperty<Style, Color>

Const borderTopLeftRadiusProperty

borderTopLeftRadiusProperty: CssProperty<Style, LengthType>

Const borderTopRightRadiusProperty

borderTopRightRadiusProperty: CssProperty<Style, LengthType>

Const borderTopWidthProperty

borderTopWidthProperty: CssProperty<Style, LengthType>

Const clipPathProperty

clipPathProperty: CssProperty<Style, string>

Const colorProperty

Const editableProperty

editableProperty: Property<EditableTextBase, boolean>

Const fontFamilyProperty

fontFamilyProperty: InheritedCssProperty<Style, string>

Const fontInternalProperty

fontInternalProperty: CssProperty<Style, Font>

Const fontScaleProperty

fontScaleProperty: InheritedCssProperty<Style, number>

Const fontSizeProperty

fontSizeProperty: InheritedCssProperty<Style, number>

Const fontStyleProperty

fontStyleProperty: InheritedCssProperty<Style, FontStyle>

Const fontWeightProperty

fontWeightProperty: InheritedCssProperty<Style, FontWeight>

Const heightProperty

Const hintProperty

hintProperty: Property<EditableTextBase, string>

Const horizontalAlignmentProperty

horizontalAlignmentProperty: CssProperty<Style, HorizontalAlignmentType>

Const isAndroid

isAndroid: boolean

Gets a value indicating if the app is running on the Android platform.

Const isIOS

isIOS: boolean

Gets a value indicating if the app is running on the iOS platform.

Const isUserInteractionEnabledProperty

isUserInteractionEnabledProperty: Property<View, boolean>

Const keyboardTypeProperty

Const letterSpacingProperty

letterSpacingProperty: CssProperty<Style, number>

Const lineHeightProperty

lineHeightProperty: CssProperty<Style, number>

Const marginBottomProperty

marginBottomProperty: CssProperty<Style, PercentLengthType>

Const marginLeftProperty

marginLeftProperty: CssProperty<Style, PercentLengthType>

Const marginRightProperty

marginRightProperty: CssProperty<Style, PercentLengthType>

Const marginTopProperty

marginTopProperty: CssProperty<Style, PercentLengthType>

Const maxLengthProperty

maxLengthProperty: Property<EditableTextBase, number>

Const minHeightProperty

minHeightProperty: CssProperty<Style, LengthType>

Const minWidthProperty

minWidthProperty: CssProperty<Style, LengthType>

Const opacityProperty

opacityProperty: CssAnimationProperty<Style, number>

Const paddingBottomProperty

paddingBottomProperty: CssProperty<Style, LengthType>

Const paddingLeftProperty

paddingLeftProperty: CssProperty<Style, LengthType>

Const paddingRightProperty

paddingRightProperty: CssProperty<Style, LengthType>

Const paddingTopProperty

paddingTopProperty: CssProperty<Style, LengthType>

Const perspectiveProperty

perspectiveProperty: CssAnimationProperty<Style, number>

Const placeholderColorProperty

placeholderColorProperty: CssProperty<Style, Color>

Const platformNames

platformNames: object

Type declaration

  • android: string
  • ios: string

Const profilingTime

profilingTime: any

Const returnKeyTypeProperty

Const rotateProperty

rotateProperty: CssAnimationProperty<Style, number>

Const rotateXProperty

rotateXProperty: CssAnimationProperty<Style, number>

Const rotateYProperty

rotateYProperty: CssAnimationProperty<Style, number>

Const scaleXProperty

scaleXProperty: CssAnimationProperty<Style, number>

Const scaleYProperty

scaleYProperty: CssAnimationProperty<Style, number>

Const textAlignmentProperty

Const textDecorationProperty

textDecorationProperty: CssProperty<Style, TextDecorationType>

Const textShadowProperty

textShadowProperty: CssProperty<Style, CSSShadow>

Const textTransformProperty

textTransformProperty: CssProperty<Style, TextTransformType>

Const translateXProperty

translateXProperty: CssAnimationProperty<Style, number>

Const translateYProperty

translateYProperty: CssAnimationProperty<Style, number>

Const unsetValue

unsetValue: any

Value specifying that Property should be set to its initial value.

Const updateTextTriggerProperty

updateTextTriggerProperty: Property<EditableTextBase, UpdateTextTriggerType>

Const verticalAlignmentProperty

verticalAlignmentProperty: CssProperty<Style, VerticalAlignmentTextType>

Const visibilityProperty

visibilityProperty: CssProperty<Style, VisibilityType>

Const whiteSpaceProperty

whiteSpaceProperty: CssProperty<Style, WhiteSpaceType>

Const widthProperty

Const zIndexProperty

zIndexProperty: CssProperty<Style, number>

Const zeroLength

zeroLength: LengthType

Functions

CSSType

  • CSSType(type: string): ClassDecorator
  • Specifies the type name for the instances of this View class, that is used when matching CSS type selectors.

    Usage:

    @CSSType("Button")
    class Button extends View {
    }
    

    Internally the decorator set Button.prototype.cssType = "Button".

    Parameters

    • type: string

      The type name, e. g. "Button", "Label", etc.

    Returns ClassDecorator

PseudoClassHandler

  • PseudoClassHandler(...pseudoClasses: string[]): MethodDecorator

_setResolver

Private _updateCharactersInRangeReplacementString

  • _updateCharactersInRangeReplacementString(formattedText: FormattedString, rangeLocation: number, rangeLength: number, replacementString: string): void

action

  • action(message: string, cancelButtonText: string, actions: string[]): Promise<string>
  • action(options: ActionOptions): Promise<string>
  • The action() method displays a action box that prompts the visitor to choose some action.

    Parameters

    • message: string

      The text to display in the dialog box.

    • cancelButtonText: string

      The text to display in the cancel button.

    • actions: string[]

      List of available actions.

    Returns Promise<string>

  • The action() method displays a action box that prompts the visitor to choose some action.

    Parameters

    Returns Promise<string>

addTaggedAdditionalCSS

  • addTaggedAdditionalCSS(cssText: string, tag?: string | number): boolean

addWeakEventListener

  • addWeakEventListener(source: Observable, eventName: string, handler: function, target: any): void

alert

  • alert(message: string | number | boolean): Promise<void>
  • alert(options: AlertOptions): Promise<void>
  • The alert() method displays an alert box with a specified message.

    Parameters

    • message: string | number | boolean

      Specifies the text to display in the alert box.

    Returns Promise<void>

  • The alert() method displays an alert box with a specified message.

    Parameters

    • options: AlertOptions

      Specifies the options for the alert box.

    Returns Promise<void>

animationTimingFunctionConverter

  • animationTimingFunctionConverter(value: string): any

booleanConverter

  • booleanConverter(v: string): boolean

confirm

  • confirm(message: string): Promise<boolean>
  • confirm(options: ConfirmOptions): Promise<boolean>
  • The confirm() method displays a dialog box with a specified message.

    Parameters

    • message: string

      Specifies the text to display in the confirm box.

    Returns Promise<boolean>

  • The confirm() method displays a dialog box with a specified message.

    Parameters

    Returns Promise<boolean>

eachDescendant

  • eachDescendant(view: ViewBase, callback: function): void

fromObject

fromObjectRecursive

getAncestor

getCurrentPage

  • getCurrentPage(): Page

getFileAccess

  • getFileAccess(): FileSystemAccess
  • Returns FileSystemAccess, a shared singleton utility class to provide methods to access and work with the file system. This is used under the hood of all the file system apis in @nativescript/core and provided as a lower level convenience if needed.

    Returns FileSystemAccess

    FileSystemAccess

getRootLayout

getTransformedText

getViewById

login

  • login(message: string, userNameHint?: string, passwordHint?: string, userName?: string, password?: string): Promise<LoginResult>
  • login(message: string, userNameHint?: string, passwordHint?: string): Promise<LoginResult>
  • login(options: LoginOptions): Promise<LoginResult>
  • The login() method displays a login dialog box that prompts the visitor for user name and password.

    Parameters

    • message: string

      The text to display in the dialog box.

    • Optional userNameHint: string

      The default text to display as a hint in the username input. Optional.

    • Optional passwordHint: string

      The default text to display as a hint in the password input. Optional.

    • Optional userName: string

      The default text to display in the user name input box. Optional.

    • Optional password: string

      The default text to display in the password input box. Optional.

    Returns Promise<LoginResult>

  • The login() method displays a login dialog box that prompts the visitor for user name and password.

    Parameters

    • message: string

      The text to display in the dialog box.

    • Optional userNameHint: string

      The default text to display as a hint in the username input. Optional.

    • Optional passwordHint: string

      The default text to display as a hint in the password input. Optional.

    Returns Promise<LoginResult>

  • The login() method displays a login dialog box that prompts the visitor for user name and password.

    Parameters

    Returns Promise<LoginResult>

makeParser

  • makeParser<T>(isValid: function, allowNumbers?: boolean): function
  • Type parameters

    • T

    Parameters

    • isValid: function
        • (value: any): boolean
        • Parameters

          • value: any

          Returns boolean

    • allowNumbers: boolean = false

    Returns function

      • (value: any): T
      • Parameters

        • value: any

        Returns T

makeValidator

  • makeValidator<T>(...values: T[]): function
  • Type parameters

    • T

    Parameters

    • Rest ...values: T[]

    Returns function

      • (value: any): value
      • Parameters

        • value: any

        Returns value

parseCSSShadow

  • parseCSSShadow(value: string): CSSShadow

parseKeyframeDeclarations

  • parseKeyframeDeclarations(unparsedKeyframeDeclarations: KeyframeDeclaration[]): KeyframeDeclaration[]

profile

  • profile(nameFnOrTarget?: string | Function | Object, fnOrKey?: Function | string | symbol, descriptor?: PropertyDescriptor, attrs?: any): any
  • Parameters

    • Optional nameFnOrTarget: string | Function | Object
    • Optional fnOrKey: Function | string | symbol
    • Optional descriptor: PropertyDescriptor
    • Optional attrs: any

    Returns any

profilingDisable

  • profilingDisable(): void

profilingDumpProfiles

  • profilingDumpProfiles(): void

profilingEnable

profilingIsRunning

  • profilingIsRunning(name: string): boolean

profilingResetProfiles

  • profilingResetProfiles(): void

profilingStart

  • profilingStart(name: string): void

profilingStartCPU

  • profilingStartCPU(name: string): void

profilingStop

profilingStopCPU

  • profilingStopCPU(name: string): void

profilingUptime

  • profilingUptime(): any

prompt

  • The prompt() method displays a dialog box that prompts the visitor for input.

    Parameters

    • message: string

      The text to display in the dialog box.

    • Optional defaultText: string

      The default text to display in the input box. Optional.

    Returns Promise<PromptResult>

  • The prompt() method displays a dialog box that prompts the visitor for input.

    Parameters

    Returns Promise<PromptResult>

removeTaggedAdditionalCSS

  • removeTaggedAdditionalCSS(tag: string | number): boolean

removeWeakEventListener

  • removeWeakEventListener(source: Observable, eventName: string, handler: function, target: any): void

resolveFileNameFromUrl

  • resolveFileNameFromUrl(url: string, appDirectory: string, fileExists: function, importSource?: string): string
  • Parameters

    • url: string
    • appDirectory: string
    • fileExists: function
        • (name: string): boolean
        • Parameters

          • name: string

          Returns boolean

    • Optional importSource: string

    Returns string

sanitizeModuleName

  • sanitizeModuleName(moduleName: string, removeExtension?: boolean): string
  • Helps sanitize a module name if it is prefixed with '/', '' or '/'

    Parameters

    • moduleName: string

      the name

    • removeExtension: boolean = true

      whether to remove extension

    Returns string

setActivityCallbacks

  • setActivityCallbacks(activity: any): void

timeConverter

  • timeConverter(value: string): number

transformConverter

  • transformConverter(text: string): TransformFunctionsInfo

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method