Comments (2)
No, I don't think so. These enums are different. I'd say enums in TS are a rare exception the fact that TS uses structural typing. Since enums are a slightly obscure feature of TS, I'd say this exception is acceptable and even desired, perhaps.
You can see that they are different by observing that TS will not allow you to assign one to the other.
from conditional-type-checks.
Thanks. That is a plausible explanation. I will close this issue.
from conditional-type-checks.
Related Issues (17)
- Add AssertTrue/AssertFalse HOT 3
- IsAny improvement HOT 2
- Add a function function eq<A, B>(x: IsExact<A, B>) {} HOT 1
- Add constraints to type parameters of `Has` HOT 2
- Unclear how to check for deep equality of nested types HOT 4
- IsExact fails with string enum item and string HOT 1
- Fails with recursive types HOT 3
- IsExactType does not fail for nullable equalling non-nullable HOT 1
- IsExact does not handle `readonly` modifier HOT 1
- docs(): Failure Assertion
- IsAny returns 'boolean' HOT 4
- how do I use this library with jest testing? HOT 10
- Add `HasProperty` HOT 2
- IsExact - Object type where one property type is the `any` type leads to result being true
- IsExact - Optional properties not handled
- Add IsAssignable HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conditional-type-checks.