dsherret / dsherret/ts-morph

properties from type inference

Open
#1,492 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

I am creating using 'zod' for validation and type creation.

```typescript
const accSchema = z.object({
companyName: z.string(),
email: z.string().email(),
demo: z.boolean(),
});

export type IAccountUpdatedPayload = z.infer;

```

using ts-morph, I want to retrieve the properties for IAccountUpdatedPayload, but it does not return any.
I get the TypeAliasDeclaration, but I could not retrieve any valuable information from it

Contributor guide

Open the contributing guide

Research direction

No repository files or tests are named. Start by reproducing the TypeAliasDeclaration case with the shown z.infer example and inspect how ts-morph resolves its type; done should include a defined way to retrieve the inferred account properties, with coverage for the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.