Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit 8ebfdad

Browse files
natsukagamitheLufenk
authored andcommitted
Update typings for default export and config (#189)
1) Typescript restricts the use of expressions directly in an export statement. Updated to a proper way of making a DTS. 2) Added return type declaration to `config`
1 parent 9ad9572 commit 8ebfdad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
declare module 'push.js' {
22

3-
export default new Push();
3+
const defaultPush: Push;
4+
export default defaultPush;
45

56
class Push {
67
Permission: PushPermission;
@@ -11,7 +12,7 @@ declare module 'push.js' {
1112

1213
clear(): void;
1314

14-
config(params: PushParams)
15+
config(params: PushParams): void;
1516
}
1617

1718
export interface PushNotificationParams {

0 commit comments

Comments
 (0)