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
import{Project}from"ts-morph";constproject=newProject();constsourceFile=project.createSourceFile("test.ts",``);it("Type.prototype.isNever() returns true for a never type",()=>{constneverPropertyNode=sourceFile.getTypeAliasOrThrow("neverProperty");constneverPropertyType=neverPropertyNode.getType();constillegalType=neverPropertyType.getProperty("illegal").getTypeAtLocation(neverPropertyNode);// throws because Type doesn't have an `isNever()` method`expect(illegalType.isNever()).toBe(true);expect(neverPropertyType.isNever()).toBe(false);});
Expected behavior
illegalType.isNever() should return true. neverPropertyType.isNever() should return false.
The text was updated successfully, but these errors were encountered:
Describe the bug
Version: 15.1.0
https://ts-morph.com/details/types#telling-type
To Reproduce
Expected behavior
illegalType.isNever()
should return true.neverPropertyType.isNever()
should return false.The text was updated successfully, but these errors were encountered: