mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 18:12:09 +08:00
fix(core): typings for Utils.queueMacrotask and static methods on Observable (#9425)
This commit is contained in:
12
packages/core/data/observable/index.d.ts
vendored
12
packages/core/data/observable/index.d.ts
vendored
@ -78,7 +78,7 @@ export class Observable {
|
||||
/**
|
||||
* String value used when hooking to propertyChange event.
|
||||
*/
|
||||
public static propertyChangeEvent: string;
|
||||
static propertyChangeEvent: string;
|
||||
|
||||
/**
|
||||
* A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
|
||||
@ -88,6 +88,8 @@ export class Observable {
|
||||
*/
|
||||
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
|
||||
|
||||
static on(eventName: string, callback: any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Raised when a propertyChange occurs.
|
||||
*/
|
||||
@ -101,11 +103,15 @@ export class Observable {
|
||||
*/
|
||||
once(event: string, callback: (data: EventData) => void, thisArg?: any);
|
||||
|
||||
static once(eventName: string, callback: any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Shortcut alias to the removeEventListener method.
|
||||
*/
|
||||
off(eventNames: string, callback?: any, thisArg?: any);
|
||||
|
||||
static off(eventName: string, callback?: any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Adds a listener for the specified event name.
|
||||
* @param eventNames Comma delimited names of the events to attach the listener to.
|
||||
@ -114,6 +120,8 @@ export class Observable {
|
||||
*/
|
||||
addEventListener(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
|
||||
|
||||
static addEventListener(eventName: string, callback: any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Removes listener(s) for the specified event name.
|
||||
* @param eventNames Comma delimited names of the events the specified listener is associated with.
|
||||
@ -122,6 +130,8 @@ export class Observable {
|
||||
*/
|
||||
removeEventListener(eventNames: string, callback?: any, thisArg?: any);
|
||||
|
||||
static removeEventListener(eventName: string, callback?: any, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Updates the specified property with the provided value.
|
||||
*/
|
||||
|
3
packages/core/index.d.ts
vendored
3
packages/core/index.d.ts
vendored
@ -101,12 +101,13 @@ export type { InstrumentationMode, TimerInfo } from './profiling';
|
||||
export { encoding } from './text';
|
||||
export * from './trace';
|
||||
export * from './ui';
|
||||
import { GC, isFontIconURI, isDataURI, isFileOrResourcePath, executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject, getModuleName, openFile, openUrl, isRealDevice, layout, ad as androidUtils, iOSNativeHelper as iosUtils, Source, escapeRegexSymbols, convertString, dismissSoftInput } from './utils';
|
||||
import { GC, isFontIconURI, isDataURI, isFileOrResourcePath, executeOnMainThread, mainThreadify, isMainThread, dispatchToMainThread, releaseNativeObject, getModuleName, openFile, openUrl, isRealDevice, layout, ad as androidUtils, iOSNativeHelper as iosUtils, Source, escapeRegexSymbols, convertString, dismissSoftInput, queueMacrotask } from './utils';
|
||||
import { ClassInfo, getClass, getBaseClasses, getClassInfo, isBoolean, isDefined, isFunction, isNullOrUndefined, isNumber, isObject, isString, isUndefined, toUIString, verifyCallback } from './utils/types';
|
||||
export declare const Utils: {
|
||||
GC: typeof GC;
|
||||
RESOURCE_PREFIX: string;
|
||||
FILE_PREFIX: string;
|
||||
queueMacrotask: typeof queueMacrotask;
|
||||
isFontIconURI: typeof isFontIconURI;
|
||||
isDataURI: typeof isDataURI;
|
||||
isFileOrResourcePath: typeof isFileOrResourcePath;
|
||||
|
Reference in New Issue
Block a user