meteor / meteor/validated-method

types for lacosta-method-hooks mixin are missing

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
193
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Hello, I am using `lacosta:method-hooks` **mixin** for my validated methods and I am also using **typescript**, but I am getting an error related to types definitions because validated-method types don't recognize beforeHooks and afterHooks properties in options object of the validated method. So, I was wondering if anyone knows how to create a type's definition for this package of `lacosta:method-hooks`.

![image](https://user-images.githubusercontent.com/39581375/133943399-01303f50-0b66-4fbd-ba6d-be9d93e0c1b0.png)

Btw, I am using `@types/meteor-mdg-validated-method` correctly in my **tsconfig.json** file:

```json
...
"types": ["node", "mocha", "jest",
"@types/meteor-collection-hooks",
"@types/meteor-dburles-collection-helpers",
"@types/meteor-mdg-validated-method"
],
...
```

So, it just missing to fix that error about mixins.

I will be very glad about that.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the TypeScript error described in tsconfig.json when using lacosta:method-hooks with @types/meteor-mdg-validated-method. Inspect how validated-method option types are declared and determine what is needed for beforeHooks and afterHooks to be accepted. Done means the mixin properties type-check without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.