Joe Calzaretta and Mohamed Hegazy
bb3467b8e1
Handle type guard predicates on Array<T>.find ( #18160 )
...
* Handle type guard predicates on `Array<T>.find`
If the `predicate` function passed to `Array<T>.find` or `ReadonlyArray<T>.find`
is a type guard narrowing `value` to type `S`, then any returned element should also
be narrowed to `S`.
Adding test case and associated baselines
* trailing whitespace after merge conflict
2017-10-09 14:58:41 -07:00
Sheetal Nandi
07ba906594
Handle the case when finishCachingPerDirectoryResolution is not called because of exception
...
Fixes #18975
2017-10-09 14:32:33 -07:00
Andy and GitHub
8b60736b61
importFixes: Remove unnecessary undefined check ( #19045 )
2017-10-09 13:39:15 -07:00
Nathan Shively-Sanders and GitHub
9b51c33582
Merge pull request #19005 from charlespierce/abstract_property_in_constructor
...
Error when accessing abstract property in constructor #9230
2017-10-09 13:21:33 -07:00
Ron Buckton
264652c0ef
Fix emit for classes with both fields and 'extends null'
2017-10-09 13:14:49 -07:00
Charles Pierce
8486c48237
Fix linting error in new function
2017-10-09 13:01:30 -07:00
Sheetal Nandi and GitHub
077f70276f
Merge pull request #18970 from Microsoft/lessLoggingInTsc
...
Fine tune logging so that only triggers in watch are logged in normal mode vs verbose
2017-10-09 11:37:02 -07:00
Nathan Shively-Sanders
517dbf3ca7
Fix semicolon lint
2017-10-09 11:14:24 -07:00
Andy and GitHub
2796ebfe35
In resolveNameHelper, use a lastNonBlockLocation ( #18918 )
2017-10-09 11:04:28 -07:00
Charles Pierce
79f5d968a1
Use ancestor walk to determine if property access is within constructor #9230
2017-10-09 10:57:08 -07:00
Nathan Shively-Sanders
405d8cf8eb
In getSuggestionForNonexistentSymbol, guard name against undefined
2017-10-09 10:45:50 -07:00
Andy and GitHub
8a55baf9a3
In @typedef tag, handle property with no type ( #19013 )
2017-10-09 09:58:02 -07:00
Charles Pierce
9e00df590d
Error when accessing abstract property in constructor #9230
2017-10-06 19:46:29 -07:00
Arthur Ozga
932b1b038c
better error message
2017-10-06 16:16:37 -07:00
Arthur Ozga
0afaadba3b
add error for multiple tags
2017-10-06 15:56:39 -07:00
Klaus Meinhardt
9935bc0b2f
Merge branch 'master' into update-types3
2017-10-07 00:15:20 +02:00
Andy and GitHub
e821c2b6e9
A parameter not declared as a rest parameter is not one ( #18825 )
2017-10-06 15:05:00 -07:00
Andy and GitHub
71f8852124
Have getNameOfDeclaration return x for export default x. ( #18616 )
2017-10-06 14:29:45 -07:00
Arthur Ozga
5ea3ca4ef9
Merge branch 'master' into dev/aozgaa/JsDocExtendsSupport
2017-10-06 14:25:31 -07:00
Anders Hejlsberg and GitHub
b7e744a0e5
Merge pull request #18976 from Microsoft/strictCallbackParameters
...
Strictly check callback parameters
2017-10-06 21:36:52 +01:00
Nathan Shively-Sanders and GitHub
afa4842b2a
Merge pull request #16363 from Microsoft/excess-property-checks-for-discriminated-unions
...
Excess property checks for discriminated unions
2017-10-06 10:54:04 -07:00
Andy and GitHub
3b9bbb3e55
Remove duplicate assignment ( #18994 )
2017-10-06 10:31:45 -07:00
Andrew Casey
5c9f8c56d9
Mark getSynthesizedDeepClone @internal
2017-10-06 10:20:12 -07:00
Nathan Shively-Sanders
e1bc916b91
Merge branch 'master' into excess-property-checks-for-discriminated-unions
2017-10-06 09:18:57 -07:00
Anders Hejlsberg
70e259aba3
Always use callback parameter code path, but stricter if necessary
2017-10-06 09:16:57 -07:00
Wesley Wigham and GitHub
7a4c3314e8
Visit default export expressions ( #18977 )
2017-10-05 16:47:24 -07:00
Andrew Casey
ad148dbc88
Use deep cloning, rather than thunking for repeated substitution
...
Replaces b244cd4fb4
2017-10-05 15:46:14 -07:00
Andrew Casey
380b8df13f
Introduce getSynthesizedDeepClone
2017-10-05 15:38:02 -07:00
Andrew Casey
a5e1841180
Handle undefined in getSynthesizedClone
2017-10-05 15:37:47 -07:00
Ron Buckton
7fd38c838b
Merge branch 'master' into dynamicNames
2017-10-05 14:11:52 -07:00
Anders Hejlsberg
c3d1b027dc
Don't use callback parameter code path when strictly checking functions
2017-10-05 13:18:38 -07:00
Daniel Rosenwasser
ea2021dd3e
Create fix for uninvoked decorators.
2017-10-05 11:43:14 -07:00
Sheetal Nandi
32d705dbb5
Fine tune logging so that only triggers in watch are logged in normal logging vs verbose
2017-10-05 11:35:18 -07:00
Ron Buckton
180ca23384
Additional documentation
2017-10-05 11:34:42 -07:00
Daniel Rosenwasser and GitHub
924460406e
Merge pull request #18811 from Microsoft/uncalledDecorator
...
Give a more helpful error message for certain decorators with too many arguments
2017-10-05 11:27:46 -07:00
Sheetal Nandi
2facead886
Update tests after the merge from master
2017-10-05 09:54:21 -07:00
Nathan Shively-Sanders
da6acba71e
Merge branch 'master' into excess-property-checks-for-discriminated-unions
2017-10-05 09:07:23 -07:00
Nathan Shively-Sanders
b69652b137
Set symbol on union of spreads
...
Previously, it was only set on the top-level type, and only if that
top-level type was an object type. Now it uses `forEachType` to set the
symbol on every object type in the union as well, if `getSpreadType`
returns a union.
2017-10-05 09:01:39 -07:00
Ron Buckton
906a79df76
Support dynamic names on static members of class.
2017-10-04 21:24:32 -07:00
Ron Buckton
36f90b6ec3
General tidying up and comments.
2017-10-04 21:09:35 -07:00
Ron Buckton
fea6a87965
General tidying up and comments.
2017-10-04 20:39:02 -07:00
Ron Buckton
ee23f93275
Switch to 'unique symbol'
2017-10-04 19:34:29 -07:00
Sheetal Nandi
03441fe120
Merge branch 'master' into projectRootAsCurrentDirectoryInEmit
2017-10-04 18:48:16 -07:00
Sheetal Nandi
bf4ca30bc3
Let builder find out from imports/typereference directives if file references have changed.
...
This is needed to ensure that the ambient module addition takes effect
Fixes #15632
2017-10-04 18:09:09 -07:00
Sheetal Nandi
249725d4b7
Do not report config file errors if the file opened isnt from configured project and that project doesnt have the config errors
...
Fixes #16635
2017-10-04 16:11:20 -07:00
Sheetal Nandi
ee05d0eb1c
Compile public api so that all the updates are ensured to be correct
2017-10-04 16:09:16 -07:00
Nathan Shively-Sanders
da41217f43
Binding element with parent type any is any
...
Previously if the binding element had an initializer, then that type
would be used. But this is incorrect:
```ts
function f(x: any) {
let { d = 1 } = x;
// d should have type any not number.
// f can be called with anything:
}
f({ d: 0 });
f({ d: 'hi' });
f({});
```
2017-10-04 15:15:29 -07:00
Ron Buckton
43c151a9df
Merge branch 'master' into dynamicNames
2017-10-04 14:57:24 -07:00
Benjamin Lichtman and Mohamed Hegazy
43084829bc
Increase maximum depth of outlining span search ( #18704 )
...
* Increase max depth of outlining spans to 120
* Update tests
* Update tests to demonstrate limit
* Set limit to 40 and update tests
2017-10-04 13:48:08 -07:00
Andrew Casey and GitHub
530e107d51
Merge pull request #18936 from amcasey/GH18899
...
Localize more Extract Function/Constant strings
2017-10-04 13:33:06 -07:00