import { Injectable } from '@angular/core' ; import { ResizeObserver } from './types/resize-observer' ; import { ResizeObserverCallback } from './types/resize-observer-callback' ; declare var ResizeObserver ; docs-private @ Injectable ( { providedIn : 'root' } ) export class ResizeObserverFactory { create ( callback ) { return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver ( callback ) ; } }