725 Commits

Author SHA1 Message Date
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
Sheetal Nandi
80f1ba4e42 Cache files extended so we arent calculating the config again and again 2019-04-24 15:51:27 -07:00
Andrew Branch
b6a0988052
Merge pull request #30776 from andrewbranch/feature/10178
Add flag to allow access to UMD globals from modules
2019-04-18 18:05:44 -07:00
Sheetal Nandi
15ae8a7273 Make sure to emit again if change in compiler option affects emit
Fixes #30736
2019-04-16 16:18:37 -07:00
Andrew Branch
98cd89fbc1
Add affectsSemanticDiagnostics to flag (and move to right spot) 2019-04-08 09:46:48 -07:00
Andrew Branch
2ee93bf0f2
Add allowUmdGlobalAccess flag 2019-04-08 09:46:46 -07:00
Sheetal Nandi
35470b3f3b Make tsbuildInfoFile as commandline option to tsc (and not tsc -b) 2019-03-25 14:47:36 -07:00
Sheetal Nandi
34c3233d18 Allow --incremental to be command line option 2019-03-20 14:48:47 -07:00
Sheetal Nandi
cd195c91c6 Add options tsBuildInfoFile to provide name for the buildinfo file 2019-03-01 10:28:57 -08:00
Sheetal Nandi
d53efdf380 Changes to generation of .tsbuildinfo:
- If composite or incremental then only the .tsbuildinfo will be generated
- if --out or --outFile the file is outputFile.tsbuildinfo
- if rootDir and outDir then outdir/relativePathOfConfigFromRootDir/configname.tsbuildinfo
- if just outDir then outDir/configname.tsbuild
- otherwise config.tsbuildinfo next to configFile
2019-02-28 13:46:26 -08:00
Sheetal Nandi
9fa28158bb Enable building typescript.d.ts with current source 2019-02-22 18:11:27 -08:00
Kagami Sascha Rosylight
13c72b786e Merge remote-tracking branch 'upstream/master' into es2019 2019-02-08 06:55:56 +09:00
Kagami Sascha Rosylight
b3c179540a String.prototype.{trimStart,trimEnd} hit stage 4 2019-02-08 00:51:23 +09:00
Kagami Sascha Rosylight
f525a89e87 Array.prototype.{flat,flatMap} hit stage 4 2019-02-08 00:10:34 +09:00