Skip to content

Commit

Permalink
fix: Do not export the declaration of window.OC
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Jun 14, 2023
1 parent df1a4f9 commit 408acb3
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 27 deletions.
8 changes: 0 additions & 8 deletions lib/index.ts
Expand Up @@ -33,14 +33,6 @@ export { Node } from './files/node'
export { Permission, parseWebdavPermissions } from './permissions'
export { FileAction, registerFileAction, getFileActions } from './fileAction'

declare global {
interface Window {
OC: any;
_nc_newfilemenu: NewFileMenu | undefined;
_nc_fileactions: FileAction[] | undefined;
}
}

/**
* Add a new menu entry to the upload manager menu
*/
Expand Down
14 changes: 14 additions & 0 deletions lib/window.d.ts
@@ -0,0 +1,14 @@
/// <reference types="@nextcloud/typings" />

import { FileAction } from "./fileAction";
import { NewFileMenu } from "./newFileMenu";

export {};

declare global {
interface Window {
OC: Nextcloud.v25.OC | Nextcloud.v26.OC | Nextcloud.v27.OC;
_nc_newfilemenu: NewFileMenu | undefined;
_nc_fileactions: FileAction[] | undefined;
}
}
200 changes: 183 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -50,7 +50,7 @@
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@nextcloud/typings": "^1.6.0",
"@nextcloud/typings": "^1.7.0",
"@rollup-extras/plugin-clean": "^1.2.3",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
@@ -1,5 +1,5 @@
{
"include": ["./lib/**/*.ts", "./lib/**/*.ts"],
"include": ["./lib/**/*.ts"],
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
Expand Down

0 comments on commit 408acb3

Please sign in to comment.