8000 Complement standard schema type by samchon · Pull Request #1581 · samchon/typia · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Complement standard schema type #1581

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 8, 2025
Merged

Conversation

samchon
Copy link
Owner
@samchon samchon commented May 8, 2025

This pull request introduces the use of the _createStandardSchema utility to wrap validation functions, enhancing standardization and consistency across the codebase. It also includes updates to the test files to integrate this utility and adds a new debug test for validation functionality.

Integration of _createStandardSchema:

  • Modified the return type of _createStandardSchema in src/internal/_createStandardSchema.ts to include StandardSchemaV1, enabling schema standardization.

Updates to generated test files:

  • Updated test/generate/output/generate_index.ts and test/generate/output/generate_plain.ts to import _createStandardSchema and apply it to validation functions (validate, validateEquals, createValidate, createValidateEquals). These changes ensure that all validation functions are wrapped with the standardized schema utility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

New debug test:

  • Added a new debug test in test/src/debug/standard-schema.ts to validate the functionality of _createStandardSchema by testing a simple validation case for a number.

@samchon samchon requested a review from Copilot May 8, 2025 07:31
@samchon samchon self-assigned this May 8, 2025
@samchon samchon added the enhancement New feature or request label 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 enhances validation consistency across the codebase by integrating the _createStandardSchema utility to wrap validation functions. Key changes include the update of the _createStandardSchema return type, the modification of generated test files (generate_index.ts and generate_plain.ts) to wrap validation functions using the utility, and the addition of a new debug test to validate this functionality.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/src/debug/standard-schema.ts Added a simple debug test to verify the functionality of the wrapped validation function.
test/generate/output/generate_plain.ts Modified to import and use _createStandardSchema when defining createValidate and createValidateEquals.
test/generate/output/generate_index.ts Updated to wrap validation functions with _createStandardSchema for standardization.
src/internal/_createStandardSchema.ts Enhanced the return type to include StandardSchemaV1, aligning the utility with schema standards.

Copy link
pkg-pr-new bot commented May 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/typia@1581

commit: 6464487

@samchon samchon merged commit fab6d7e into master May 8, 2025
10 checks passed
@samchon samchon deleted the feat/complement-standard-schema branch May 8, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0