* Rename JS concepts
1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.
Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.
* Remove TODO
* Rename Javascript->JS
Note that this introduces a variable name collision in a couple of
places, which I resolved like this:
```ts
const isInJavascript = isInJSFile(node);
```
* Enable '--strictNullChecks'
* Fix API baselines
* Make sys.getEnvironmentVariable non-nullable
* make properties optional instead of using `| undefined` in thier type
* reportDiagnostics should be required
* Declare firstAccessor as non-nullable
* Make `some` a type guard
* Fix `getEnvironmentVariable` definition in tests
* Pretend transformFlags are always defined
* Fix one more use of sys.getEnvironmentVariable
* `requiredResponse` accepts undefined, remove assertions
* Mark optional properties as optional instead of using `| undefined`
* Mark optional properties as optional instead of using ` | undefined`
* Remove unnecessary null assertions
* Put the bang on the declaration instead of every use
* Make `createMapFromTemplate` require a parameter
* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional
* Plumb through undefined in emitLsit and EmitExpressionList
* `ElementAccessExpression.argumentExpression` can not be `undefined`
* Add overloads for `writeTokenText`
* Make `shouldWriteSeparatingLineTerminator` argument non-nullable
* Make `synthesizedNodeStartsOnNewLine` argument required
* `PropertyAssignment.initializer` cannot be undefined
* Use one `!` at declaration site instead of on every use site
* Capture host in a constant and avoid null assertions
* Remove few more unused assertions
* Update baselines
* Use parameter defaults
* Update baselines
* Fix lint
* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions
* Make Node#symbol and Type#symbol non-optional to reduce assertions
* Make `flags` non-nullable to reduce assertions
* Convert some asserts to type guards
* Make `isNonLocalAlias` a type guard
* Add overload for `getSymbolOfNode` for `Declaration`
* Some more `getSymbolOfNode` changes
* Push undefined suppression into `typeToTypeNodeHelper`
* `NodeBuilderContext.tracker` is never `undefined`
* use `Debug.assertDefined`
* Remove unnecessary tag
* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
* Make token building cancellable
* Scope cancellation token, make find all refs and quickinfo cancellable
* Make completion entry details cancellable
* Actually accept public API update
* Add test verifying cancellations within checker for select language service operations
* Document runWithCancellationToken a bit more
* Add post-cancellation verification to test
* 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
* 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
* And lint rule to check that `Debug.assert` calls do not eagerly interpolate strings
* Use more specific 'assert' functions to avoid callbacks
* Respond to PR feedback
* 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
* Provide better services for incomplete generic calls
* Use clearer name
* Remove `inferredAnyDefaultTypeArgument` and `getBestGuessSignature`; have `resolveSignature` always get the best signature if !produceDiagnostics
* Update names and comments
Address comment: fix spelling mistakes
Address comment: calling `checkApplicableSignatureForJsxOpeningLikeElement` from inside `checkApplicableSignature`
Address comment: fix spelling, rename function to be more consistent
Address comment: minor fix indentation, fix function name isObjectLiteralPropertyDeclaration => isObjectLiteralElement
Address PR: gotoDefinition return the last signature when there is an error in statelss function component
Address PR: convert Foreach to for...of
Address comment: fix type, inline code, clarify name of variables