Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Mar 28, 2024
1 parent 1574553 commit 7d04c60
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ The first step is to define a type for all the events.
type Events = {
saving: [
[BaseModel], // for hook handler
[error: Error | null, BaseModel] // for cleanup function
[error: Error | null, BaseModel], // for cleanup function
]
finding: [
[QueryBuilder], // for hook handler
[error: Error | null, QueryBuilder] // for cleanup function
[error: Error | null, QueryBuilder], // for cleanup function
]
}
```
Expand All @@ -179,12 +179,9 @@ const hooks = new Hooks<Events>()

[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/poppinss/hooks/checks.yml?style=for-the-badge
[gh-workflow-url]: https://github.com/poppinss/hooks/actions/workflows/checks.yml 'Github action'

[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[typescript-url]: "typescript"

[npm-image]: https://img.shields.io/npm/v/@poppinss/hooks.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@poppinss/hooks 'npm'

[license-image]: https://img.shields.io/npm/l/@poppinss/hooks?color=blueviolet&style=for-the-badge
[license-url]: LICENSE.md 'license.'
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@
"author": "virk,poppinss",
"license": "MIT",
"devDependencies": {
"@adonisjs/eslint-config": "^1.2.0",
"@adonisjs/prettier-config": "^1.2.0",
"@adonisjs/tsconfig": "^1.2.0",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@japa/assert": "^2.0.1",
"@japa/expect-type": "^2.0.0",
"@japa/runner": "^3.1.0",
"@swc/core": "^1.3.100",
"@types/node": "^20.10.4",
"c8": "^8.0.1",
"@adonisjs/eslint-config": "^1.3.0",
"@adonisjs/prettier-config": "^1.3.0",
"@adonisjs/tsconfig": "^1.3.0",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@japa/assert": "^2.1.0",
"@japa/expect-type": "^2.0.1",
"@japa/runner": "^3.1.1",
"@swc/core": "^1.4.11",
"@types/node": "^20.11.30",
"c8": "^9.1.0",
"cross-env": "^7.0.3",
"del-cli": "^5.1.0",
"eslint": "^8.55.0",
"eslint": "^8.57.0",
"github-label-sync": "^2.3.1",
"husky": "^8.0.3",
"np": "^9.2.0",
"prettier": "^3.1.1",
"husky": "^9.0.11",
"np": "^10.0.2",
"prettier": "^3.2.5",
"ts-node": "^10.9.2",
"tsup": "^8.0.1",
"typescript": "^5.3.3"
"tsup": "^8.0.2",
"typescript": "^5.4.3"
},
"repository": {
"type": "git",
Expand Down
5 changes: 2 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ export type HookHandler<Args extends any[], CleanUpArgs extends any[]> = (
/**
* Extracts args from a hook handler type
*/
export type ExtractHookHandlerArgs<Handler> = Handler extends HookHandler<infer A, infer B>
? [A, B]
: never
export type ExtractHookHandlerArgs<Handler> =
Handler extends HookHandler<infer A, infer B> ? [A, B] : never

/**
* Hook represented as an object with handle method
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"rootDir": "./",
"outDir": "./build"
}
}
}

0 comments on commit 7d04c60

Please sign in to comment.