Anders Hejlsberg
0d3f2166e3
Automatic semicolon insertion before 'extends' in conditional type
2018-02-05 13:56:10 -08:00
Anders Hejlsberg
7c241ba2f7
Merge branch 'conditionalTypes' into inferTypes
...
# Conflicts:
# src/compiler/checker.ts
# tests/cases/fourslash/completionInJSDocFunctionNew.ts
# tests/cases/fourslash/completionInJSDocFunctionThis.ts
2018-01-30 13:40:16 -08:00
Anders Hejlsberg
4f2b5f32f9
Merge branch 'master' into conditionalTypes
2018-01-30 06:42:14 -08:00
Anders Hejlsberg
ef0c3b7667
Change precedence of 'infer T' to match 'keyof T'
2018-01-25 12:43:07 -08:00
Anders Hejlsberg
d608941480
Implement type inference in conditional types
2018-01-25 12:25:00 -08:00
Anders Hejlsberg
0e73240ea4
Disallow conditional type following 'extends'
2018-01-19 14:44:48 -08:00
Anders Hejlsberg
c360c24b9b
Fix parsing
2018-01-19 13:01:27 -08:00
Andy
9436b1cc0b
Fix formatter crash for const { ...a: b } = {};: forEachChild and emitBindingElement should handle ... before the propertyName ( #21268 )
2018-01-18 10:36:41 -08:00
Andy
466557cafb
Support parsing @template {T} in addition to @template T ( #21270 )
2018-01-18 09:45:29 -08:00
Anders Hejlsberg
4ec6fdd96f
Merge branch 'master' into conditionalTypes
...
# Conflicts:
# src/compiler/checker.ts
# src/compiler/types.ts
# tests/baselines/reference/api/tsserverlibrary.d.ts
# tests/baselines/reference/api/typescript.d.ts
2018-01-17 13:12:36 -08:00
Anders Hejlsberg
5094f7677c
Remove 'T extends U' type constructor
2018-01-15 08:11:05 -08:00
Anders Hejlsberg
53b1572ed6
Revert to extends check being part of conditional type
2018-01-15 07:59:46 -08:00
Andy
a77c6014b3
Parse comment on @property tag and use as documentation comment ( #21119 )
...
* Parse comment on @property tag and use as documentation comment
* Fix comment parsing bug -- back up after seeing `@` character
* Add test for indent
* Don't default comment to ""
2018-01-11 10:49:39 -08:00
Andy
7a1deae6aa
AsteriskToken should always have length 1 ( #21126 )
2018-01-10 12:52:35 -08:00
Andy
102368332e
Use 'append' helper more ( #21125 )
2018-01-10 11:31:13 -08:00
Andy
ddd8e759c1
Use 'append' helper ( #21101 )
2018-01-10 11:13:47 -08:00
Andy
191b9750c3
Clear jsDocCache for reused nodes ( #21099 )
2018-01-09 11:22:15 -08:00
Andy
a23bbe65e6
Use substring instead of substr ( #20578 )
...
* Use substring instead of substr
* Remove unused scanning of SyntaxKind.DotDotDotToken in jsdoc
* Remove other unnecessary jsdoc syntax kinds
* Move all pos++ together
2018-01-08 14:54:18 -08:00
Wenlu Wang
0ecdc876f3
imporve conditional operator if missing colon token ( #20498 )
...
f2
2018-01-08 13:16:17 -08:00
Andy
f83283c068
Improve parse error for double comma somewhere inside a call expression ( #20399 )
2018-01-08 10:38:55 -08:00
Andy
6f2ba15446
Start linting for double spaces ( #20820 )
...
* Start linting for double spaces
* Code review
* Fix cases that were excluded by countDoubleSpaces
* Remove extraneous closing parenthesis
2018-01-08 08:52:13 -08:00
Anders Hejlsberg
abc8110e9b
Merge branch 'master' into conditionalTypes
...
# Conflicts:
# src/compiler/checker.ts
2018-01-03 10:56:45 -08:00
Anders Hejlsberg
c5fd2f14f3
Parse xxx? as JSDoc type when not followed by token that starts type
2017-12-18 18:30:34 -08:00
Wesley Wigham
dd933f4413
Fix get symbol at location to behave correctly for parameter assignments and jsx attributes ( #20706 )
...
* Fix get symbol at location to behave correctly got parameter assignments and jsx attributes
* Handle all those edge cases that weren;t explicitly handled
* Fix part of bug WRT getTypeAtLocation and for loops
* Baseline corrections pursuant to #20710
* Restore jsdoc tag interpretation
* Clean up some code, revert fourslash tests
* Cleanup types used by PR feedback
2017-12-15 15:50:22 -08:00
Anders Hejlsberg
ec2bdfdb8b
Add 'T extends U' type operator
2017-12-12 09:52:14 -08:00
Andy
484758a3d3
Handle ! following a keyword in isClassMemberStart ( #20617 )
...
* Handle `!` following a keyword in isClassMemberStart
* Fix test
2017-12-11 09:45:36 -08:00
Anders Hejlsberg
57ca7680c9
Initial implementation of conditional type operator
2017-12-05 14:18:11 -08:00
Anders Hejlsberg
b4b9edc04c
Make sure 'async' isn't treated as a parameter modifier
2017-11-21 18:39:01 -08:00
Anders Hejlsberg
9abb72d920
Merge pull request #20166 from Microsoft/definiteAssignmentAssertions
...
Definite assignment assertions
2017-11-21 06:27:56 -08:00
Wesley Wigham
a551c4cd64
Allow curly around @type jsdoc to be optional ( #20074 )
...
* Allow curly around `@type` jsdoc to be optional
* Incorporate restructuring from @andy-ms
2017-11-20 16:10:50 -08:00
Anders Hejlsberg
272076391b
Allow '!' only on variable declarations within variable statements
2017-11-20 09:31:11 -08:00
Anders Hejlsberg
1624e1bc1a
Definite assignment assertion '!' on variable and property declarations
2017-11-19 16:48:43 -08:00
Anders Hejlsberg
b6f96052d8
Merge pull request #19976 from Microsoft/optimizeParser
...
Optimize parsing
2017-11-16 10:19:10 -08:00
Ron Buckton
a21a129abb
Merge branch 'master' into dynamicNames
2017-11-15 15:24:05 -08:00
Andy
4b96edf72f
Treat ... in jsdoc type as creating a synthetic rest parameter -- not as an array type ( #19483 )
...
* Treat `...` in jsdoc type as creating a synthetic rest parameter -- not as an array type
* Change type parsing so `...T[]` parses as `...(T[])` and not `(...T)[]`
* Replace the last parameter with ...args, and make access to it potentially undefined
* Code review
2017-11-15 13:04:08 -08:00
Anders Hejlsberg
ee851784a6
Remove dead code that didn't get removed in #19979
2017-11-14 14:03:56 -08:00
Anders Hejlsberg
dbeb68274f
Merge branch 'master' into optimizeParser
...
# Conflicts:
# src/compiler/parser.ts
2017-11-14 09:22:18 -08:00
Andy
7e8851e65b
Always require '=' before parsing an initializer ( #19979 )
...
* Always require '=' before parsing an initializer
* Fix fourslash tests
2017-11-14 07:15:59 -08:00
Anders Hejlsberg
969f06462d
Improve lookahead for arrow functions to reduce speculative parsing
2017-11-13 15:12:46 -08:00
Ron Buckton
804c7d3690
Merge branch 'master' into dynamicNames
2017-11-13 13:24:20 -08:00
Andy
9d8a854ea2
Revert "Break out of speculative parsing on bad parameter initializer ( #19158 )" ( #19975 )
...
This reverts commit e7df83263df9433d2b27a2b86e9d198fca68bd92.
2017-11-13 13:22:09 -08:00
Anders Hejlsberg
3411318e6b
Use TokenFlags.PrecedingJSDocComment to guide JSDoc comment processing
2017-11-13 09:51:56 -08:00
Andy
e7df83263d
Break out of speculative parsing on bad parameter initializer ( #19158 )
...
* Break out of speculative parsing on bad parameter initializer
* Remove uses of 'finally'
* give up -> stop
* Do without exceptions
* Remove `resetAfterSpeculation`
* Use Fail and FailList objects
* Remove `inSpeculation` parameter to parseDelimitedList
* Don't use `createNodeArray`, it's not always in scope
* Move Fail and FailList inside initializeState
* More code review
* More code review
2017-11-13 09:18:36 -08:00
Anders Hejlsberg
ddf0df9cbb
Introduce TokenFlags enum
2017-11-12 09:11:09 -08:00
Ron Buckton
3f248ecfe1
Merge pull request #19452 from Microsoft/compareStrings
...
Clean up outdated string comparison logic
2017-11-06 18:48:15 -08:00
Ron Buckton
33e09f9a9d
Merge branch 'master' into dynamicNames
2017-11-06 12:05:25 -08:00
Andy
0a7b7e07ee
Apply 'variable-name' tslint rule ( #19743 )
2017-11-06 09:23:47 -08:00
Ron Buckton
31c3d444f1
Merge branch 'master' into compareStrings
2017-11-03 23:01:51 -07:00
Ron Buckton
208dfa6b01
Merge branch 'master' into dynamicNames
2017-11-03 22:10:28 -07:00
Andy
cc2a2a79b5
Use NodeFlags to detect nodes in ambient contexts instead of climbing ancestors ( #17831 )
...
* Use NodeFlags to detect nodes in ambient contexts instead of climbing ancestors
* Set context flags on tokens
* Remove 'isDeclarationFile' parameter to 'initializeState' and move to 'parseSourceFileWorker'
* Changes based on code review
* Update API baselines
2017-11-03 08:08:48 -07:00