Skip to content

v2.0.0: type inference and transformation

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 04 Sep 14:28
55efb0d
type inference implemented. Now intersection types in your TypeScript code will be transformed into type guard signatures.
This functionality can help you infer type guard signatures for complex types, making your TypeScript code more expressive and maintainable.
```typescript
const inputCode = `
type IntersectionType = TypeA & TypeB;
type TypeA = { a: string };
type TypeB = { b: number };
`;
const transformedCode = transformer(inputCode);
console.log(transformedCode);
// type IntersectionType = {};
// type TypeA = { a: string };
// type TypeB = { b: number };
```