Commit Graph

1597 Commits

Author SHA1 Message Date
Anders Hejlsberg
ea3814676d Error on union types that are too complex to represent 2019-01-28 13:11:04 -08:00
Anders Hejlsberg
4706a060a5 Merge branch 'master' into readonlyArrayTuple 2019-01-26 14:44:15 -08:00
Ryan Cavanaugh
1a742e6f27 Merge pull request #27918 from collin5/b27914
Improve error message for duplicate property with computed name
2019-01-24 14:35:51 -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
Anders Hejlsberg
2256f9159f Fix typo 2019-01-16 09:46:02 -08:00
Daniel Rosenwasser
adb4738cff Merge pull request #28132 from a-tarasyuk/feature/28086
28086 - "--downlevelIteration errors should mention using later targets"
2019-01-15 14:06:57 -08:00
Wesley Wigham
49689894d7 Elaborate jsx children elementwise (#29264)
* Heavy WIP, but has good contextual typing fix

* Add arity error, refine messages and spans

* Small error message change

* Better error messages, text-specific message
2019-01-15 11:32:36 -08:00
Anders Hejlsberg
bb8378fddf Support 'readonly' type modifier on array and tuple types 2019-01-15 09:43:39 -08:00
Gabriela Britto
e5708e1903 Merge pull request #29352 from Microsoft/qualified-name-param-tag-error
Qualified name param tag error
2019-01-14 10:28:08 -08:00
Alexander
ba94fd9e05 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28086 2019-01-12 08:39:06 +02:00
Sheetal Nandi
c1edbb8522 Merge branch 'master' into incrementalBuild 2019-01-11 14:34:45 -08:00
Alexander
d5f5d7347e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28086 2019-01-11 22:21:02 +02:00
Alexander
a076417837 remove unused error message 2568 2019-01-11 22:13:29 +02:00
Josh Goldberg
8d28f9230c Added codefix to enable experimentalDecorators in the user's config file
Starts on #29035 by creating a codefix to enable the `experimentalDecorators` setting in a user's config file, if one exists. The issue's discussion also mentions giving a more precise error message if the user has a jsconfig or tsconfig or creating one if not; I'd rather tackle those in separate PRs to keep this one small.

Doesn't create the code action if no config file is present. Otherwise keeps to the precedent of returning without action when the config file contents aren't the expected JSON structure (looking at `fixCannotFindModule.ts`).  Moves a couple JSON helpers from that file into the sibling `helpers.ts` so both codefixes can use them.
2019-01-11 09:20:12 -05:00
Gabriela Britto
a9ed42f541 Merge branch 'master' into qualified-name-param-tag-error 2019-01-10 09:49:26 -08:00
Gabriela Britto
e16be71c08 Add diagnostic message for JSDoc qualified param name without top level param 2019-01-09 15:52:05 -08:00
Sheetal Nandi
1b37830615 Merge branch 'master' into incrementalBuild 2019-01-09 10:40:01 -08:00
Alexander T
52057ac4f6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export 2019-01-08 10:55:11 +02:00
Alexander T
945eed8d9b PR feedback: change error #2497 message 2019-01-08 10:54:08 +02:00
Anders Hejlsberg
3f7a9a906b Type parameter defaults can only reference previously declared type parameters 2018-12-27 13:45:13 -10: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
Anders Hejlsberg
3e0639add5 Merge pull request #29053 from Microsoft/fixDestructuringControlFlow
Fix destructuring control flow analysis
2018-12-19 11:12:41 -08:00
Anders Hejlsberg
676338971d Improve error message for out-of-bounds tuple element access 2018-12-19 08:45:18 -08:00
Daniel Rosenwasser
3edd2d6893 Merge pull request #28896 from JoshuaKGoldberg/n-identifier-after-numeric-literal-error
Better error message for invalid bigint literals ending with n
2018-12-18 11:38:06 -08:00
Alexander T
78707b206a Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/24542-bad-error-message-for-import-ing-an-export 2018-12-18 10:41:31 +02:00
Alexander T
332c88e57d PR feedback: change error #2497 message 2018-12-18 10:39:32 +02:00
Ali Sabzevari
1a5ecbb6ac #28977 Change error message according to review comments 2018-12-14 23:42:59 +01:00
Ali Sabzevari
99c7fc4a88 #28977 Change const enum error message 2018-12-14 21:23:46 +01:00
Anders Hejlsberg
43811dd16f Use getIndexedAccessType when computing destructured types 2018-12-13 12:13:13 -08:00
Philip Pesca
e6aa992095 Fix error message when type argument arity is wrong (#28366)
* Fix error message when type argument arity is wrong

* Parenthesize 's' in plurals

* Update baseline

* Update baseline

* Use old error message

* Revert parantheses
2018-12-11 09:54:38 -08:00
Josh Goldberg
773c50f05a Better error message for invalid bigint literals ending with n
Helps with the cases of decimals and exponentials, though not with numbers incorrectly starting with `0`.

Fixes #28887.
2018-12-07 00:40:13 -08:00
Josh Goldberg
a211184347 Clarified error message; extended error to identifier end
Lengthening the reported error length to include all of the identifier necessitates scanning for all of the identifier. I also reset the `pos` after so other identifier scanning still happens.
2018-12-06 11:17:06 -08:00
Josh Goldberg
174816fc26 Added error for IdentifierStart immediately after a NumericLiteral
Fixes #4702.
2018-12-04 17:59:20 -08:00
Nathan Shively-Sanders
6cee7c3080 Better nameless parameter implicit any error (#28554)
* Initial version, doesn't work for primitives yet.

Need to find out why.

* Primitives now work, plus improve error message

null and void don't even parse without parameter names so they are not
tested.

* Codefix: Add names to nameless parameters

* Improve error wording

* Add detail to error message
2018-11-15 12:45:39 -08:00
Daniel Rosenwasser
fe263708be Merge pull request #27019 from iliashkolyar/codefix_add_missing_new_operator
Codefix: add quick fix for missing 'new' operator
2018-11-14 16:53:25 -08:00
Daniel Rosenwasser
f4fb28daa9 Merge pull request #28015 from prateekgoel/error-messages
Error messages for extending a specific type
2018-11-13 17:04:40 -08:00
Wesley Wigham
7a71887c23 Build better import paths for declaration emit/typeToString from reexports if possible (#27340)
* Build better import paths from reexports if possible, issue error on node_modules import generation

* Small refactorings

* Add file-by-file cacheing

* Minor cleanups

* Adjust error message
2018-11-13 14:07:54 -08:00
Alexander T
5c7f8ef89d Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28297-make-error-message-at--a-constant-or-a-read-only-property--more-specific 2018-11-13 09:58:30 +02:00
Daniel Rosenwasser
25462beeb7 Merge pull request #28456 from Microsoft/nonExperimentalBigInt
BigInt shouldn't be considered experimental
2018-11-12 15:59:15 -08:00
Andy
995f746c92 Add implicit-any error on JSDocFunctionType with no return type (#28487) 2018-11-12 14:39:02 -08:00
Wesley Wigham
11eee2b6ee Slightly improve missing property errors (#28298)
* Slightly improve missing property errors

* Add missing quote

* Fix jsx case

* Add related span

* Fix crash (why can declarations be undefined)

* Only skip top elaboration when no variant message is provided
2018-11-12 14:31:15 -08:00
Daniel Rosenwasser
f7ad54b432 Only complain about BigInt literals in pre-ESNext targets. 2018-11-09 16:20:54 -08:00
iliashkolyar
047b76f979 Merge branch 'master' into codefix_add_missing_new_operator 2018-11-10 01:45:11 +02:00
Daniel Rosenwasser
2585ccbe39 Merge pull request #28281 from ryanclarke/master
Add codefix for 'convert to unknown' diagnostic
2018-11-09 14:43:25 -08:00
Alexander T
5bd0051daa Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28297-make-error-message-at--a-constant-or-a-read-only-property--more-specific 2018-11-07 10:05:34 +02:00
Wesley Wigham
cc36e294cc Add related span pointing to this-shadowing location for implicitly-any this (#28299)
* Add diagnostic pointing to this-shadowing location

* Fix almost-top-level-this case

* Change message on span
2018-11-06 11:27:07 -08:00
Caleb Sander
28e9ec497c Address review comments 2018-11-05 11:36:32 -08:00
Caleb Sander
3e10dedbce Add diagnostic messages for bigints 2018-11-05 11:36:30 -08:00
Alexander
ae8d54658a exclude mention about constant from error message 'a-constant-or-a-read-only-property' to be more specific. 2018-11-03 16:07:20 +02:00
Alexander T
28fc0a28b0 add new error message 'Cannot assign to {0} because it is a constant.' 2018-11-03 15:42:00 +02:00