Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
903863a
Respect readonly mapped type modifier when mapping arrays and tuples
ahejlsberg Jan 12, 2019
bb8378f
Support 'readonly' type modifier on array and tuple types
ahejlsberg Jan 15, 2019
7b00a29
Accept new baselines
ahejlsberg Jan 15, 2019
db840f4
Update array/tuple relationship checking
ahejlsberg Jan 15, 2019
cff7874
Add tests
ahejlsberg Jan 15, 2019
a7ca7f4
Accept new baselines
ahejlsberg Jan 15, 2019
2256f91
Fix typo
ahejlsberg Jan 16, 2019
2ccc106
Add more tests
ahejlsberg Jan 16, 2019
b611a51
Accept new baselines
ahejlsberg Jan 16, 2019
0eac506
Add .d.ts generation test
ahejlsberg Jan 16, 2019
d24a63d
Accept new baselines
ahejlsberg Jan 16, 2019
e581649
Allow rest parameter type to be a readonly array or tuple
ahejlsberg Jan 17, 2019
2200d35
Add tests
ahejlsberg Jan 18, 2019
ef89d26
Accept new baselines
ahejlsberg Jan 18, 2019
4706a06
Merge branch 'master' into readonlyArrayTuple
ahejlsberg Jan 26, 2019
e290559
Add tests for decorators and declaration emit from error free source
ahejlsberg Jan 26, 2019
cd1f289
Accept new baselines
ahejlsberg Jan 26, 2019
4335f44
Tuples are known to be covaraint
ahejlsberg Jan 28, 2019
ea38146
Error on union types that are too complex to represent
ahejlsberg Jan 28, 2019
e727845
Higher complexity limit for unions of primitives only
ahejlsberg Jan 28, 2019
d86612c
Accept new baselines
ahejlsberg Jan 28, 2019
45af34d
Add subtype reduction complexity limit test
ahejlsberg Jan 28, 2019
54ba2cc
Accept new baselines
ahejlsberg Jan 28, 2019
151fac9
Merge branch 'master' into readonlyArrayTuple
ahejlsberg Jan 28, 2019
ff42c3d
Handle readonly arrays and tuples in decorator metadata serialization
ahejlsberg Jan 29, 2019
815f133
Accept new baselines
ahejlsberg Jan 29, 2019
3324684
Fix lint error
ahejlsberg Jan 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow rest parameter type to be a readonly array or tuple
  • Loading branch information
ahejlsberg committed Jan 17, 2019
commit e5816491bab1a33e6c98a3b599d7ec868f502789
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23180,7 +23180,7 @@ namespace ts {

// Only check rest parameter type if it's not a binding pattern. Since binding patterns are
// not allowed in a rest parameter, we already have an error from checkGrammarParameterList.
if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getTypeOfSymbol(node.symbol), anyArrayType)) {
if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getTypeOfSymbol(node.symbol), anyReadonlyArrayType)) {
error(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type);
}
}
Expand Down