ts-morph
ts-morph copied to clipboard
No MappedTypeNode definition in ts-morph
Is your feature request related to a problem? Please describe.
No MappedTypeNode definition in ts-morph. No TypeQueryNode definition in ts-morph. No TypeOperatorNode definition in ts-morph.
Is this still open? In case, I would like to help :) However, since it would be my first contribution, can you give me some more guidance?
@nicdard yup and that would be great!
- Create a basic wrapped
MappedTypeNode
in this directory: https://github.com/dsherret/ts-morph/tree/latest/packages/ts-morph/src/compiler/ast/type (base should beTypedNode
... see here for the typescript AST node: https://github.com/dsherret/ts-morph/blob/1dc592141432f8e0541b7b6211f7edf8ad205e5a/packages/common/lib/typescript.d.ts#L947) - Update https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/src/factories/kindToWrapperMappings.ts to have the mapping from
ts.SyntaxKind.MappedType
toMappedTypeNode
. - Run
yarn code-generate
in packages/ts-morph. This will generate a lot of the code for you. - Start adding helper methods and write tests for these methods similar to how the other nodes are done.
Maybe just start with methods for navigation then after if you would like you can do methods for manipulating the text.
Thank you for the guidance and fast answer! I'll try my best!