1654 Commits

Author SHA1 Message Date
amaksimovich2
5b79b942e8 add action for enabling experimentalDescorators option in user config… (#30484)
* add action for enabling experimentalDescorators option in user config file, change error message for this case #29035

* add missing changes in tests

* Add "experimental decorators" tests for jsconfig file
2019-04-25 14:55:04 -07:00
Ely Alamillo
591b25593d update error message and update baselines (#27628) 2019-04-25 13:16:41 -07:00
Wenlu Wang
bc46c770bf allow literan enum const assertions (#30700)
* allow literan enum const assertions

* update desc
2019-04-25 10:09:21 -07:00
Ryan Cavanaugh
885d4d63c8
Remove "generate types" code (#31075) 2019-04-23 13:51:47 -07:00
Daniel Rosenwasser
c74d25c115
30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop' (#30847)
30837 - Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop'
2019-04-23 11:23:06 -04:00
karthikkp
181d126b02 diagnostic messages conflicts resolved 2019-04-20 01:38:17 +05:30
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
Alexander T
f5d4e66451 Bad error message when default 'import'-ing an 'export =' without 'esModuleInterop' 2019-04-16 14:39:16 +03:00
Daniel Rosenwasser
3dc78b6f3b
Merge pull request #30916 from jack-williams/array-elaboration
Elaborate array and tuple relation errors
2019-04-15 14:00:22 -07:00
Andrew
13d9f08976 Gracefully parse 'super' with type arguments (#10677) (#30913) 2019-04-15 13:06:29 -07:00
Jack Williams
2ea91a0e9c Elaborate array and tuple relation errors 2019-04-15 18:16:38 +01:00
Andrew Branch
28b21df943
Add period to compiler flag description to match others 2019-04-08 09:46:47 -07:00
Andrew Branch
2ee93bf0f2
Add allowUmdGlobalAccess flag 2019-04-08 09:46:46 -07:00
Alexander T
75a812b4db add new message - TS1258 (#30704) 2019-04-03 09:49:34 -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
722afc18bb Fix typo 2019-03-21 09:01:52 -07:00
Sheetal Nandi
34c3233d18 Allow --incremental to be command line option 2019-03-20 14:48:47 -07:00
Gabriela Britto
1c8a359914
rename convert to named parameters (#30401) 2019-03-14 13:41:29 -07:00
Wenlu Wang
d2476759e2 add related error span for default exports (#25396)
* add related error span for default exports

* accept baseline

* stash

* accept baseline and fix lint

* update testcase

* Add missing semicolon
2019-03-12 13:15:14 -07:00
Sheetal Nandi
68e28da141 Build project if existing project was built with different compiler version 2019-03-08 15:14:34 -08:00
Sheetal Nandi
990b199ebd Merge branch 'master' into incrementalBuildInfo 2019-03-08 11:42:19 -08:00
Sheetal Nandi
fe9f42480a Handle error when type parameter of mapped type uses private type
Fixes #30201
2019-03-06 13:30:48 -08:00
Gabriela Britto
d2364f555f
Merge pull request #30089 from Microsoft/convert-to-named-parameters
Convert to named parameters
2019-03-06 09:33:01 -08:00
Sheetal Nandi
223d42847b Merge branch 'master' into incrementalBuildInfo 2019-03-01 11:39:44 -08:00
Sheetal Nandi
cd195c91c6 Add options tsBuildInfoFile to provide name for the buildinfo file 2019-03-01 10:28:57 -08:00
Sheetal Nandi
df9da15abb Incremental false with composite not allowed 2019-03-01 09:39:58 -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
Anders Hejlsberg
237c33b444
Merge pull request #30109 from Microsoft/circularConstraintErrors
Consistently error on circular constraints
2019-02-28 10:57:01 -10:00
Gabriela Araujo Britto
617d5af67e add diagnostics message for refactor description 2019-02-28 11:22:05 -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
Anders Hejlsberg
ede6b9a5cb Issue errors for all circular type parameter constraints 2019-02-26 12:39:01 -08:00
Sheetal Nandi
e1b18ab5fb Merge branch 'master' into incrementalBuildInfo 2019-02-22 14:19:53 -08:00
Sheetal Nandi
494bd92f1b Report error if overwriting buildInfo of another project reference 2019-02-21 19:34:20 -08:00
Sheetal Nandi
89c4c4f684 Update the message to not just mean javascript since we might need to regenerate .d.ts as well 2019-02-21 17:52:15 -08:00
Daniel Rosenwasser
4a256abc8a Give a related span pointing to the implementation signature when reporting incompatibility. 2019-02-21 10:51:18 -08:00
Daniel Rosenwasser
cee933ff09 Be more specific in errors. 2019-02-21 10:50:14 -08:00
Sheetal Nandi
a881391dc9 Merge branch 'master' into incrementalBuildInfo 2019-02-20 10:37:44 -08:00
Sheetal Nandi
b958f1c8b5 Merge branch 'master' into incrementalBuildInfo 2019-02-14 12:19:10 -08:00
Titian Cernicova-Dragomir
950861ec7f Improve error message for using value as type. 2019-02-13 17:25:23 +02:00
Sheetal Nandi
ab7d65e01f Merge branch 'master' into usePrependToSkipBuild 2019-02-07 10:39:41 -08:00
Kagami Sascha Rosylight
a8823f5169
Merge branch 'master' into es2019 2019-02-07 10:08:26 +09:00
Sheetal Nandi
87bb6c9c90 Merge branch 'master' into usePrependToSkipBuild 2019-02-04 15:43:44 -08:00
Sheetal Nandi
aa5d62a72c Perform only emit on js file if no decl file change 2019-02-04 15:01:54 -08:00
Alan Pierce
942b020081 Merge remote-tracking branch 'origin/master' into enforce-const-enum-access-for-isolatedmodules 2019-02-01 18:52:22 -08:00
Sheetal Nandi
03fa5bd90f Merge branch 'master' into usePrependToSkipBuild 2019-01-31 22:05:51 -08:00
Klaus Meinhardt
782622f9cd clarify error message for 'readonly' type operator 2019-01-31 19:44:49 +01:00
Sheetal Nandi
bd769406ca If the project only needs prepend output to be changed, prepare to just manipulate output
Step 1: Update the verbose log to reflect it
2019-01-31 10:24:12 -08:00
Klaus Meinhardt
f4747f4667 Merge branch 'master' of github.com:Microsoft/TypeScript into add-to-types2 2019-01-31 11:25:01 +01:00
Anders Hejlsberg
08fe06f527 Merge branch 'master' into constContexts
# Conflicts:
#	src/compiler/checker.ts
2019-01-29 12:29:30 -08:00