Skip to content

Commit a285891

Browse files
TommertomTommertom
Tommertom
authored and
Tommertom
committed
added typings
1 parent 02afe5f commit a285891

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Change Log Ionic-Svelte-NPM
22
All notable changes to this project will be documented in this file.
33

4-
## 0.62/63/64/65/66/67
4+
## 0.5.68
5+
- added some typings for platform functions
6+
7+
## 0.5.62/63/64/65/66/67
58
- removed typescript in *.svelte components as Vite does not process them (but does process *.ts)
69
- removed IonTabsLegacy.svelte - can still be found here https://github.com/Tommertom/svelte-ionic-app/blob/main/src/IonTabsLegacy.svelte for manual inclusion
710

index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,27 @@ export {
5050
toastController
5151
} from "@ionic/core";
5252

53+
// platforms
54+
declare const PLATFORMS_MAP: {
55+
[key: string]: boolean;
56+
};
57+
58+
declare type Platforms = keyof typeof PLATFORMS_MAP;
59+
60+
export function getPlatforms(win?: any): string[];
61+
export function setupPlatforms(win: any);
62+
63+
interface IsPlatformSignature {
64+
(plt: Platforms): boolean;
65+
(win: Window, plt: Platforms): boolean;
66+
}
67+
export function isPlatform(
68+
winOrPlatform: Window | Platforms | undefined,
69+
platform?: Platforms
70+
): IsPlatformSignature;
71+
72+
export function testUserAgent(win: Window, expr: RegExp);
73+
5374
// not exported by @ionic/core
5475
export type NavigationHookResult = boolean | NavigationHookOptions;
5576
export interface NavigationHookOptions {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ionic-svelte",
3-
"version": "0.5.67",
3+
"version": "0.5.68",
44
"private": false,
55
"homepage": "https://ionicsvelte.firebaseapp.com",
66
"repository": {

0 commit comments

Comments
 (0)