mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #28675 from overleaf/dp-pdf-preview-output-files-typescript-2
Convert output-files.js to typescript GitOrigin-RevId: 32eb509f491cfd53de7f1b21b97861ba421566a5
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
buildRuleDeltas,
|
||||
handleLogFiles,
|
||||
handleOutputFiles,
|
||||
} from '../../features/pdf-preview/util/output-files'
|
||||
} from '@/features/pdf-preview/util/output-files'
|
||||
import { useProjectContext } from './project-context'
|
||||
import { useEditorContext } from './editor-context'
|
||||
import { buildFileList } from '../../features/pdf-preview/util/file-list'
|
||||
@@ -81,7 +81,7 @@ export type CompileContext = {
|
||||
logEntryAnnotations?: Record<string, Annotation[]>
|
||||
outputFilesArchive?: string
|
||||
pdfDownloadUrl?: string
|
||||
pdfFile?: PdfFile
|
||||
pdfFile?: PdfFile | null
|
||||
pdfUrl?: string
|
||||
pdfViewer?: string
|
||||
position?: PdfScrollPosition
|
||||
@@ -167,7 +167,7 @@ export const LocalCompileProvider: FC<React.PropsWithChildren> = ({
|
||||
const { pdfViewer, syntaxValidation } = userSettings
|
||||
|
||||
// low level details for metrics
|
||||
const [pdfFile, setPdfFile] = useState<PdfFile | undefined>()
|
||||
const [pdfFile, setPdfFile] = useState<PdfFile | null | undefined>()
|
||||
|
||||
// the project is considered to be "uncompiled" if a doc has changed, or finished saving, since the last compile started.
|
||||
const [uncompiled, setUncompiled] = useState(false)
|
||||
@@ -296,7 +296,7 @@ export const LocalCompileProvider: FC<React.PropsWithChildren> = ({
|
||||
}, [compiling])
|
||||
|
||||
const _buildLogEntryAnnotations = useCallback(
|
||||
(entries: any) =>
|
||||
(entries: LogEntry[]) =>
|
||||
buildLogEntryAnnotations(entries, fileTreeData, lastCompileRootDocId),
|
||||
[fileTreeData, lastCompileRootDocId]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user