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

topic missing in type ProviderOptions #141

Open
mathieulb opened this issue May 3, 2024 · 6 comments
Open

topic missing in type ProviderOptions #141

mathieulb opened this issue May 3, 2024 · 6 comments

Comments

@mathieulb
Copy link

I had to do this when declaring ParseServerConfig in my app, because the topic field is missing :

declare module 'parse-server' {
  import type {ProviderOptions} from '@parse/node-apn'
  ...
  type ParseServerConfig = {
    ...
    push: {
      android: {senderId: string, apiKey: string},
      ios: (ProviderOptions & {topic?:string})[],
    }
    ...
  }
}
Copy link

Thanks for opening this issue!

@mtrezza
Copy link
Member

mtrezza commented May 3, 2024

Could you please add a full issue description?

@mathieulb
Copy link
Author

There is no template for issues in this repo, unlike for the other parse repos I've submitted issues to, but this is purely a Typescript declaration issue, so, it can't have anything to do with my version of MongoDB.

I don't know what you need to know in addition to what I said. I am using @parse/node-apn 6.0.1 and I see that master branch of @parse/node-apn is also lacking this field in /index.d.ts.

@mathieulb
Copy link
Author

In index.d.ts, in export interface ProviderOptions {...}, insert this line :

 topic?:string

@mathieulb
Copy link
Author

Actually, sorry, topic isn't actually a field that goes there at that level. Like most Parse users, I'm configuring this through new ParseServer. Today I've searched parse, parse-server and @parse/node-apn for topic, push, ios and Provider, and didn't find anything relevant, then I realised that I hadn't searched @parse/push-adapter yet, and there it is. The problem I am trying to solve from the start, is to compensate for the lack of type declarations in parse-server, but in this case, the push section has a type that should be defined in @parse/push-adapter instead (a project that also has no type declarations).

@mtrezza
Copy link
Member

mtrezza commented May 6, 2024

Yes, only few repos have started converting to TS; please feel free to open an issue or PR in the respective repo.

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

No branches or pull requests

2 participants