* Add support for capturing cpu profiles into tsc itself
* Accept baseline for new compiler option in showConfig
* Fix lints
* Support profiling build mode, only ever have one live profiling session
* Minor modification to enable/disable semaphore, accept re-cased baseline
* Add pid into autognerated cpuprofile path
* Rename to fix case
* Sanitize filepaths in emitted cpuprofile for easier adoption by enterprise people, add inspector to browser field
* Support template literals in enum declarations
* Support template literals in const enum access
* Support template literals in swith with typeof narrowing
* Support template literals in element access discriminant
* Support template literals in ambient module declaration
* Unify symbols for template literals in computed properties
* Unify expression position checks for template literals
* Support template literals in rename and find all references
* Mark computed properties with template literals as write access
* Inline startsWithQuote
* Allow allowJs and declaration to be used together
This intorduces a new symbol-based declaration emitter - currently this
is only used for JSON and JavaScript, as the output is likely worse than
what the other declaration emitter is capable of. In addition, it is
still incomplete - it does not yet support serializaing namespaces.
* Add tests for various import/export forms, add notes on export as namespace and fix export * from
* Tests & fixes for computed names
* Add test with current @enum tag behavior
* fix declaration emit for jsdoc @enum tags
* Small adjustments to base class serialization to fix bugs in it
* Guard against type/type parameter confusion when using typeParameterToName a bit
* Integrate feedback from PR
* Fix issue with export= declarations visibility calculation and type declaration emit that impacted all forms of declaration emit
* Only make one merged getCommonJsExportEquals symbol for a symbol
* Support preserving type reference directives in js declarations
* Skip declare mdoifiers for namespace members in ambient contexts
* FAKE ALIASES AND NAMESPACES EVERYWHERE
* Dont do namespace sugar when type members contain keyword names
* Fix json source file export modifier under new output
* Such clean nested aliasing, very wow
* Fix lint
* Add visibility errors, reuse type nodes where possible
* Suppoer having correctly named import types in bundled js declaration emit & adjust binding to allow namespaces with aliases to merge when the aliases look to be type-only
* Better support for module.exports = class expression
* Fix discovered crash bug
* Allow export assigned class expressions to be reachable symbols from external declarations
* Add missing semicolon
* Support @enum tag post-merge
* preserve comments on signatures and declarations where possible
* Basic support for js classy functions
* Add example we should do better with
* Prototype assignments make things a bit wonky, but the example from the PR seems OK
* Make a ton of changes to support the new way js classes are bound
* Remove some old comments, fix import and export default names
* Fix bug in object define handling and add tests for object define property declaration emit
* Fix organization nits from PR comments
* Preserve comments from jsdoc declarations on properties and js declaration type aliases
* Merge export declarations with identical specifiers
* Remove completed TODO comment
* Split lint
* Remove now-unused function
* PR feedback
* Add some project references tests, remove some checks from project refs codepaths that are now invalid
* Update project references tests again
* Merge and update project references tests
* Rename case
* Update test to include declaration output
* Remove yet another project refernces redirect extension check
* Update comment
* Add additional import ref to test
* Add shorthand prop to test
* Fix comment text
* Extract var to temp
* Simplify function and add whitespace
* Update project refs test to use incremental edit entry
* Stylistic refactors in the symbol serializer
* Another round of PR feedback, mostly style, small bugfix with constructors, and test showing bug in export assigned class expression name shadowing
* Use x instead of index
* Disallow property/accessor overrides
Unless the base property or accessor is abstract
* Disallow uninitialised property overrides
This causes quite a few test breaks. We'll probably want to revert many
of them by switching to the upcoming `declare x: number` syntax.
* Updates from design review + fix ancient bug
1. Don't error when overriding properties from interfaces.
2. Fix error when overriding methods with other things. This had no
tests so I assume that the code was always dead and never worked.
* Need to add a couple of errors and squash one
Will update after checking out other branch for a minute
* Everything works so far
Need to test properties initialised in constructor
* Check for constructor initialisation
* change error wording
* Improve error wording
* Add codefix to add missing 'declare'
* Always emit accessors in .d.ts files
* Allow 'declare' on any uninitialised property decl
* Undo code moves
* Let sleeping dogs lie
* Correctly set NodeFlags.Ambient
And simplify redundant parts of check.
* Remove more unneeded code
* Update baselines
* Update baselines
* Update baselines
* Ignore this-property assignments
* Fix base-in-interface check
* Do not error when base parent is interface
* Fix base interface check
* Add missed baselines
* Fix check
* Fix new errors in services
* Fix new errors in services
* Fix errors in testRunner
* Add flag and turn off errors when on
* Structure of new emit is correct, fake content
It is 'hi'.
* Basically right emit
* Fix one last unitialised property declaration
* Haha no I missed another one
* Fix whitespace back to CRLF
* Minor fix and code cleanup
* New test case
* Fix bug in isInitializedProperty
* Updates from design meeting.
1. Change flag name to useDefineForClassFields (and flip polarity).
2. Forbid ES3 + useDefineForClassFields (since there is no
defineProperty).
3. Forbid overriding an abstract property-with-initializer with an
accessor.
* Update baselines
* Object.defineProperty for methods too
Using code from Ron from his upcoming refactor of the factory functions.
* Update slow baselines
* Improve error message
* Update src/compiler/transformers/utilities.ts
Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
* Add test of computed properties
* Remove done TODO
* Add UserPreferences for semicolons
* Prototype formatter semicolon removal
* Implement semicolon insertion
* Fix existing tests
* Start adding tests
* Fix some edge cases of semicolon deletion
* Fix semicolon removal before comments
* Fix indentation
* Test on checker
* Replace semicolon-omitting writer with formatter preference
* Fix writing new nodes, update protocol
* Rename option
* Really fix formatting synthetic nodes
* Fix refactoring misses
* Un-update submodules gahhhh
* Update APIs
* Update for ESLint
* Revert accidental test change
* De-kludge deduplication of EOF processing
* Omit last element semicolon from single-line object-like types
* Revert "Omit last element semicolon from single-line object-like types"
This reverts commit 5625cb0237.
* Fix straggler test
* Add test for leading semicolon class members
* Rename a lot of stuff for clarity
* Invert some boolean logic