You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was just searching for some type testing lib and came across this nice project.
I did some quick nesting tests, so please correct me if I'm wrong.
I'm not sure if this is intentional, but here's an example to give you a better idea of what I mean:
Passes
import{expectTypeOf}from'expect-type'typeTest={object: {object: {number: numberstring: stringboolean: booleanobject: {number: numberstring: stringboolean: boolean}}}}typeTestNotEqual={object: {object: {number?: numberobject?: {number?: number}}}}expectTypeOf<Test>().toEqualTypeOf<TestNotEqual>()// this passes the test and does not report an error
Not Passes
import{expectTypeOf}from'expect-type'typeTest={object: {string: stringobject: {object: {number: number}}}}typeTestNotEqual={object: {number: number// registers the number as an error since it should be a string, which is expectedobject: {object: {number: number}}}}expectTypeOf<Test>().toEqualTypeOf<TestNotEqual>()// this fails the test and throws an error
The text was updated successfully, but these errors were encountered:
Hi, I was just searching for some type testing lib and came across this nice project.
I did some quick nesting tests, so please correct me if I'm wrong.
I'm not sure if this is intentional, but here's an example to give you a better idea of what I mean:
Passes
Not Passes
The text was updated successfully, but these errors were encountered: