I want to reduce my bundle size so i am trying to change this importimport OT, { Device, Publisher, Session, SubscriberProperties } from '@opentok/client';
I am importing this into context provider.const OT = React.lazy(()=> import('@opentok/client'));But at import am facing this .ts errorType 'Promise<{ default: typeof OT; checkScreenSharingCapability(callback: (response: ScreenSharingCapabilityResponse) => void): void; checkSystemRequirements(): number; ... 25 more ...; Subscriber: typeof Subscriber; }>' is not assignable to type 'Promise<{ default: ComponentType; }>'.Type '{ default: typeof OT; checkScreenSharingCapability(callback: (response: ScreenSharingCapabilityResponse) => void): void; checkSystemRequirements(): number; ... 25 more ...; Subscriber: typeof Subscriber; }' is not assignable to type '{ default: ComponentType; }'.Types of property 'default' are incompatible.Type 'typeof OT' is not assignable to type 'ComponentType'.ts(2322)