Skip to content

QuestionDotToken being stripped out? #5

@johnjenkins

Description

@johnjenkins

Hi there - Thanks for your hard work on this - it's a lifesaver!
One potential snag I've run into is: on clone, QuestionDotTokens are stripped out meaning optional chaining doesn't work in the final, compiled code.

Example:

// original node
this.person?.hasEMailAddress?.emailAddress

...
// during transform
import { cloneNode } from "ts-clone-node";
...
cloneNode(node, { typescript: ts });
...

Cloned node:

this.person.hasEMailAddress.emailAddress

If you could take a look into this or point me in a direction, I'd be most obliged!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions