Skip to content

Fix type of schema passed to alter functions#2521

Merged
hueniverse merged 1 commit intohapijs:masterfrom
matthieusieben:patch-1
Dec 29, 2020
Merged

Fix type of schema passed to alter functions#2521
hueniverse merged 1 commit intohapijs:masterfrom
matthieusieben:patch-1

Conversation

@matthieusieben
Copy link
Contributor

@matthieusieben matthieusieben commented Dec 4, 2020

In typescript:

const schema = Joi.object().alter({
  foo: (schema) => schema.keys() // error: Property 'keys' does not exist on type 'Schema'.
})

```ts
const schema = Joi.object().alter({
  foo: (schema) => schema.keys() // error: Property 'keys' does not exist on type 'Schema'.
})
```
@hueniverse hueniverse merged commit bd2d369 into hapijs:master Dec 29, 2020
@hueniverse hueniverse self-assigned this Dec 29, 2020
@hueniverse hueniverse added bug Bug or defect types TypeScript type definitions labels Dec 29, 2020
@hueniverse hueniverse added this to the 17.3.1 milestone Dec 29, 2020
@matthieusieben matthieusieben deleted the patch-1 branch January 9, 2021 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug or defect types TypeScript type definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants