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

add TypeScript declaration file #44

Merged
merged 1 commit into from
Sep 30, 2021
Merged

add TypeScript declaration file #44

merged 1 commit into from
Sep 30, 2021

Conversation

rwalle61
Copy link
Contributor

For #43

To test this I did npm pack to check that the index.d.ts is included, and used the module locally and checked that ts-jest is happy with it and VSCode reads it correctly.

Let me know if any changes are needed 🙂

@WaleedAshraf WaleedAshraf merged commit 8e2f4ca into WaleedAshraf:master Sep 30, 2021
@rwalle61 rwalle61 deleted the add-typescript-declaration-file branch October 1, 2021 09:34
@joerg-walter-de
Copy link

joerg-walter-de commented Oct 22, 2021

  type Validator = {
    validate: (
      key: string,
      payload: unknown,
      channel: string,
      operation: 'publish' | 'subscribe',
    ) => void;
  };

Return type seems to be boolean

https://github.com/WaleedAshraf/asyncapi-validator/blob/master/src/MessageValidator.js#L38

@WaleedAshraf
Copy link
Owner

@joerg-walter-de Yes. It'll return true or throw an error. Good catch. Can you open a PR to fix this?

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

Successfully merging this pull request may close these issues.

4 participants