overleaf/services/web/frontend/js/shared/context/ide-angular-provider.tsx
Tim Down 92a38e1311 Merge pull request #15280 from overleaf/td-scope-store-and-emitter
IDE scope store and emitter

GitOrigin-RevId: 9835d684db791937cd0bbc657228cb9112089b47
2023-10-25 08:03:55 +00:00

16 lines
604 B
TypeScript

import { FC } from 'react'
import { AngularScopeValueStore } from '@/features/ide-react/scope-value-store/angular-scope-value-store'
import { AngularScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/angular-scope-event-emitter'
import { Ide, IdeProvider } from '@/shared/context/ide-context'
export const IdeAngularProvider: FC<{ ide: Ide }> = ({ ide, children }) => {
return (
<IdeProvider
ide={ide}
scopeStore={new AngularScopeValueStore(ide.$scope)}
scopeEventEmitter={new AngularScopeEventEmitter(ide.$scope)}
>
{children}
</IdeProvider>
)
}