mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Apply getter check to determine if API is exposed as property or as method for iOS backward compatibility
This commit is contained in:
7
tns-core-modules/utils/utils.d.ts
vendored
7
tns-core-modules/utils/utils.d.ts
vendored
@@ -154,6 +154,13 @@
|
||||
* Module with ios specific utilities.
|
||||
*/
|
||||
module ios {
|
||||
/**
|
||||
* Checks if the property is a function and if it is, calls it on this.
|
||||
* Designed to support backward compatibility for methods that became properties.
|
||||
* Will not work on delegates since it checks if the propertyValue is a function, and delegates are marshalled as functions.
|
||||
* Example: getter(NSRunLoop, NSRunLoop.currentRunLoop).runUntilDate(NSDate.dateWithTimeIntervalSinceNow(waitTime));
|
||||
*/
|
||||
export function getter<T>(_this: any, propertyValue: T | {(): T}): T;
|
||||
export function getTransformedText(view, source: string, transform: string): string;
|
||||
export function setWhiteSpace(view, value: string, parentView?: any);
|
||||
export function setTextAlignment(view, value: string);
|
||||
|
||||
Reference in New Issue
Block a user