Commit graph

738 commits

Author SHA1 Message Date
Kagami Sascha Rosylight 05a2f1b110 Support bigints in ES2020 (#33874) 2019-12-23 12:18:52 -08:00
Kagami Sascha Rosylight d66e959a74 Add ES2020 to diagnostic messages (#35814) 2019-12-23 11:40:41 -08:00
Kagami Sascha Rosylight deb5288e31 Add module: es2020 (#33893) 2019-12-20 16:29:49 -08:00
Sheetal Nandi 236012e47b
Add watchOptions to tsconfig and allow supplying them on command line as well (#35615)
* Create different watch options in compiler options

* Thread through the new watch options

* Actually use the options passed through for watch strategy

* Support delay on updating child directory watches

* Make watchOptions separate from compilerOptions

* Support passing watch options from command line

* Handle displaying of watchOptions
2019-12-11 13:26:44 -08:00
Sheetal Nandi 4212484ae1
Open bigger set of configured projects when opening composite project for operations that operate over multiple projects like rename (#33287)
* Add isInferredProject, isConfiguredProject and isExternalProject

* Skip refreshing configured project on change of config file if its not loaded

* Open a tree of projects when doing findAllRefs or rename operations

* Fix addToSeen project key

* Refactor combineProjectsOutputWorker

* if the definition is local, no need to load and look in other projects

* Add disableSearchSolution as option to disable looking for solution

* Rename the option to disableSolutionSearching
2019-12-11 12:28:18 -08:00
Daniel Rosenwasser 3da85df511
Clean up error messages for using TypeScript syntax in JavaScr… (#35254)
* Fix up quotation marks in error messages in JavaScript files.

* Accepted baselines.

* Typescript -> TypeScript

* Accepted baselines.

* Migrate syntactic diagnostics tests to baselining tests.

* Accepted baselines.

* Update diagnosticMessages.json

* Removed markers.

* Add ability to baseline both semantic and syntactic diagnostics.

* Fix up broken diagnostics when using a server LS.

* Accepted baselines.

* Lints.

* Fake up sourcefile objects in the tsserver session client instead.

* Fewer allocations.
2019-11-22 14:51:22 -08:00
Orta ef0cca7d12
Adds 'did you mean' to the CLI args parser (#35063)
* Adds did you mean to the CLI args parser

* Adds test coverage for the did you mean on CLI args

* Adds did you mean to convertOptionsFromJson

* Ensure tsconfig compiler flags also get 'did you mean?'
2019-11-13 20:16:48 -05:00
Andrew Casey 9dd8391244 Add additional properties to switch declaration 2019-10-17 16:36:54 -07:00
Andrew Casey caf0041f8a Add listFilesOnly command-line option
Msbuild currently uses a combination of `--listFiles` and `--noEmit` to
obtain a list of files to be consumed by tsc.  However, these two flags
don't suppress type checking, the results of which msbuild will never
consume.  This new switch gives msbuild a faster way to obtain the file
list.

Note: like `--noEmit`, doesn't make sense in build mode.
2019-10-17 16:36:50 -07:00
Sheetal Nandi 9fa7d8b3b9 Use getNormalizedAbsolutePath to combine basePath and config value for file names
Fixes #34502 by being consistent in path normalization
2019-10-16 15:38:29 -07:00
Sheetal Nandi 25db0b0bf0 Merge baselining and tsc logic into one 2019-10-16 11:39:40 -07:00
Sheetal Nandi 4b10145340 Make sure commandline options are absolute paths so they dont conflict with tsbuildinfo paths
Fixes #33667
2019-10-14 14:44:47 -07:00
Max Heiber c80d565bc5 Enable forceConsistentCasingInFileNames by default in newly generated configs (#39) (#33614)
*Issue number of the reported bug or feature request: #17542*

**Describe your changes**
Enabled `forceConsistentCasingInFileNames` in newly generated `tsconfig.json`s created by `tsc --init`.

**Testing performed**
The configuration option changed in the related tests.

**Additional context**
n/a


Signed-off-by: Prakash Lalwani <plalwani4@bloomberg.net>
2019-09-27 14:42:30 -07:00
Wesley Wigham 558ece72cb
Add support for capturing cpu profiles into tsc itself (#33586)
* 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
2019-09-27 13:34:44 -07:00
Nathan Shively-Sanders 500a0df6f3
Add useDefineForClassFields flag for Set -> Define property declaration (#33509)
* 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
2019-09-26 13:25:05 -07:00
Sheetal Nandi fd3ba679ec Reword the option description per feedback 2019-09-24 12:22:42 -07:00
Sheetal Nandi b26ca160f4 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-11 12:27:58 -07:00
Sheetal Nandi 54d9ce9247 Merge branch 'master' into referencesPrototypeSourceFile 2019-09-05 13:51:56 -07:00
Alexander T 06f22f83c6 fix eslint errors 2019-09-04 11:51:17 +03:00
Alexander T f0e8518010 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-09-04 11:35:45 +03:00
Sheetal Nandi 0589d2dd1e Value for transpile option in CommandLineOption 2019-09-03 14:24:41 -07:00
Sheetal Nandi 4c4ddf833d Merge branch 'master' into referencesPrototypeSourceFile 2019-08-21 15:42:36 -07:00
Alexander ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander T 034ba9fd25 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-06 09:07:48 +03:00
Alexander T 012bacc415 Define interface for TSConfig. Change compilerOnSave to compileOnSave (#32481) 2019-08-05 09:24:09 -07:00
Alexander T 2c32308f35 no-null/no-null 2019-07-18 10:50:38 +03:00
Sheetal Nandi 103fe5fbc5 Merge branch 'master' into referencesPrototypeSourceFile
Uptodate to 3.6.0-dev.20190711
2019-07-11 12:05:36 -07:00
Sheetal Nandi b631850978 Add option disableSourceOfProjectReferenceRedirect to disable using sources of project reference redirect from editor 2019-07-10 15:49:53 -07:00
Alexander T 4defd1d635 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-04 12:49:33 +03:00
Ron Buckton e8bf9584aa
Improve type checking and inference for Generators and Async Generators (#30790)
* Improve typing for Generators and Async Generators

* Add TReturn and TNext to Iterator, IterableIterator, etc.

* Update ts internal Iterator to be assignable from global Iterator

* Make 'done' optional in IteratorYieldResult

* Revert Iterable and IterableIterator to simpler versions plus other fixes

* Add additional inference tests

* Added additional tests

* PR cleanup and minor async iteration type fix

* Updated diagnostics message and added non-strict tests

* Fix expected arity of Iterator/AsyncIterator
2019-07-03 21:55:59 -07:00
Alexander T 9f474150c6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-02 17:57:44 +03:00
Austin Cummings 4195f1a409 Add affectsEmit to module and esModuleInterop options 2019-06-28 17:51:05 -07:00
Sheetal Nandi b32afb55d1
Merge pull request #31985 from microsoft/buildInfoData
Make paths in tsbuildinfo file to be relative to the file
2019-06-27 12:49:52 -07:00
Alexander T 769bb0b475 remove tslint configuration 2019-06-27 13:49:35 +03:00
Alexander T f6a50067d3 @typescript-eslint/indent 2019-06-27 11:30:03 +03:00
Sheetal Nandi 06d188a255 Support --locale with --build
Fixes #31960
2019-06-19 15:38:05 -07:00
Sheetal Nandi 9446fc0c0c Convert options to relative paths 2019-06-19 12:54:22 -07:00
Sheetal Nandi 5c21fad12f
Merge pull request #31432 from microsoft/builderAPI
Api for tsc --build and --incremental
2019-06-05 12:31:00 -07:00
Sheetal Nandi 43c7eb77e1 Switch to using File not found message instead of trace message file does not exit
Fixes #30872
2019-05-21 09:43:40 -07:00
Sheetal Nandi b3dac18679 Merge branch 'master' into builderAPI 2019-05-09 16:07:47 -07:00
Sheetal Nandi 5c18513e96 Make SolutionBuilder as Public API 2019-05-02 15:36:15 -07:00
Sheetal Nandi aa0e64afc9
Merge pull request #31216 from ajafff/parsejsonconfigfilecontent-configcache
parseJsonConfigFileContent: add extendedConfigCache parameter
2019-05-02 12:48:23 -07:00
Klaus Meinhardt 883b00df35 parseJsonConfigFileContent: add extendedConfigCache parameter 2019-05-02 21:24:58 +02:00
Sheetal Nandi 45d72d077f Fix accidental internal parameter to public API 2019-05-02 11:07:36 -07:00
Kagami Sascha Rosylight 49d6f61298 Add ES2019 Object.fromEntries function (#30934)
* add ES2019 Object.fromEntries function

* add some comments

* apply suggested changes

* add readonly and general any
2019-04-30 09:49:58 -07:00
Sheetal Nandi 9efea31649
Merge pull request #31101 from Microsoft/cacheParseConfigFile
Caching results of parsing Config file and extended file
2019-04-30 09:33:33 -07:00
Sheetal Nandi 1e22110991 Merge branch 'master' into cacheParseConfigFile 2019-04-29 13:08:30 -07:00
Sheetal Nandi fb21e70d71 Target affects emit hence mark the option so that all files are reemitted when target changes
Fixes #31118
2019-04-29 13:05:31 -07:00
Sheetal Nandi d4c2fdc6fd Make changes to public API 2019-04-26 13:59:04 -07:00
Kagami Sascha Rosylight 1a75d525fa add ES2020 matchAll APIs (#30936) 2019-04-25 14:11:50 -07:00