-
-
Notifications
You must be signed in to change notification settings - Fork 6
👍 Add isUnknown predicate function
#44
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
Conversation
WalkthroughThe update introduces a new function Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (2)
- is.ts (2 hunks)
- is_test.ts (2 hunks)
Additional comments: 2
is.ts (1)
- 515-521:
If the implementation ofisUnknownis not corrected, its utility when exported should be reconsidered, as it may not provide meaningful functionality.is_test.ts (1)
- 36-42:
The export list correctly includes the newisUnknownfunction.
| Deno.test("isUnknown", async (t) => { | ||
| await testWithExamples(t, isUnknown, { | ||
| validExamples: [ | ||
| "string", | ||
| "number", | ||
| "bigint", | ||
| "boolean", | ||
| "array", | ||
| "record", | ||
| "syncFunction", | ||
| "asyncFunction", | ||
| "null", | ||
| "undefined", | ||
| "symbol", | ||
| "date", | ||
| "promise", | ||
| ], | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test case for isUnknown is incorrectly expecting true for all known types, which contradicts the intended functionality of the function. The test should be set up to expect false for known types and true for unknown types.
SSIA
Summary by CodeRabbit
New Features
isUnknowncheck to enhance type validation capabilities.Tests
isUnknownfunction to ensure reliability.