add typescript generic type to functions to ensure type check#2075
Open
amir-khoshbakht wants to merge 408 commits intomasterfrom
Open
add typescript generic type to functions to ensure type check#2075amir-khoshbakht wants to merge 408 commits intomasterfrom
amir-khoshbakht wants to merge 408 commits intomasterfrom
Conversation
typestack-ci
previously approved these changes
May 5, 2023
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 5, 2023
|
@dependabot squash and merge |
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 8, 2023
typestack-ci
previously approved these changes
May 8, 2023
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 8, 2023
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 9, 2023
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 9, 2023
|
@dependabot squash and merge |
|
@dependabot squash and merge |
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
May 7, 2024
typestack-ci
previously approved these changes
May 8, 2024
|
@dependabot squash and merge |
typestack-ci
previously approved these changes
Jun 16, 2024
|
@dependabot squash and merge |
* fix: fill base64 options correctly pass the constraint to the isBase64 function add unit test IsBase64 options * refactor: pass options by name --------- Co-authored-by: Brage Sekse Aarset <brage.aarset@gmail.com>
* fix: update version in package-lock.json * fix: pass options to isBase64 correctly
* update validator to 13.15.20 * update
typestack-ci
previously approved these changes
Nov 24, 2025
|
@dependabot squash and merge |
typestack-ci
approved these changes
Dec 2, 2025
|
@dependabot squash and merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
as you can see there is a union type which consists of two strings "aaa" and "bbb".
I need to get sure that class property is one of allowed values. This is done in three ways in the following section.
The first method: does not have the necessary efficiency and even though there is no "bad" option in the type, it does not show an error
the second method: In this case, all the options should be available in the type ((unionType)), and this case is desirable
References
the expected method :
If the generic type is added to these functions, the correctness of the type can be ensured directly without defining the secondary function.
note: function "as" is custom function above
