Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No MappedTypeNode definition in ts-morph #769

Open
ooyyloo opened this issue Dec 2, 2019 · 3 comments
Open

No MappedTypeNode definition in ts-morph #769

ooyyloo opened this issue Dec 2, 2019 · 3 comments

Comments

@ooyyloo
Copy link

ooyyloo commented Dec 2, 2019

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.

@ooyyloo ooyyloo changed the title No MappedTypeNode definition in ts-motph No MappedTypeNode definition in ts-morph Dec 2, 2019
@nicdard
Copy link
Contributor

nicdard commented Apr 15, 2021

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?

@dsherret
Copy link
Owner

dsherret commented Apr 15, 2021

@nicdard yup and that would be great!

  1. 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 be TypedNode... see here for the typescript AST node:
    export interface MappedTypeNode extends TypeNode, Declaration {
    )
  2. Update https://github.com/dsherret/ts-morph/blob/latest/packages/ts-morph/src/factories/kindToWrapperMappings.ts to have the mapping from ts.SyntaxKind.MappedType to MappedTypeNode.
  3. Run yarn code-generate in packages/ts-morph. This will generate a lot of the code for you.
  4. 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.

@nicdard
Copy link
Contributor

nicdard commented Apr 15, 2021

Thank you for the guidance and fast answer! I'll try my best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants