2872 Commits

Author SHA1 Message Date
Sheetal Nandi
990b199ebd Merge branch 'master' into incrementalBuildInfo 2019-03-08 11:42:19 -08:00
Wesley Wigham
a887c6ba40
Remove unused (and sometimes broken) targets and scripts (#30054)
* Remove unused (and sometimes broken) targets and scripts

* Remove browser-specific harness code
2019-03-08 10:34:35 -08:00
Sheetal Nandi
ed35741b5f Merge branch 'master' into incrementalBuildInfo 2019-02-27 15:45:59 -08:00
Nathan Shively-Sanders
be2db9db12
Add globalThis (#29332)
* Restore original code from bind-toplevel-this

With one or two additional comments

* Working in JS, but the symbol is not right.

Still need to

1. Make it work in Typescript.
2. Add test (and make them work) for the other uses of GlobalThis:
window, globalThis, etc.

* Check in TS also; update some tests

Lots of tests still fail, but all but 1 change so far has been correct.

* Update baselines

A couple of tests still fail and need to be fixed.

* Handle type references to globalThis

The type reference must be `typeof globalThis`. Just `globalThis` will
be treated as a value reference in type position -- an error.

* Restore former behaviour of implicitThis errors

I left the noImplicitThis rule for captured use of global this in an
arrow function, even though technically it isn't `any` any more --
it's typeof globalThis.  However, you should still use some other method
to access globals inside an arrow, because captured-global-this is super
confusing there.

* Test values with type globalThis

I ran into a problem with intersecting `Window & typeof globalThis`:

1. This adds a new index signature to Window, which is probably not
desired. In fact, with noImplicitAny, it's not desired on globalThis
either I think.
2. Adding this type requires editing TSJS-lib-generator, not this repo.

So I added the test cases and will probably update them later, when
those two problems are fixed.

* Add esnext declaration for globalThis

* Switch to symbol-based approach

I decided I didn't like the import-type-based approach.

Update baselines to reflect the difference.

* Do not suggest globals for completions at toplevel

* Add tests of element and property access

* Look up globalThis using normal resolution

globalThis is no longer constructed lazily. Its synthetic Identifier
node is also now more realistic.

* Update fourslash tests

* Add missed fourslash test update

* Remove esnext.globalthis.d.ts too

* Add chained globalThis self-lookup test

* Attempt at making globalThis readonly

In progress, had to interrupt for other work.

* Add/update tests

* Addres PR comments:

1. Add parameter to tryGetThisTypeAt to exclude globalThis.
2. Use combined Module flag instead combining them in-place.
3. SymbolDisplay doesn't print 'module globalThis' for this expressions
anymore.
2019-02-27 14:14:34 -08:00
Sheetal Nandi
bc4186cee5 Update the programBuildInfo to be platform and change independent so we can baseline it safely 2019-02-21 13:52:21 -08:00
Sheetal Nandi
b958f1c8b5 Merge branch 'master' into incrementalBuildInfo 2019-02-14 12:19:10 -08:00
Ryan Cavanaugh
02a5ef6a17 Add setInterval/setTimeout 2019-02-11 11:26:19 -08:00
Ryan Cavanaugh
1f10e74abc Enable no-eval rule 2019-02-11 11:18:29 -08:00
Sheetal Nandi
e3f8c34bc9 Add mechanism to dump and read program to build info 2019-02-07 12:10:15 -08:00
Sheetal Nandi
315a4dd226 Merge branch 'master' into prependWithBundleInfo 2019-01-30 13:38:28 -08:00
Sheetal Nandi
604af5c621 Handle get from readFileCache correctly.
Fixes #29623
2019-01-28 12:30:05 -08:00
Sheetal Nandi
607891b78e Generate readable source map baselines for -b --out scenario 2019-01-25 14:31:39 -08:00
Sheetal Nandi
f0227ecb2c Handle find all references for symbol merged with UMD module and global var
Fixes #29093
2019-01-22 14:52:39 -08:00
Sheetal Nandi
9bd23652ef
Merge pull request #29161 from Microsoft/incrementalBuild
Supports incremental build in tsc --b --w mode
2019-01-17 13:44:48 -08:00
Benjamin Lichtman
5fc8f1dd80
Add opt-in user preference for prefix and suffix text on renames (#29314)
* Add user preference to control renaming through exports

* Only impact renaming

* Update baselines

* Use flag to control all prefix and suffix text and imports

* [WIP] add tests

* Only skip export import specifier with flag

* [WIP] Update tests

* Update test

* Pick up preference from host and update test

* Shorten flag name

* Add missing utility function

* Update comment

* [WIP] rename flag and respond to cr

* [WIP] Add flag for forRelatedSymbol

* Use larger search symbol set for old-style rename

* Respond to CR

* Fix small error

* Fix type mismatch

* Update comment and remove unnecessary exprot

* Respond to CR
2019-01-16 10:58:07 -08:00
Benjamin Lichtman
c5948bf068
Merge pull request #29385 from uniqueiniquity/renameImportPref
Add user preference to opt-in to renaming import paths
2019-01-15 10:29:57 -08:00
Benjamin Lichtman
2c50ed3089 Respond to CR 2019-01-14 17:05:25 -08:00
Benjamin Lichtman
c88016d397 Fix comment 2019-01-11 14:52:47 -08:00
Benjamin Lichtman
d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Sheetal Nandi
c1edbb8522 Merge branch 'master' into incrementalBuild 2019-01-11 14:34:45 -08:00
Wesley Wigham
fadd95f72b
Fix unneeded cast lints (#29383) 2019-01-11 14:24:49 -08:00
Sheetal Nandi
7b290fdbd4 Update the timestamps of outputs that dont need to be written because of incremental build
This ensures that after `tsbuild` after incremental build of `tsbuild -w` doesnt result in unnecessary rebuilds
2018-12-21 12:56:03 -08:00
Sheetal Nandi
48baa42d65 Make SolutionBuilder handle BuilderProgram in preparation to handle incremental builds 2018-12-21 12:53:25 -08:00
Sheetal Nandi
fcd502502a
Merge pull request #28886 from Microsoft/sourceMapDecoder
Enhancements to SourceMap decoder from tsserver
2018-12-19 12:51:42 -08:00
Wesley Wigham
4f7184a587
Fix all new lint failures (#29080) 2018-12-18 11:34:02 -08:00
Anders Hejlsberg
201eec6230 Update fourslash list of global types 2018-12-08 11:20:31 -08:00
Sheetal Nandi
12428d45c0 Add method on host to get DocumentPositionMapper so it can be cached. 2018-12-06 15:22:39 -08:00
dreamran43@gmail.com
a2851d2ddc Move await keyword to inside of function and test 2018-12-04 03:01:56 +08:00
dreamran43@gmail.com
f2d297fd1f Move await keyword to inside of function and test 2018-12-04 02:40:43 +08:00
Andy
12f3d0d54c
Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Sheetal Nandi
6bb1ff2214
Merge pull request #27376 from Microsoft/codeFixCannotFindModule_suggestion_falsePositive
Don't implicit-any diagnostic for json module
2018-11-16 15:48:37 -08:00
Andy
079f0436f3
Remove unused function (#28531) 2018-11-15 09:34:07 -08:00
Andy
2600250a24
Add 'bigint' to type keywords (#28537) 2018-11-14 22:18:05 -08:00
Ron Buckton
151dc074a8 Merge branch 'master' into sourceMapGenerator 2018-11-09 11:50:51 -08:00
Sheetal Nandi
4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Andy
c22c7e687d
Strcter testing for global completions; and 'excludes' can only be a string (#28349) 2018-11-05 16:16:28 -08:00
Caleb Sander
28e9ec497c Address review comments 2018-11-05 11:36:32 -08:00
Andy
afbf89e3b3
Refactors can return ReadonlyArray<ApplicableRefactorInfo> (#28305)
* Refactors can return ReadonlyArray<ApplicableRefactorInfo>

* Remove unnecessary type assertions
2018-11-02 10:07:21 -07:00
Sheetal Nandi
77ef9cedab Report error summary in pretty mode during normal compilation 2018-11-01 16:11:22 -07:00
Sheetal Nandi
dcdda87258
Merge pull request #28243 from Microsoft/containerOnlyRef
Report error requiring references to have composite only if the program is not container only
2018-10-30 21:20:52 -07:00
Sheetal Nandi
4606a4b700
Merge pull request #28209 from Microsoft/ignorePathsStartingWithDotInNodeModules
Ignore any changes to file or folder that are in node_modules and start with "."
2018-10-30 18:06:00 -07:00
Sheetal Nandi
60801a261c Report error requiring references to have composite only if the program is not container only 2018-10-30 15:22:00 -07:00
Andy
437bc41e99
For path completions, include extension as a kindModifier (#28148) 2018-10-30 11:56:34 -07:00
Sheetal Nandi
c9fadf1f46 Ignore wild card directory watchers with node_modules file or folder starting with . 2018-10-30 11:06:13 -07:00
Andy
acc34bd95d
Miscellaneous code cleanup relating to module resolution (#28092)
* Miscellaneous code cleanup relating to module resolution

* Revert if condition
2018-10-30 10:15:01 -07:00
Andy
7c515bf6e8
Remove toSortedArray and toDeduplicatedSortedArray, use sort and sortAndDeduplicate (#28214) 2018-10-30 08:41:31 -07:00
Mine Starks
1fbabd5534 Merge pull request #28106 from minestarks/configure-plugins
configurePlugins command for tsserver
2018-10-29 14:06:40 -07:00
Andy
672b0e3e16
Have flatMap return a ReadonlyArray by default (#28205) 2018-10-29 11:12:51 -07:00
Andy
c97fc64972
Always use verify.completions when testing completions (#28137) 2018-10-29 10:03:25 -07:00
Andy
854f20e90f
Remove 'verify.fileAfterCodeFix', use 'verify.codeFix' (#28110) 2018-10-24 15:34:15 -07:00