#53 basic ts guards#54
Merged
Merged
Conversation
- @shiftcode/logger@3.0.1-pr53.0 - @shiftcode/utilities@4.1.0-pr53.0
- @shiftcode/logger@3.0.1-pr53.1 - @shiftcode/utilities@4.1.0-pr53.1
Member
Author
|
@michaellieberherr you mentioned a ts library once, but I can't remember which one it was. Should we use an existing one or what's your thoughts? |
There was a problem hiding this comment.
Pull Request Overview
This PR adds basic TypeScript type guard functions for commonly used type checks including isString, isNumber, isDefined, isDate, isClass, isBoolean, and isArray.
- Introduces seven new type guard functions with proper TypeScript type predicates
- Includes comprehensive test coverage for all guard functions
- Updates package versions and dependencies to support the new functionality
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/utilities/src/lib/ts-guards/*.ts | Implementation of type guard functions with TypeScript predicates |
| packages/utilities/src/lib/ts-guards/*.spec.ts | Comprehensive test suites for each type guard function |
| packages/utilities/src/index.ts | Exports for the new type guard functions |
| packages/utilities/package.json | Version bump to include new features |
| packages/logger/package.json | Dependency version updates to match utilities package |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- @shiftcode/logger@3.0.1-pr53.2 - @shiftcode/utilities@4.1.0-pr53.2
- @shiftcode/logger@3.0.1-pr53.3 - @shiftcode/utilities@4.1.0-pr53.3
- @shiftcode/branch-utilities@5.0.1-pr53.0 - @shiftcode/eslint-config-recommended@5.0.1-pr53.0 - @shiftcode/eslint-plugin-rules@4.0.1-pr53.0 - @shiftcode/logger@3.0.1-pr53.4 - @shiftcode/publish-helper@4.1.1-pr53.0 - @shiftcode/utilities@4.1.0-pr53.4
- @shiftcode/branch-utilities@5.0.1-pr53.1 - @shiftcode/eslint-config-recommended@5.0.1-pr53.1 - @shiftcode/eslint-plugin-rules@4.0.1-pr53.1 - @shiftcode/logger@3.0.1-pr53.5 - @shiftcode/publish-helper@4.1.1-pr53.1 - @shiftcode/utilities@4.1.0-pr53.5
mumenthalers
approved these changes
Sep 9, 2025
Contributor
|
lgtm ❤️ |
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.
This pull request introduces a new standardized Prettier formatting check across all packages and the CI workflow, along with several improvements to type guard utilities in the
@shiftcode/utilitiespackage. It also includes version bumps and dependency updates for multiple packages. The most important changes are grouped below.Prettier Formatting Standardization:
prettier:checkscript to the rootpackage.jsonand all package-levelpackage.jsonfiles, enabling consistent formatting checks for TypeScript files. [1] [2] [3] [4] [5] [6] [7].github/workflows/main.ymlto run the new Prettier check as part of the build process.Type Guard Utility Enhancements (
@shiftcode/utilities):isArray,isBoolean,isClass,isDate,isDefined,isNumber, andisStringinpackages/utilities/src/lib/ts-guards/, with corresponding exports and tests. [1] [2] [3] [4] [5] [6] [7] [8] [9]