mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
19 lines
580 B
TypeScript
19 lines
580 B
TypeScript
import { ComponentFactoryResolver } from '@angular/core';
|
|
|
|
declare const __zone_symbol__requestAnimationFrame: any;
|
|
declare const requestAnimationFrame: any;
|
|
|
|
export const raf = (h: any): any => {
|
|
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
return __zone_symbol__requestAnimationFrame(h);
|
|
}
|
|
if (typeof requestAnimationFrame === 'function') {
|
|
return requestAnimationFrame(h);
|
|
}
|
|
return setTimeout(h);
|
|
};
|
|
|
|
export const isComponentFactoryResolver = (item: any): item is ComponentFactoryResolver => {
|
|
return !!item.resolveComponentFactory;
|
|
};
|