Skip to content

Commit 056d68f

Browse files
committed
fix(capacitor): updating capacitor types to 7.0.0
1 parent 8eaeb22 commit 056d68f

File tree

3 files changed

+48
-36
lines changed

3 files changed

+48
-36
lines changed

core/package-lock.json

Lines changed: 35 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
},
3838
"devDependencies": {
3939
"@axe-core/playwright": "^4.10.0",
40-
"@capacitor/core": "^6.0.0",
41-
"@capacitor/haptics": "^6.0.0",
42-
"@capacitor/keyboard": "^6.0.0",
43-
"@capacitor/status-bar": "^6.0.0",
40+
"@capacitor/core": "^7.0.0",
41+
"@capacitor/haptics": "^7.0.0",
42+
"@capacitor/keyboard": "^7.0.0",
43+
"@capacitor/status-bar": "^7.0.0",
4444
"@clack/prompts": "^0.10.0",
4545
"@ionic/eslint-config": "^0.3.0",
4646
"@ionic/prettier-config": "^2.0.0",

core/src/utils/native/capacitor.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import type { CapacitorGlobal } from '@capacitor/core';
22
import { win } from '@utils/browser';
33

4+
type CustomCapacitorGlobal = CapacitorGlobal & {
5+
// Capacitor from @capacitor/core no longer exports Plugins, but we're pulling
6+
// Capacitor from window.Capacitor, which does
7+
Plugins: {
8+
[key: string]: any;
9+
};
10+
};
11+
412
export const getCapacitor = () => {
513
if (win !== undefined) {
6-
return (win as any).Capacitor as CapacitorGlobal;
14+
return (win as any).Capacitor as CustomCapacitorGlobal;
715
}
816
return undefined;
917
};

0 commit comments

Comments
 (0)