Commit Graph

2550 Commits

Author SHA1 Message Date
Andy
d28fb65a1f Fix type of TypeParameterDeclaration#parent (#25737) 2018-07-17 13:35:34 -07:00
Andy
5f4a03c408 Ensure TypeChecker#getTypeAtLocation returns a defined result (#25583)
* Ensure TypeChecker#getTypeAtLocation returns a defined result

* Update additional baseline
2018-07-11 16:33:56 -07:00
Andy
8a3090bc35 Improve test for 'symbol.exports' (#25523)
* Improve test for 'symbol.exports'

* Remove SymbolFlags.HasExports and SymbolFlags.HasMembers

* Update baseline
2018-07-11 09:37:32 -07:00
Daniel Rosenwasser
d62717b281 Make getSuggestion APIs internal. 2018-07-09 11:42:38 -07:00
Daniel Rosenwasser
32bb63cbcf getSuggestionForNonexistentModule -> getSuggestionForNonexistentExport 2018-07-05 20:45:00 -07:00
Wesley Wigham
b8b34a38ec Actually cache intermediate results in getBaseConstraint (#25417)
* Have getBaseConstraint push resolutions for the types it actually recurs on

* Cache base constraints correctly
2018-07-05 15:54:43 -07:00
Wesley Wigham
5b92678285 Optimize sourcemap application more (#25425)
* Optimize sourcemap application more

* Remove test-only memory hog sourceMapDecodedMappings field

* Update for style, remove unused function that triggers warnings in node 10

* Avoid all raw buffer constructor calls

* Small TDZ fix
2018-07-05 15:12:10 -07:00
Andy
204b70d7af Don't add completions from a discriminated union type when the discriminant doesn't match (#24770)
* Don't add completions from a discriminated union type when the discriminant doesn't match

* Move code to checker

* Update API (#24966)

* Use isTypeIdenticalTo
2018-07-03 17:05:51 -07:00
Wesley Wigham
cb4cb7a75f Check if module reference requires type reference before path reference (#25385) 2018-07-03 11:41:07 -07:00
Anders Hejlsberg
e8d64a9c7c Merge pull request #25336 from Microsoft/fixResolveTypeMembers
Fix runaway recursion in object type member resolution
2018-07-03 07:53:02 -10:00
Wesley Wigham
7084e6cf47 Adds related spans and error grouping for duplicate identifier errors (#25328)
* Adds related spans and error grouping for duplicate identifier errors

* Trim trailing whitespace

* Record related info in error baselines

* Make error more whimsical
2018-07-02 10:47:52 -07:00
Anders Hejlsberg
4bca0a40b9 Guard against recursion in resolveAnonymousTypeMembers 2018-06-29 16:59:55 -10:00
Wesley Wigham
313a0b8990 Remove deprecated SymbolDisplayBuilder API (#25331)
* Remove deprecated API

* Accept API baseline updates
2018-06-29 18:37:50 -07:00
Andy
c5bd0405c4 JsxTagNameExpression can only be Identifier | ThisExpression, not any PrimaryExpression (#21555)
* JsxTagNameExpression can only be Identifier | ThisExpression, not any PrimaryExpression

* Use a type similar to PropertyAccessEntityNameExpression

* Fix lint errors
2018-06-29 16:50:44 -07:00
Wesley Wigham
30db30055f Fix module specifier case handling for declaration emit (#25110) 2018-06-29 11:02:43 -07:00
Wesley Wigham
2a19580144 Introduce more caching and deferral into jsx checking (#25302)
* Introduce more caching and deferral into jsx checking

* Accept baseline with removed duplicated error
2018-06-28 14:43:20 -07:00
Wesley Wigham
53e163df0b Add codes and categories to related information, officially (#25304) 2018-06-28 14:41:21 -07:00
Eugene Timokhov
ff28ffab9f Remove @internal from Program::isSourceFileDefaultLibrary
Fixes #25225
2018-06-26 20:40:11 +03:00
Anders Hejlsberg
70975cd08f Merge pull request #24897 from Microsoft/restTuples
Tuples in rest parameters and spread expressions
2018-06-25 19:26:35 -07:00
Anders Hejlsberg
28c9f5933a Complete support for rest elements in tuples 2018-06-24 14:32:41 -10:00
Wesley Wigham
c441451f83 Cache specifier resolutions for speed when emitting many types from the same place (#25112)
* Cache specifier resolutions for speed when emitting many types from the same place

* I swear I accepted this once already
2018-06-22 14:05:07 -07:00
Anders Hejlsberg
b0d8c6551e Merge branch 'master' into restTuples
# Conflicts:
#	src/compiler/checker.ts
2018-06-22 06:10:50 -10:00
Wenlu Wang
51e7ae0813 provide spelling suggestion for indexed access (#22225)
* provide spelling suggestion for indexed access

* update merge

* accept baseline

* fix suggession return type

* allow string or identifier on getSuggestionForNonexistentProperty

* fix lint
2018-06-21 13:40:41 -07:00
Ron Buckton
272e5554c8 Merge branch 'master' into gulpProjectRefs 2018-06-21 10:55:35 -07:00
Andy
3e50f502bb Mark some Type[] and Signature[] as ReadonlyArray (#25099) 2018-06-21 09:57:14 -07:00
Sheetal Nandi
f506b28e95 Mark the declarations visible correctly when emit is disabled but asked to emit declarations for watch mode
Fixes #25068
2018-06-20 12:28:50 -07:00
Andy
b3f9ec3796 Fix bug: Still implement a method even if the return type is defined in another file (#24978) 2018-06-19 16:36:18 -07:00
Ron Buckton
891b15f60a Update gulpfile to support project references 2018-06-18 22:45:13 -07:00
Anders Hejlsberg
4f99bc19c8 Merge branch 'master' into restTuples
# Conflicts:
#	tests/baselines/reference/APISample_Watch.errors.txt
#	tests/baselines/reference/APISample_WatchWithDefaults.errors.txt
#	tests/baselines/reference/APISample_WatchWithOwnWatchHost.errors.txt
#	tests/baselines/reference/APISample_compile.errors.txt
#	tests/baselines/reference/APISample_jsdoc.errors.txt
#	tests/baselines/reference/APISample_linter.errors.txt
#	tests/baselines/reference/APISample_parseConfig.errors.txt
#	tests/baselines/reference/APISample_transform.errors.txt
#	tests/baselines/reference/APISample_watcher.errors.txt
#	tests/baselines/reference/api/tsserverlibrary.d.ts
#	tests/baselines/reference/api/typescript.d.ts
2018-06-16 07:47:30 -07:00
Ryan Cavanaugh
73844ac565 Accept baseline 2018-06-15 11:10:54 -07:00
Ryan Cavanaugh
8491f70379 Merge branch 'master' into esau-squash
# Conflicts:
#	tests/baselines/reference/api/typescript.d.ts
2018-06-14 11:25:00 -07:00
Ryan Cavanaugh
1bbe6610a4 Merge branch 'master' into esau-squash 2018-06-13 15:35:18 -07:00
Ryan Cavanaugh
066b191982 Collapse core/compiler/parser into parser 2018-06-11 17:07:58 -07:00
Ryan Cavanaugh
336c37662d Projzilla phase 1 2018-06-09 16:48:08 -07:00
Ryan Cavanaugh
f4fcb1912c Merge pull request #24465 from RyanCavanaugh/tsbuild
"tsc -b" with minimal watch capabilities
2018-06-10 05:15:53 +12:00
Andy
04187bde8d fixStrictClassInitialization: Support array initializer (#24810) 2018-06-08 15:56:56 -07:00
Andy
48dedacf3b fixStrictClassInitialization: Don't provide a default for string or number (#24767)
* fixStrictClassInitialization: Don't provide a default for `string` or `number`

* Update baselines
2018-06-07 15:03:38 -07:00
Ryan Cavanaugh
cf87bd446d Merge branch 'master' into tsbuild 2018-06-05 14:55:51 -07:00
Wesley Wigham
d9b93903c0 Use more nodelike paths for import types when possible (#24610)
* Use more nodelike paths for import types when possible

* move functionality from services into compiler, fix with propert file/directory conflict handling

* mark suspect cast
2018-06-05 12:54:36 -07:00
Ryan Cavanaugh
45842a0c34 Merge remote-tracking branch 'weswigham/sourcemap-concatenation-station' into tsbuild 2018-06-05 12:31:32 -07:00
Andy
735a46f838 If parsing a function type fails, parseTypeReference() to ensure something is returned (#24567)
* If parsing a function type fails, parseTypeReference() to ensure something is returned

* Avoid tryParse

* Add missing semicolon

* Don't check for undefined, check for missing type

* Don't set parameters undefined, set to missingList and return false

* Update API baselines

* Code review
2018-06-05 10:24:37 -07:00
Ron Buckton
666841264c Merge branch 'master' into libReference 2018-06-04 14:38:56 -07:00
Ryan Cavanaugh
9b0dc37f42 Merge branch 'fixMissingScriptInfo' into tsbuild 2018-06-04 10:59:42 -07:00
Ryan Cavanaugh
7e9e29ce64 Store + use the resolved path of sourceFiles in proj. ref. scenarios 2018-06-01 13:20:57 -07:00
Sheetal Nandi
b0f039c9e2 Make suggestion diagnostics to wire cancellationToken
This especially needed if its a js file without the ts-check, the file wont be typechecked in getSemanticDiagnostics
Fixes part of #19458
2018-05-31 10:47:17 -07:00
Ron Buckton
b4e113b94e Merge branch 'master' into libReference 2018-05-31 10:02:08 -07:00
Ron Buckton
7de55fbb7e PR Feedback 2018-05-31 09:50:51 -07:00
Wesley Wigham
8adbf85e0e Candidate sectional sourcemap emit implementation 2018-05-30 17:53:26 -07:00
Ryan Cavanaugh
f8c4301f14 Add more errors; commandline help for --build; invalid flag combo detection 2018-05-30 10:00:35 -07:00
Ron Buckton
ec0af20f5a Merge branch 'master' into libReference 2018-05-29 14:13:00 -07:00