* Remove SymbolWriter, give methods to EmitTextWriter
* Unification of writers is done-ish
* Make node builder support more flags
* Write out mixins like we used to
* Accept prototype-free baselines
* Use instantiated constraint when building mapped type nodes
* Accept better mapped type baselines
* Report inaccessible this in node builder
* Turns out there was a bug in our codefix, too
* Symbol display builder usage falling
* Replace signatureToString with a nodeBuilder solution
* Replace the last internal usages of the symbol writer
* Accept semicolon additions
* Accept updated symbol baseline output
* Start using node builder for some LS operations
* Remove those pesky trailing semicolons on signatures
* Get signature printing much closer to old output
* Parameter lists should not be indented by default, especially when single-line
* Signatures up to snuff
* Type quickinfo emit is up to snuff
* Start of symbol writer replacement, needs a bit more for full compat
* Slightly mor accurate to old behavior
* Replicate qualified name type argument output correctly
* Bring back the old symbol baselines
* Mostly identical to old symbol emit now
* Perfectly matches old behavior thus far
* Replace another usage of the symbol builder
* Another usage removed
* Another usage removed
* Remove final uses of symbol display builder
* Remove implementation and types for unused symbol display builder
* Cleanup in the checker
* monomorphize new emitter code
* Replace emitWithSuffix
* Push space character to interface with writer
* List emit
* Fix lack of usage of emitExpression
* writeList, not printList
* Remove listy writes and replace with new printer calls
* Move ListFormat into types.ts
* Remove most new XToString functions in favor of node builder functions
* Accept API breaks
* Add getSymbolDisplayBuilder polyfill
* Accept updated API baseline
* Move definition to make diff easier to read
* Reinternalize some things
* Remove trailign whitespace
* Reorder for zero diff
* Remove newline
* Make shim mor eperfectly imitate old behavior
* Style feedback
* Rename reset to clear to maintain backcompat with SymbolWriter
* Fix quickfix
* Keep EmitTextWriter internal
* Remove EmitTextWriter from public API
* Mimic default name declaration emit fix
* Fix tests broken by merge
* use isFunctionLike
* Cleanup, sync TypeFormat and NodeBuilder flags
* Reorder Node initialization so pos and end are first, so a TextRange hidden class is made first to reduce future polymorphism
* Use variable instead of ternary
* Write helper for emitNodeWithWriter
* Emitter cleanup
* Cleanup whitespace, comment
* Reuse printer
* Raise error if display parts writer uses rawWrite
* Hide writer parameter through different function instead of overload, rename function in emitter
* Make less printer
* fix lint
* Revised emit for computed property names
* Fix downlevel name generation scopes
* Accept slightly more conservative baseline
* First feedback pass
* Reduce number of nonrequired variable declarations and assignments
* Remove side-effect-free identifier references
* skip partially emitted expressions
* Comments, move starsOnNewLine to emitNode
* Put expressions on newlines when inlined in class expressions for consistency
* Update new ref
* Fix typo in comment
When the caret is on a Typescript declaration that has no type, but does
have a JSDoc annotation with a type, this refactor will add the
Typescript equivalent of the JSDoc type.
Notes:
1. This doesn't delete the JSDoc comment or delete parts of it. In fact,
due to bugs in trivia handling, it sometimes duplicates the comment.
These bugs are tracked in #18626.
2. As a bonus, when `noImplicitAny: true`, this shows up as a code fix in VS Code
whenever there is a no-implicit-any error. With `noImplicityAny: false`,
this code must be invoked via the refactoring command.
* Ensure that emitter calls calbacks
* Move new parameter to end of parameters
* Fix for ConditionalExpression
* Make suggested changes to emitter
* Fix parameter ordering
* Respond to minor comments
* Remove potentially expensive assertion
* More emitter cleanup
* Fix many no-object-literal-type-assertion lint errors
* Simple fixes
* Use a union for FlowNode
* PR feedback and remove remaining `id()` uses
* Use a union for CodeBlock
* Discriminate CodeBlock by CodeBlockKind
* Retain comments inside return statements by including the return keyword in the parse tree
* Revert "Retain comments inside return statements by including the return keyword in the parse tree"
This reverts commit 5d2142edb1.
* Readd test
* Function for handling printing comments on a token
* Add 'name' property to Identifier
* Rename to unescapedText
* Rename 'id.text' to 'id.escapedText'
* Rename 'id.unescapedText' to 'id.text'
* Make escapeIdentifier and unescapeIdentifier do nothing
* Created a branded type for escaped strings
Then flowed it throughout the compiler, finding and fixing a handful of
bugs relating to underscore-prefixed identifiers in the process.
Includes a test for two cases noticed - diagnostics from conflicting
symbols from export *'s, and enum with underscore prefixed member emit.
* Correctly double underscores WRT mapped types
* Add fourslash tests for other fixed issues
* use function call over cast
* Update forEachEntry type accuracy
* Just use escaped names for ActiveLabel
* Remove casts from getPropertyNameForPropertyNameNode
* This pattern has occurred a few times, could use a helper function.
* Remove duplicated helper
* Remove unneeded check, use helper
* Identifiers list is no longer escaped strings
* Extract repeated string-getting code into helper
* Rename type and associated functions
* Make getName() return UnderscoreEscapedString, add getUnescapedName()
* Add list of internal symbol names to escaped string type to cut back on casting
* Remove outdated comments
* Reassign interned values to nodes, just in case
* Swap to string enum
* Add deprecated aliases to escapeIdentifier and unescapeIdentifier
* Add temp var
* Remove unsafe casts
* Rename escaped string type as per @sandersn's suggestion, fix string enum usages
* Reorganize double underscore tests
* Remove jfreeman from TODO
* Remove unneeded parenthesis