Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/date.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/// <reference types="@nextcloud/typings" />
/*!
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import { getCanonicalLocale } from './locale.ts'

declare let globalThis: Nextcloud.v29.WindowWithGlobals

export type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6

/**
Expand Down
11 changes: 11 additions & 0 deletions lib/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,26 @@

/* eslint-disable camelcase */

/// <reference types="@nextcloud/typings" />

import type { PluralFunction, Translations } from './registry.ts'

declare global {
// Library shared global state
var _nc_l10n_locale: string | undefined
var _nc_l10n_language: string | undefined
var _nc_l10n_timezone: string | undefined

var _oc_l10n_registry_translations: Record<string, Translations> | undefined
var _oc_l10n_registry_plural_functions: Record<string, PluralFunction> | undefined

// Nextcloud server globals available on Nextcloud app in Web environment
var firstDay: Nextcloud.v29.WindowWithGlobals['firstDay'] | undefined
var dayNames: Nextcloud.v29.WindowWithGlobals['dayNames'] | undefined
var dayNamesShort: Nextcloud.v29.WindowWithGlobals['dayNamesShort'] | undefined
var dayNamesMin: Nextcloud.v29.WindowWithGlobals['dayNamesMin'] | undefined
var monthNames: Nextcloud.v29.WindowWithGlobals['monthNames'] | undefined
var monthNamesShort: Nextcloud.v29.WindowWithGlobals['monthNamesShort'] | undefined
}

export {}
Loading
Loading