Klaus Meinhardt
15e69acc20
capture thisArg of optionalChaining in parens ( #35494 )
...
Fixes : #35476
2021-03-03 19:35:17 -08:00
Klaus Meinhardt and Ron Buckton
7751ecb544
fix receiver on calls of imported and exported functions ( #35877 )
...
* fix receiver of imported and exported functions
fixes : #35420
* Rebase against master and clean up substitution flow
* Add evaluator tests
* Fix evaluator tests
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com >
2021-03-03 10:38:32 -08:00
Klaus Meinhardt
9171aa5a1b
fix forEachChildRecursively ( #42300 )
2021-01-13 03:20:46 -08:00
Klaus Meinhardt and Nathan Shively-Sanders
8b6bd41ce7
getPropertiesOfUnionOrIntersectionType: handle types with index signature ( #31979 )
...
* getPropertiesOfUnionOrIntersectionType: handle types with index signature
Fixes : #31565
* fix test
* more testing
* fix typo in checker.ts
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com >
2020-03-13 14:30:53 -07:00
Klaus Meinhardt
7bd6209fbc
Don't parse duplicate JSDoc for ExpressionStatement starting with ParenthesizedExpression ( #36289 )
...
* don't parse JSDoc on ExpressionStatement if it starts with ParenthesizedExpression
* update test
2020-03-12 14:42:49 -07:00
Klaus Meinhardt
24dd93fc2b
Fix access of protected members on generic this-type ( #36928 )
...
Fixes : #36926
2020-02-21 09:33:21 -08:00
Klaus Meinhardt
9b518c8f53
Exempt ambient private properties from noImplicitAny ( #36640 )
2020-02-14 15:01:18 -08:00
Klaus Meinhardt
8e0b091795
es2018: visit other binding elements when transforming object destructuring with rest ( #35872 )
...
* es2018: visit other binding elements when transforming object destructuring with rest
fixes : #35771
* more tests
2020-01-24 15:50:29 -08:00
Klaus Meinhardt
49eb0d7a2b
Disallow 'declare' modifier on private named properties ( #36381 )
...
Fixes : #36345
2020-01-23 13:18:10 -08:00
Klaus Meinhardt
0276e7f910
noErrorTruncation affects semantic diagnostics ( #36306 )
2020-01-23 11:10:05 -08:00
Klaus Meinhardt
342f4c0b54
forceConsistentCasingInFileNames affects module resolution ( #36334 )
2020-01-21 12:45:13 -08:00
Klaus Meinhardt
1fbe20fe75
resolveJsonModule affectsModuleResolution ( #36290 )
...
* resolveJsonModule affectsModuleResolutionFixes: #36251
* fix lint
2020-01-21 11:49:38 -08:00
Klaus Meinhardt
bc1e7728df
experimentalDecorators and emitDecoratorMetadata affect builder state ( #36297 )
...
* experimentalDecorators and emitDecoratorMetadata affect builder state
* better test
2020-01-21 11:28:55 -08:00
Klaus Meinhardt
2dd21a08f5
useDefineForClassFields affects emit ( #36308 )
...
* useDefineForClassFields affects emit
* fix lint
2020-01-21 11:28:04 -08:00
Klaus Meinhardt
f220e62ce7
importsNotUsedAsValue affects semantic diagnostics ( #36001 )
...
* importsNotUsedAsValue affects semantic diagnostics
* add tests
2020-01-15 15:08:16 -08:00
Klaus Meinhardt
6e3ab1529f
remove private named properties from rest and spread types ( #35950 )
...
* remove private named properties from rest and spread types
Fixes : #35943
* code review
2020-01-14 14:47:39 -08:00
Klaus Meinhardt
38b53790af
Allow destructuring the same property multiple times
...
Fixes : #35939
2020-01-08 14:21:28 -05:00
Klaus Meinhardt and Ron Buckton
fce728e07f
fix emit for delete on optional chain ( #35090 )
...
* fix emit for delete on optional chain
* Apply suggestions from code review
Co-Authored-By: Ron Buckton <ron.buckton@microsoft.com >
2019-11-18 16:34:47 -08:00
Klaus Meinhardt
5321dcb09f
disallow 'await' and 'yield' in property and enum member initializer ( #34892 )
...
* disallow 'await' and 'yield' in property and enum member initializer
* accept baseline changes
* Add a test for #34887
Ensures that this fixes #34887
2019-11-14 17:44:48 -08:00
Klaus Meinhardt
8f40ac06cc
optimize transform of optional chaining and nullish coalescing ( #34951 )
...
* optimize transform of optional chaining and nullish coalescing
* remove unnecessary condition
* typo
* fix lint
* prevent capturing of super
* swap branches again
* accept new baselines
* avoid temporary objects
2019-11-14 17:34:13 -08:00
Klaus Meinhardt
94f85901d7
strip QuestionToken from MethodDeclaration and PropertyDeclaration emit ( #34954 )
...
* strip QuestionToken from MethodDeclartion emit
Fixes : #34953
* test property emit
2019-11-12 10:30:46 -08:00
Klaus Meinhardt
45d0ef9441
factory: parenthesize for-of expression when necessary ( #34229 )
...
Fixes : #33856
2019-10-17 10:17:33 -07:00
Klaus Meinhardt
178417f431
factory: correctly parenthesize conditional head ( #34227 )
...
Fixes : #34109
2019-10-16 10:41:52 -07:00
Klaus Meinhardt
e48cd3a101
Fix noImplicitAny check on ambient private getters ( #33896 )
2019-10-09 10:05:26 -07:00
Klaus Meinhardt
27697551e2
remove useless baselines
2019-08-18 21:48:55 +02:00
Klaus Meinhardt
1d942f4ddc
Detect more TS syntax in JS files
...
* optional class methods
* type arguments on tagged template expressions
2019-08-18 21:46:53 +02:00
Klaus Meinhardt
efa19f6777
remove useless condition as argumentExpression is always defined ( #31567 )
...
* remove useless condition as argumentExpression is always defined
* fix formatting
* remove obsolete diagnostic
2019-08-15 15:25:10 -07:00
Klaus Meinhardt
8eeb763cdd
report invalid modifiers on class expression properties
...
Fixes : #32532
2019-08-14 21:00:19 +02:00
Klaus Meinhardt
392d775095
allow const-assertion on aliased enum symbol ( #32110 )
...
Fixes : #32087
2019-06-26 14:42:06 -07:00
Klaus Meinhardt
0c9db717ad
fix parsing of leading union/intersection operator ( #31265 )
...
* fix parsing of leading union/intersection operator
Fixes : #30995
* test declaration emit
2019-05-08 14:09:11 -07:00
Klaus Meinhardt
3c2f368908
add assert
2019-05-06 21:31:20 +02:00
Klaus Meinhardt
676ed3ead7
parseProjectReferenceConfigFile: always set SourceFile.path
2019-05-06 17:17:24 +02:00
Klaus Meinhardt
4ee0084fa1
avoid more useless type assertions ( #31239 )
2019-05-03 14:51:54 -07:00
Klaus Meinhardt
883b00df35
parseJsonConfigFileContent: add extendedConfigCache parameter
2019-05-02 21:24:58 +02:00
Klaus Meinhardt
5bc8a8dddf
JSDocTypeTag.typeExpression is not optional ( #30452 )
2019-04-30 09:46:32 -07:00
Klaus Meinhardt
de9b91f46a
simplify pragma comment parsing ( #31144 )
...
* simplify pragma parsing
* use emptyArray
2019-04-29 14:17:48 -07:00
Klaus Meinhardt
d865ea774a
resolveName: remove useless case ( #28669 )
...
PropertySignature cannot occur in a class.
The condition inside the clause required the parent to be a class, so it was never true.
This removes the case clause and the part of the condition that is now useless.
2019-04-25 15:43:43 -07:00
Klaus Meinhardt
b45df892a8
emit error on destructuring of rest property ( #29609 )
...
Fixes : #26005
2019-04-25 13:33:49 -07:00
Klaus Meinhardt
760393f893
fix false positive 'variable is used before being assigned' in destructuring ( #29636 )
...
Fixes : #29458
2019-04-23 13:22:37 -07:00
Klaus Meinhardt
12edac0925
getEffectiveBaseTypeNode: only use JSDoc augments if there is extends ( #29349 )
2019-02-05 15:51:55 -08:00
Klaus Meinhardt
782622f9cd
clarify error message for 'readonly' type operator
2019-01-31 19:44:49 +01:00
Klaus Meinhardt
d72271b800
update baseline
2019-01-31 11:29:29 +01:00
Klaus Meinhardt
f4747f4667
Merge branch 'master' of github.com:Microsoft/TypeScript into add-to-types2
2019-01-31 11:25:01 +01:00
Klaus Meinhardt
0604ae1a81
revert invalid baseline change
2019-01-27 19:35:18 +01:00
Klaus Meinhardt
33853e2258
accept baseline changes
2019-01-27 17:46:32 +01:00
Klaus Meinhardt
451ff29263
revert change of trailing comment parsing
2019-01-27 17:41:20 +01:00
Klaus Meinhardt
68133e5fad
Merge branch 'master' into shebang-comments
2019-01-27 17:37:10 +01:00
Klaus Meinhardt
680cc3dbf4
accept baseline change
2019-01-25 17:02:00 +01:00
Klaus Meinhardt
6eb83650ea
Merge branch 'master' into add-to-types2
2019-01-25 16:56:11 +01:00
Klaus Meinhardt
a9653bb5df
Merge branch 'master' of github.com:Microsoft/TypeScript into usedbeforedeclaration-objectspread
2019-01-25 15:50:27 +01:00
Klaus Meinhardt
d7cb14adbd
Merge branch 'master' into usedbeforedeclaration-objectspread
2019-01-25 15:49:14 +01:00
Klaus Meinhardt
b52a7fc3ea
Exclude JSDoc @extends from 'super()' checks ( #29308 )
...
* Exclude JSDoc @extends from 'super()' checks
This fixes a similar problem as #29244 where JSDoc `@extends`
* fix check 'super can only be referenced in a derived class'
2019-01-09 10:35:22 -08:00
Klaus Meinhardt
4cd859aa85
Allow referencing 'this' in parameters of functions in the constructor
...
Fixes : #29286
2019-01-07 22:09:27 +01:00
Klaus Meinhardt
2a2b573fa2
Merge branch 'master' of github.com:Microsoft/TypeScript into shebang-comments
2019-01-03 22:44:57 +01:00
Klaus Meinhardt
e68f495b44
update baselines
2019-01-03 17:51:13 +01:00
Klaus Meinhardt
66314e1f85
Merge branch 'master' of github.com:Microsoft/TypeScript into rest-param-destructuring
2019-01-03 17:45:17 +01:00
Klaus Meinhardt
6eb9165553
Merge branch 'master' into shebang-comments
2019-01-03 17:38:25 +01:00
Klaus Meinhardt
6a9ad0e2eb
Fix crash in organizeImports
...
Fixes : #29236
2019-01-03 16:20:46 +01:00
Klaus Meinhardt
a769c35484
property is used before its initialization: check more nodes
...
Fixes : #29125
2018-12-23 23:13:46 +01:00
Klaus Meinhardt
67f037ccf4
Avoid uses of ES6 Set, use Array instead
...
Fixes : #28918
2018-12-08 22:34:47 +01:00
Klaus Meinhardt
635780db07
ArrowFunction has no own 'arguments'
...
Fixes : #28621
2018-11-20 23:07:01 +01:00
Klaus Meinhardt
94d7e30393
MethodSignature doesn't have 'arguments' ( #28625 )
...
Fixes : #28622
2018-11-20 13:01:34 -08:00
Klaus Meinhardt
fdf37360d7
update API baselines with new version number
2018-11-20 18:28:13 +01:00
Klaus Meinhardt
12ef619dc6
resolve TypeReference in class decorator at parent of class
...
Fixes : #28603
2018-11-19 22:39:01 +01:00
Klaus Meinhardt
1ad7b0fe69
forEachToken: correctly handle JSDocTag ( #28369 )
...
* forEachChild: handle JSDocTags and all their children
* fix codefix for unused identifier
* fix lint
* fix build
* Fix test failures
2018-11-15 13:22:25 -08:00
Klaus Meinhardt
5acf8e380b
fix lint
2018-11-12 21:47:50 +01:00
Klaus Meinhardt
b55b6e2f6b
fix comment parsing at start of file
...
* skip shebang if present (fixes : #28477 )
* don't parse trailing comments as they are also treated like leading comments
2018-11-12 21:45:36 +01:00
Klaus Meinhardt
3dfd9c1b9b
Add test for #28468
2018-11-11 18:47:02 +01:00
Klaus Meinhardt
bcc4e64832
revert changes to tsbuild.ts
2018-11-08 23:36:54 +01:00
Klaus Meinhardt
e2947fac1c
remove even more redundant internal comments
2018-11-07 16:12:48 +00:00
Klaus Meinhardt
a0767437f6
remove some useless internal comments
2018-11-01 17:48:52 +01:00
Klaus Meinhardt
1397fed2ad
Only suggest adding to types if present in compilerOptions
...
Fixes: https://github.com/Microsoft/TypeScript/pull/28211#issuecomment-434438407
2018-10-30 21:31:22 +01:00
Klaus Meinhardt
33568795e0
Suggest adding to tsconfig after installing @types ( #28211 )
...
Ref: https://github.com/Microsoft/TypeScript/pull/28168#issuecomment-433554228
2018-10-30 11:33:05 -07:00
Klaus Meinhardt
3fb8873bc2
don't resolve import types in JSDoc of TS files ( #28158 )
2018-10-26 09:50:12 -07:00
Klaus Meinhardt
5b3fe6e68b
update other interfaces and implementations
...
and accept baseline
2018-10-22 21:23:04 +02:00
Klaus Meinhardt
3b058a4de4
fix compile errors, accept baselines
2018-10-22 21:12:12 +02:00
Klaus Meinhardt
96480b5ba9
fix return type of LangageServiceHost.resolve*
...
Fixes : #28058
2018-10-22 20:59:42 +02:00
Klaus Meinhardt
63a8cb6933
use Map instead of Array
2018-10-21 19:57:23 +02:00
Klaus Meinhardt
ea0c7eb3ce
Fix performance regression when reusing old state
...
Fixes : #28025
2018-10-21 18:15:01 +02:00
Klaus Meinhardt
f71030f011
Simply override extendedSourceFiles array
2018-09-17 21:24:26 +02:00
Klaus Meinhardt
78d221993b
fix getExtendedConfig in commandLineParser
...
* remove invalid assertion
* fix invalid array spread on possibly undefined value
* only add unique files to extendedSourceFiles, preventing the array from growing infinitely
2018-09-17 14:41:48 +02:00
Klaus Meinhardt
66a401ae64
Fix FunctionType emit when only parameter has no type
...
Fixes : #27018
2018-09-11 09:39:11 +02:00
Klaus Meinhardt
c203c27f00
Error accessing abstract property in constructor of abstract subclass
...
Fixes : #26411
2018-09-06 08:52:53 +02:00
Klaus Meinhardt
239a7b9a4f
better condition for file include exhaustiveness check
...
As `files` always contains declaration files of external libraries, lib files and declaration files from typeRoots, the previous condition evaluated to false for probably all projects out there.
This changes the condition to compare array length after filtering out all declaration files.
That avoids unnecessary work of path normalization in the common case where everything is ok.
2018-09-04 13:35:57 +02:00
Klaus Meinhardt
d519e3f21e
hand over to LanguageServiceHost.readDirectory
2018-09-03 09:51:02 +02:00
Klaus Meinhardt
3806ee7406
Assert CompilerHost.readDiretory for projectReferences with include
...
Fixes : #26785
2018-09-02 21:42:38 +02:00
Klaus Meinhardt
b2850ee467
remove useless condition
2018-08-30 22:13:39 +02:00
Klaus Meinhardt
bedf776b42
Revert #26360 : Don't error on destructure of private property with computed property syntax
2018-08-23 09:08:29 +02:00
Klaus Meinhardt
beed179f58
disallow abstract property access in property initializer
...
Fixes : #26407
2018-08-14 22:38:03 +02:00
Klaus Meinhardt
ad4403e43a
moduleNameResolver: fix invalid assertion and avoid unnecessary work ( #26319 )
...
* moduleNameResolver: fix invalid assertion and avoid unnecessary work
Part of #18217
* assert nonRelativeModuleName
2018-08-10 15:59:08 -07:00
Klaus Meinhardt
3469b62be6
review comments
2018-08-10 22:25:27 +02:00
Klaus Meinhardt
4db7c869e5
restore old algorithm
2018-08-10 22:11:16 +02:00
Klaus Meinhardt
d2dc17d765
fix handling if there is no commonPrefix
2018-08-09 11:50:00 +02:00
Klaus Meinhardt
711b5660cb
unittests/moduleResolution: actually assert in checkResolvedModule
...
this change uncovered a bug in testPreserveSymlinks which always silently failed
2018-08-08 21:16:09 +02:00
Klaus Meinhardt
20442fe363
handle failed lookups
2018-08-08 20:45:31 +02:00
Klaus Meinhardt
95082e4743
make it work for root directory
2018-08-08 20:29:59 +02:00
Klaus Meinhardt
ec1ff29a8c
really, really fix test(?)
2018-08-08 17:10:22 +02:00
Klaus Meinhardt
27d2a2d564
add test
2018-08-08 17:05:31 +02:00
Klaus Meinhardt
95494efe50
fix commonPrefix handling
2018-08-08 16:58:35 +02:00
Klaus Meinhardt
f31b9d3891
fix test
2018-08-08 16:38:42 +02:00