David Sherret

Results 785 comments of David Sherret

@jon9090 in the example you posted I get `Cannot find name 'run'.` since `run` is not defined. That said, once I define a `run` function it still returns a flow...

If you have the AST node, there is a way to get this by calling `getElements()` on the node: https://github.com/dsherret/ts-morph/blob/c494733a73abe4e2d65aa922d4fdbfd92b926ad3/packages/ts-morph/lib/ts-morph.d.ts#L8898 That said, from the type, it looks like there is...

@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: https://github.com/dsherret/ts-morph/blob/1dc592141432f8e0541b7b6211f7edf8ad205e5a/packages/common/lib/typescript.d.ts#L947) 2....

Hi @19majkel94, sorry for the delay in my reply. In order to implement this properly, I believe a new program, type checker, and language service would need to be created...

Hey @Anonyfox, JSX/TSX support is definitely planned along with the features you mentioned. The lack of JSX support really stands out in [this report](https://github.com/dsherret/ts-simple-ast/blob/master/wrapped-nodes.md#not-exist). At the current moment, you can...

Unfortunately this is now blocked by #249 because there's a new supported language feature called [jsx fragments](https://reactjs.org/blog/2017/11/28/react-v16.2.0-fragment-support.html) that's only in 2.7.1. I'll try to get #249 done sometime this week....

Ok, #249 is implemented and these nodes are wrapped and available now. I'll implement manipulating them soon.

Hey @Anonyfox, I'll have at least a `setBodyText` method up late tomorrow. Today I did some internal refactoring for this (basically, I'm trying to use [code-block-writer](https://github.com/dsherret/code-block-writer) more internally and it's...

@Anonyfox there's now a `.setBodyText(...)` and `.setBodyTextInline(...)` method on `JsxElement` (in v8.2.0). I'll slowly add other methods (like adding/inserting/deleting jsx attributes and converting elements to self closing elements and vice...

@ryanhaney thanks for the compliments! Yeah, I had stopped working on this because I wasn't sure about how to deal with these whitespace JSXText elements: https://ts-ast-viewer.com/#code/MYewdgzgLgBFCm0YF4YB4CiAbeBbeYUAfALABQMl62eBsA9KWWvTfoUQNxA I think I know...