dsherret / ts-morph

TypeScript Compiler API wrapper for static analysis and programmatic code changes.

Home Page:https://ts-morph.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

properties from type inference

mshkpchv opened this issue · comments

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

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

export type IAccountUpdatedPayload = z.infer<typeof accSchema >;

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