Merge pull request #27868 from overleaf/dp-pdf-preview-2-typescript
Convert DocumentCompiler class to typescript GitOrigin-RevId: 6a0d72f7e0cc319c9166ee6236380f6af5187dbb
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
usePdfScrollPosition,
|
||||
} from '@/shared/hooks/use-pdf-scroll-position'
|
||||
import {
|
||||
DeliveryLatencies,
|
||||
HighlightData,
|
||||
LogEntry,
|
||||
PdfFileDataList,
|
||||
@@ -190,7 +191,9 @@ export const LocalCompileProvider: FC<React.PropsWithChildren> = ({
|
||||
const [firstRenderDone, setFirstRenderDone] = useState(() => () => {})
|
||||
|
||||
// latencies of compile/pdf download/rendering
|
||||
const [deliveryLatencies, setDeliveryLatencies] = useState({})
|
||||
const [deliveryLatencies, setDeliveryLatencies] = useState<DeliveryLatencies>(
|
||||
{}
|
||||
)
|
||||
|
||||
// whether the project has been compiled yet
|
||||
const [compiledOnce, setCompiledOnce] = useState(false)
|
||||
@@ -462,7 +465,7 @@ export const LocalCompileProvider: FC<React.PropsWithChildren> = ({
|
||||
// these are refs rather than state so they don't trigger the effect to run
|
||||
const previousRuleCountsRef = useRef<{
|
||||
ruleCounts: Record<string, number>
|
||||
rootDocId: string
|
||||
rootDocId: string | null | undefined
|
||||
} | null>(null)
|
||||
const recordedActionsRef = useRef<Record<string, boolean>>({})
|
||||
const recordAction = useCallback((action: string) => {
|
||||
|
||||
Reference in New Issue
Block a user