Describe the bug
Version: 27.0.2
To Reproduce
source file test.ts:
analysis file:
import { Project } from 'ts-morph';
const project = new Project({
tsConfigFilePath: '../tsconfig.json',
});
const sourceFile = project.getSourceFileOrThrow('./test.ts');
const TestType = sourceFile.getTypeAliasOrThrow('TestType').getType();
console.log(
`TestType.getText(): "${TestType.getText()}", TestType.isUnknown(): ${TestType.isUnknown()}`,
);
console.log(
`TestType.getNonNullableType().getText(): "${TestType.getNonNullableType().getText()}", TestType.getNonNullableType().isUnknown(): ${TestType.getNonNullableType().isUnknown()}`,
);
Current behavior
TestType.getText(): "unknown", TestType.isUnknown(): true
TestType.getNonNullableType().getText(): "{}", TestType.getNonNullableType().isUnknown(): false
Expected behavior
TestType.getText(): "unknown", TestType.isUnknown(): true
TestType.getNonNullableType().getText(): "unknown", TestType.getNonNullableType().isUnknown(): true
Describe the bug
Version: 27.0.2
To Reproduce
source file
test.ts:analysis file:
Current behavior
Expected behavior