* Add 'move to new file' refactor
* Code review, and support commonjs
* Compute movedSymbols completely before using, and support `export import`
* Fix assertion error: sort empty change before non-empty change
* Remove extra newline
* Add allowTextChangesInNewFiles preference
* Add the new file to 'files' in tsconfig
* Avoid parameter initializer
* Update API baselines
* Use path relative to tsconfig.json
* Code review
* Fix error where node in tsconfig file was missing a source file
* Support '.' as a trigger character
* Add a CompletionsTriggerCharacter type
* Add more trigger characters
* Add another type CompletionsTriggerCharacter
* Update API baselines
* Add compiler option to enable declaration sourcemaps
* Transparent goto definition for sourcemapped declaration files
* Post-rebase touchups
* Rename API methods
* Fix lints
* Fix typo in name XD
* Log sourcemap decode errors
* Share the cache more, but also invalidate it more
* Remove todo
* Enable mapping on go to implementation as well
* Allow fourslash to test declaration maps mroe easily
* more test
* Handle sourceRoot
* Add tests documenting current behavior with other sourcemapping flags
* Ignore inline options for declaration file maps, simplify dispatch in emitter
* Change program diagnostic
* Fix nit
* Use charCodeAt
* Rename internal methods + veriables
* Avoid filter
* span -> position
* Use character codes
* Dont parse our sourcemap names until we need to start using them
* zero-index parsed positions
* Handle sourceMappingURL comments, including base64 encoded ones
* Unittest b64 decoder, make mroe robust to handle unicode properly
* Fix lint
* declarationMaps -> declarationMap
* Even more feedback
* USE Mroe lenient combined regexp
* only match base64 characters
* Fix nit
* Support services settings
* Code review
* More review
* Use different names for Options and GetCompletionsAtPositionOptions (todo: come up with better names)
* More renames
* More renaming
* Support quote style in importFixes
* Add `importModuleSpecifierPreference` option
* Support quote style for `throw new Error('Method not implemented.')` (#18169)
* options -> preferences
In phase 1, it coalesces imports from the same module and sorts the
results, but does not remove unused imports.
Some trivia is lost during coalescing, but none should be duplicated.
* Support completions that require changing from dot to bracket access
* Use insertText and replacementSpan
* Rename includeBracketCompletions to includeInsertTextCompletions
* Don't add completions that start with space
* Add kindModifier to mark if a completion item is for an optional field
For #12458
Adds a new KindModifier for completion items to mark when a property is optional. This can be used by editors to either change the item icon or add a `?` to the item text
* Add method test
* Baseline-accept
* Support a "getCombinedCodeFix" service
* Rename things
* Code review
* Rename things
* Update API baselines
* CodeActionAll -> CombinedCodeActions
* Take a `scope` parameter instead of `fileName` for flexibility
* Renames and bugfixes
* Make API changes internal
* Code review
* Update comment
* For import fix, prefer symlink over a real path
* fixes
* Use best result from all symlinks
* Make originalPath optional more
* Only include real path if a symlink isn't available
* Use documentation comments from inherited properties when @inheritDoc is present
The JSDoc `@ineheritDoc` [tag](http://usejsdoc.org/tags-inheritdoc.html)
"indicates that a symbol should inherit its documentation from its
parent class". In the case of a TypeScript file, this also includes
implemented interfaces and parent interfaces.
With this change, a class method or property (or an interface property)
with the `@inheritDoc` tag in its JSDoc comment will automatically use
the comments from its nearest ancestor that has no `@inheritDoc` tag.
To prevent breaking backwards compatibility,
`Symbol.getDocumentationComment` now accepts an optional `TypeChecker`
instance to support this feature.
fixes#8912
* Use ts.getJSDocTags as per @andy-ms 's recommendation
* Convert @inheritDoc tests to verify.quickInfoAt
* Concatenate inherited and local docs when @inheritDoc is present
* Make typeChecker param explicitly `TypeChecker | undefined`
* Re-accept baseline after switch to explicit `| undefined`
* Update APISample_jsodc.ts to match new getDocumentationComment signature
* Re-accept baselines after rebasing
* For getCompletionsAtPosition, require a flag to provide completions with code actions
* Change name
* Increase API version
* Update API baselines
* Add comment
* Update API baseline
* Support multiple completions with the same name but different source module
* Use optional parameters for source
* Simplify use of `uniques`
* Update test
* Fix `undefined` error
* checker.ts: Remove null check on symbols
* tsserverProjectSystem.ts: add two tests
* client.ts, completions.ts, types.ts: Add codeActions member to CompletionEntryDetails
* protocol.ts, session.ts: Add codeActions member to CompletionEntryDetails protocol
* protocol.ts, session.ts, types.ts: add hasAction to CompletionEntry
* session.ts, services.ts, types.ts: Add formattingOptions parameter to getCompletionEntryDetails
* completions.ts: define SymbolOriginInfo type
* completions.ts, services.ts: Add allSourceFiles parameter to getCompletionsAtPosition
* completions.ts, services.ts: Plumb allSourceFiles into new function getSymbolsFromOtherSourceFileExports inside getCompletionData
* completions.ts: add symbolToOriginInfoMap parameter to getCompletionEntriesFromSymbols and to return value of getCompletionData
* utilities.ts: Add getOtherModuleSymbols, getUniqueSymbolIdAsString, getUniqueSymbolId
* completions.ts: Set CompletionEntry.hasAction when symbol is found in symbolToOriginInfoMap (meaning there's an import action)
* completions.ts: Populate list with possible exports (implement getSymbolsFromOtherSourceFileExports)
* completions.ts, services.ts: Plumb host and rulesProvider into getCompletionEntryDetails
* completions.ts: Add TODO comment
* importFixes.ts: Add types ImportDeclarationMap and ImportCodeFixContext
* Move getImportDeclarations into getCodeActionForImport, immediately after the implementation
* importFixes.ts: Move createChangeTracker into getCodeActionForImport, immediately after getImportDeclarations
* importFixes.ts: Add convertToImportCodeFixContext function and reference it from the getCodeActions lambda
* importFixes.ts: Add context: ImportCodeFixContext parameter to getCodeActionForImport, update call sites, destructure it, use compilerOptions in getModuleSpecifierForNewImport
* importFixes.ts: Remove moduleSymbol parameter from getImportDeclarations and use the ambient one
* importFixes.ts: Use cachedImportDeclarations from context in getCodeActionForImport
* importFixes.ts: Move createCodeAction out, immediately above convertToImportCodeFixContext
* Move the declaration for lastImportDeclaration out of the getCodeActions lambda into getCodeActionForImport
* importFixes.ts: Use symbolToken in getCodeActionForImport
* importFixes.ts: Remove useCaseSensitiveFileNames altogether from getCodeActions lambda
* importFixes.ts: Remove local getUniqueSymbolId function and add checker parameter to calls to it
* importFixes.ts: Move getCodeActionForImport out into an export, immediately below convertToImportCodeFixContext
* completions.ts: In getCompletionEntryDetails, if there's symbolOriginInfo, call getCodeActionForImport
* importFixes.ts: Create and use importFixContext within getCodeActions lambda
* importFixes.ts: Use local newLineCharacter instead of context.newLineCharacter in getCodeActionForImport
* importFixes.ts: Use local host instead of context.host in getCodeActionForImport
* importFixes.ts: Remove dummy getCanonicalFileName line
* Filter symbols after gathering exports instead of before
* Lint
* Test, fix bugs, refactor
* Suggestions from code review
* Update api baseline
* Fix bug if previousToken is not an Identifier
* Replace `startsWith` with `stringContainsCharactersInOrder`