MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / mainThreadify

Function mainThreadify

packages/core/utils/common.ts:175–180  ·  view source on GitHub ↗
(func: Function)

Source from the content-addressed store, hash-verified

173}
174
175export function mainThreadify(func: Function): (...args: any[]) => void {
176 return function (...args) {
177 const argsToPass = args;
178 executeOnMainThread(() => func.apply(this, argsToPass));
179 };
180}
181
182export function isEmoji(value: string): boolean {
183 // TODO: In a future runtime update, we can switch to using Unicode Property Escapes:

Callers 1

Calls 2

executeOnMainThreadFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected