Add `isEqualType` method?
See original GitHub issueTo ensure a type is correct. Can be useful for testing.
We could use this type for it: https://github.com/sindresorhus/type-fest/blob/98158e0fcb354e36c8aaf4b6808ca1498156f1f4/source/internal.d.ts#L1-L11
Example:
// Type
isEqualType<ExpectedType, ActualType>();
// Value
isEqualType(expectedValue, actualValue);
// Mixed
isEqualType<ExpectedType>()(value);
Thoughts?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9 (7 by maintainers)
Top Results From Across the Web
isEqualTypeAny - Bohemia Interactive Community Wiki
Description: Compares type of given value to every type in the given array and if match is found, true is returned. Groups: Variables....
Read more >Return variables to class format - ARMA 3
Hi. I have this dilemma where I am getting some values off from a class and then I need to return those values...
Read more >IsEqual Methods - RTMath
The IsEqual type exposes the following members. Methods. Name, Description. Public method, Add(Double, Double). Add value to ...
Read more >TestElementProperty (Apache JMeter dist API)
Method. Description. void. addProperty(JMeterProperty prop). Add a property to the ... Methods inherited from class org.apache.jmeter.testelement.property.
Read more >Type - Hitachi Vantara Lumada and Pentaho Documentation
IsEqual. Type ... Adds, overrides or configures properties of this complex type. ... This method does not add the special id and base...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello there @sindresorhus and @bradgarropy, I would try to work on this enhancement. I am clear about
Type
andValue
but I really did not understand theMixed
functions you mentioned above. If you could please give more information on that function, that would be great help!@younho9 I don’t see why it would. It’s about comparing type, not structure.