Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority type is not exported from Typescript definitions file #23

Open
daggilli opened this issue Dec 20, 2024 · 0 comments
Open

Priority type is not exported from Typescript definitions file #23

daggilli opened this issue Dec 20, 2024 · 0 comments

Comments

@daggilli
Copy link

daggilli commented Dec 20, 2024

The Priority type is not exported from lib/pushover.d.ts. This means it cannot be used as a type in Typescript code, even though it is used to type the corresponding parameter in setPriority(). I have to redeclare it in my code, which is ugly.

Solution: change declare type Priority = -2 | -1 | 0 | 1 | 2; to export declare type Priority = -2 | -1 | 0 | 1 | 2; in lib/pushover.d.ts. The entirety of the change looks like this:

import { IResponse } from './request';
-declare type Priority = -2 | -1 | 0 | 1 | 2;
+export declare type Priority = -2 | -1 | 0 | 1 | 2;
export interface INotificationData {

The same applies to the Sound type.

I can create a pull request if given access permission, although the change it so trivial it hardly seems necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant