Skip to content

extractPropsFromTypeAnnotation

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/utils/ast-helpers.ts

Extract props from TypeScript type annotation

Signature

ts
function extractPropsFromTypeAnnotation(typeNode: t.TSType, typeDefinitions: TypeDefinitionMap): PropInfo[]

Parameters

NameType
typeNodet.TSType
typeDefinitionsTypeDefinitionMap

Returns: PropInfo[]

Was this page helpful?

Download as PDF