window.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { ExposedSettings } from './exposed-settings'
  2. import { OAuthProviders } from './oauth-providers'
  3. import { OverallThemeMeta } from './project-settings'
  4. import { User } from './user'
  5. import 'recurly__recurly-js'
  6. import { UserSettings } from './user-settings'
  7. import { ScopeValueStore } from './ide/scope-value-store'
  8. declare global {
  9. // eslint-disable-next-line no-unused-vars
  10. interface Window {
  11. csrfToken: string
  12. user: User
  13. user_id?: string
  14. userSettings: UserSettings
  15. oauthProviders: OAuthProviders
  16. thirdPartyIds: Record<string, string>
  17. metaAttributesCache: Map<string, any>
  18. i18n: {
  19. currentLangCode: string
  20. }
  21. ExposedSettings: ExposedSettings
  22. project_id: string
  23. gitBridgePublicBaseUrl: string
  24. _ide: Record<string, unknown> & {
  25. $scope: Record<string, unknown> & {
  26. pdf?: {
  27. logEntryAnnotations: Record<string, unknown>
  28. }
  29. }
  30. }
  31. isRestrictedTokenMember: boolean
  32. _reportCM6Perf: () => void
  33. _reportAcePerf: () => void
  34. MathJax: Record<string, any>
  35. overallThemes: OverallThemeMeta[]
  36. crypto: {
  37. randomUUID: () => string
  38. }
  39. // For react-google-recaptcha
  40. recaptchaOptions?: {
  41. enterprise?: boolean
  42. useRecaptchaNet?: boolean
  43. }
  44. expectingLinkedFileRefreshedSocketFor?: string | null
  45. writefull?: any
  46. io?: any
  47. overleaf: {
  48. unstable: {
  49. store: ScopeValueStore
  50. }
  51. }
  52. }
  53. }