Skip to content

types(schema): allow post('init') #15413

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

Merged
merged 2 commits into from
May 9, 2025
Merged

types(schema): allow post('init') #15413

merged 2 commits into from
May 9, 2025

Conversation

vkarpov15
Copy link
Collaborator

Fix #15412
Re: #15333

Summary

#15333 unintentionally removed support for post('init') hooks from TypeScript. Add that back.

Examples

@vkarpov15 vkarpov15 added this to the 8.14.3 milestone May 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request reintroduces support for post('init') hooks in TypeScript by adding a dedicated test case.

  • Added a new test function (gh15412) verifying the types in a post('init') hook on a Schema.
  • Updated import statements to include CallbackWithoutResultAndOptionalError.
Comments suppressed due to low confidence (1)

test/types/schema.test.ts:1782

  • [nitpick] Consider renaming gh15412 to a more descriptive test name (e.g., testPostInitHook) to clearly indicate the purpose of the test.
function gh15412() {

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, aside from lint failing.

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label May 9, 2025
@vkarpov15 vkarpov15 merged commit 7f0d4ce into master May 9, 2025
6 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-15412 branch May 9, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating from 8.13.2 to 8.14.1 breaks post init hook
2 participants