Skip to content

Commit

Permalink
Merge pull request #563 from nextcloud-libraries/enh/drop-corejs-move…
Browse files Browse the repository at this point in the history
…-vite

Drop `core-js` and move to vite
  • Loading branch information
susnux committed Jan 24, 2024
2 parents 65a1a93 + f1df73b commit 83aa6e5
Show file tree
Hide file tree
Showing 7 changed files with 2,593 additions and 1,589 deletions.
12 changes: 0 additions & 12 deletions babel.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const _generateUrlPath = (url: string, params?: object, options?: UrlOptions) =>
escape: true,
}, options || {})

const _build = function(text: string, vars: object) {
const _build = function(text: string, vars: Record<string, unknown>) {
vars = vars || {}
return text.replace(/{([^{}]*)}/g,
function(a: string, b: string) {
Expand All @@ -96,7 +96,7 @@ const _generateUrlPath = (url: string, params?: object, options?: UrlOptions) =>
url = '/' + url
}

return _build(url, params || {})
return _build(url, (params || {}) as Record<string, unknown>)
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/oc.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference types="@nextcloud/typings" />

declare interface Window {
OC: Nextcloud.v26.OC | Nextcloud.v27.OC;
OC: Nextcloud.v26.OC | Nextcloud.v27.OC;

// Private state directly from server
_oc_webroot?: string
_oc_appswebroots?: Record<string, string|undefined>
// Private state directly from server
_oc_webroot?: string
_oc_appswebroots?: Record<string, string|undefined>
}

0 comments on commit 83aa6e5

Please sign in to comment.