* Add test that fails because file is written multiple times
Reported from #33061
* Handle seenEmittedFiles which was not being set when emit of a file was complete.
It was issue only when errors are reported before emitting (which puts the files into pendingEmit that needs to check only in seenEmittedFiles)
If emit happens before semantic diagnostics query this issue is not repro, because the affected files come into play and those are being set correctly
Fixes#31398
* make baselining source map optional
* Handle emitDeclarationOnly in --build scenario
* Ensure we are using d.ts emit as signature even when --declarationMap is on (map files are emitted before d.ts)
* Move module specifiers to verifyTsBuildOutput
* implement create Hash to be default hashing plus data so we can verify it easily in baseline
* Remove failing baseline
* Accept correct baseline name
* Changed outlining to better outline ES5 classes (functions assigned to prototype)
* Changed outlining to better outline ES5 classes (properties assigned to functions)
* Fixed some small bugs when merging es5 class nodes. Added tests for new es5 class outline.
* Added support for interlaced ES5 classes (where an ES5 class's members are mixed with other declarations).
* Fixed crash in outline when assigning {} to the prototype.
* Added support for nested es5 declarations.
* Added support for prototype assignment for es5 classes.
* Add test case
* Fix infer from usage property assignment
Property assignment and shorthand property assignment were incorrectly
treated differently; both have ObjectLiteralExpression as a parent, but
the code previously assumed that property assignments had
ObjectLiteralExpression as parent.parent.
Also make fourslash directives case insensitive and less whitespace
sensitive.
* Add "incorrect 3-slash" error to fourslash parsing.
It was overly permissive and ended up making a mess of C#-style
comments:
`/// <summary>Text</summary>`
Now it checks the element name. Attribute names remain unchecked.
* Fix constructor function type reference lookup
I knew I missed some code in the constructor-functions-as-classes PR.
This simplifies the type reference resolution code as well.
* Simplify and document js alias type resolution
* Cache JS inferred class type symbol
Note that many sources merge into a single target, so the *source*
[links] is the one that caches the merged target.
The reason this is a problem is not that many sources merge into a
single target, but that both getTypeOfSymbol and getDeclaredTypeOfSymbol
end up calling mergeJSSymbols with the same [source,target] pair. The
merge should not happen twice.
* Remove more verbose debug assertion message
* Fix isJSConstructor check + update baselines
* inferClassSymbol cache now track multiple targets
* Improve codeFixAll for add missing await
* Improve add missing await for initializers and fix-all
* Fix when only one side of a binary expression can have its initializer fixed
* Initial implementation
The original test passes but I haven't run any other tests yet, so I
assume the world is now broken.
* Append constructor function construct sigs
Instead of overwriting them
* Grab bag of improvements.
1. Mark @class-tagged functions with Class too.
2. Only gather local type parameters of constructor functions.
3. Remove getJSClassType calls with getDeclaredTypeOfSymbol.
4. Add a couple more failing tests.
getDeclaredTypeOfClassOrInterface now needs to understand prototype
assignment. That's next, I think.
* Prototype assignments work now
1. Binder marks prototype assignments as Class now.
2. Checker merges prototype assignments using the same merge code as for
functions and their declarations. No more intersections.
Many fewer failing tests now.
* Mark prototype-property assignments as Class
Even if there are no this-property assignments in them. (Then why are
you using a class?).
* Simplify getJSClassType, remove calls to its guts
It's probably not needed because now it's just a conditional call to
getDeclaredTypeOfSymbol, and I think most callers already know whether
they have a JS constructor function beforehand.
* isJSDocConstructor doesn't need to check prototype anymore
Because all the properties are merged during getDeclaredTypeOfSymbol.
* outer type parameter lookup follow prototype assignment
* this-type and -expression support in ctor funcs
Pretty cool!
* Fix remaining tests
* Fix minor lint
* Delete now-unused code
* Add class flag to nested class declarations
Also remove old TODOs
* Fix lookup of exported eunm type alias in local scope in JS
* Fix by adjusting type lookup fallback behavior to not include SymbolFlags.Value in its initial lookup instead
* Update Feature_request.md
Added the same list of steps that is present on the bug report to the feature request.
* Remove duplicate FAQ reading sentence