Commit Graph

7791 Commits

Author SHA1 Message Date
Nathan Shively-Sanders cee708df89 Remove undefined when checking patterns in function declarations 2016-12-21 10:50:38 -08:00
Nathan Shively-Sanders 604631881c Add | undefined in .d.ts for initialised params 2016-12-16 13:38:29 -08:00
Nathan Shively-Sanders 8b29e8235f Merge branch 'master' into add-undefined-to-default-valued-parameters 2016-12-16 10:03:01 -08:00
Ron Buckton 0f78f53780 Merge pull request #12967 from Microsoft/fix12749
Do not transform JSX tag names for ES3
2016-12-15 20:50:02 -08:00
Ron Buckton 14e05cd937 Fix condition in onSubstituteNode 2016-12-15 16:38:10 -08:00
Ron Buckton 40d08df90b Do not transform JSX tag names for ES3 2016-12-15 16:33:49 -08:00
Vladimir Matveev f034022e25 lift multiple statements into block if necessary (#12965) 2016-12-15 16:31:50 -08:00
Vladimir Matveev 366dfc052f expose parseCommandLine (#12934) 2016-12-14 21:53:33 -08:00
Bill Ticehurst b0f42f04ee Fix __awaiter helper for IE8 compat 2016-12-14 15:45:05 -08:00
Anders Hejlsberg 8265e29038 Merge pull request #12927 from Microsoft/mappedTypesPropsAndIndex
Preserve declared properties when mapping types with index signatures
2016-12-14 15:23:29 -08:00
Anders Hejlsberg f58e1a2b17 Map both declared properties and string index signatures 2016-12-14 14:59:00 -08:00
Daniel Rosenwasser 8e94d84953 Merge pull request #12893 from Microsoft/capturedThisFix
Avoid replacing last statement of derived constructors if 'this' is referenced.
2016-12-14 13:31:08 -08:00
Daniel Rosenwasser 784eac5cbd Indented and-ed expressions. 2016-12-14 12:56:40 -08:00
Nathan Shively-Sanders bb6f3ad29a Add parameter initialisers to control flow
Also a little code to emit them in declarations, but this doesn't work
yet.
2016-12-14 08:48:39 -08:00
Andy 757af496e1 Merge pull request #12862 from Microsoft/neater_checker
Make some code in checker neater
2016-12-14 07:48:40 -08:00
Nathan Shively-Sanders ae2a13cf18 Merge pull request #12896 from Microsoft/implicit-any-error-on-explicit-any
Set symbol/flags only on (fresh) object spreads
2016-12-13 14:15:52 -08:00
Nathan Shively-Sanders 8dc1747db7 Set symbol/flags only on (fresh) object spreads
If you spread any into an object, the type is any, which should not be
changed.
2016-12-13 13:52:58 -08:00
Vladimir Matveev c71e6cc9ef add a new line if after writing trailing comments (#12894) 2016-12-13 12:57:21 -08:00
Daniel Rosenwasser 7da4b857f2 Don't replace the last statement if 'this' is used/captured within the constructor. 2016-12-13 11:58:58 -08:00
Vladimir Matveev e5e1533d49 mark types used in decorator metadata as referenced (#12890) 2016-12-13 11:46:06 -08:00
Nathan Shively-Sanders d62dd291bd Merge branch 'master' into add-undefined-to-default-valued-parameters 2016-12-13 10:40:04 -08:00
Andy Hanson 891159c6ac Make some code in checker neater 2016-12-13 07:21:55 -08:00
Mohamed Hegazy c76a3a6fef Merge pull request #12782 from Microsoft/fix12439
Fix paramtypes metadata emit
2016-12-12 16:22:34 -08:00
Mohamed Hegazy 24c56a5733 Merge pull request #12775 from Microsoft/fix12724
Fix error on extends in declaration file with importHelpers
2016-12-12 16:18:22 -08:00
Nathan Shively-Sanders 525a06f2b3 Merge pull request #12858 from Knagis/master
Fixed missing whitespace in jsDoc comments. Fixes #12236
2016-12-12 15:12:57 -08:00
Kārlis Gaņģis aa4a0b6469 Fixed jsDoc parser - no longer omits asterisks in the middle (if the line does not start with asterisk) and additional case for whitespaces being ignored 2016-12-13 00:05:16 +02:00
Anders Hejlsberg 055c0af397 Merge pull request #12843 from Microsoft/mappedTypeModifiers3
Additional tweak to mapped type property modifier propagation
2016-12-12 13:15:19 -08:00
Vladimir Matveev d0506735e3 elaborate check before converting fresh literal type to regular (#12595) 2016-12-12 12:37:06 -08:00
Kārlis Gaņģis 19070648eb Added test for https://github.com/Microsoft/TypeScript/issues/12236 2016-12-12 22:33:45 +02:00
Andy a33e6536e0 Merge pull request #12852 from Microsoft/untyped_augmentation_2
Produce an error for an augmentation of an untyped module even if `moduleNotFoundError` is not defined
2016-12-12 12:33:37 -08:00
Kārlis Gaņģis 05b17255f6 Fixed missing whitespace in jsDoc comments. Fixes https://github.com/Microsoft/TypeScript/issues/12236 2016-12-12 21:40:00 +02:00
Nathan Shively-Sanders 65bb78d569 Merge pull request #12808 from Microsoft/self-referencing-spread-recursive-loop
Self-referencing spread recursive loop
2016-12-12 10:40:34 -08:00
Vladimir Matveev 496a14a021 create new lexical environment for the body of converted loop (#12831) 2016-12-12 10:18:30 -08:00
Vladimir Matveev a604d84f5c guard against visiting the same symbol table multiple times (#12818) 2016-12-12 10:17:07 -08:00
Andy Hanson 83eddb549e Produce an error for an augmentation of an untyped module even if moduleNotFoundError is not defined 2016-12-12 07:36:54 -08:00
Anders Hejlsberg 52291762d7 Additional tweak to mapped type property modifier propagation 2016-12-11 17:43:46 -08:00
Anders Hejlsberg 7c5c664a1c Merge pull request #12826 from Microsoft/mappedTypeModifiers2
Improve propagation of modifiers in mapped types
2016-12-10 15:16:05 -08:00
Anders Hejlsberg 57cb4aceb7 Merge pull request #12770 from Microsoft/deferIndexedAccess
Defer indexed access T[K] with non-generic K
2016-12-10 15:15:39 -08:00
Anders Hejlsberg 33b512548e Pick<T, K> and similar mapped types propagate modifiers from T 2016-12-10 10:04:30 -08:00
Jason Ramsay c40508cf1c getSupportedExtensions optimization to reduce allocations 2016-12-09 16:25:09 -08:00
Jason Ramsay 05160cae8e Rename fileExtensionMap: fileExtensionMapItem[] to extraFileExtensions: FileExtensionInfo[] 2016-12-09 13:36:43 -08:00
Jason Ramsay 4cb5a36cb4 Merge branch 'master' into tsconfigMixedContentSupport 2016-12-09 10:58:33 -08:00
Nathan Shively-Sanders a52805f641 Use checkExpression in checkSpreadExpression
Not checkExpressionCached. checkExpressionCached ignores ongoing control
flow analysis, which causes the following loop to make the compiler
recur infinitely:

```ts
let a = []
for (const x of []) {
    a = [...a]
}
```
2016-12-09 10:50:14 -08:00
Jason Ramsay d52894302a Changes due to CR comments 2016-12-08 17:56:08 -08:00
Ron Buckton 00abd7e28b Fix paramtypes metadata emit 2016-12-08 17:04:37 -08:00
Sheetal Nandi 81452c544a Do not report unused local error on locals that are intended for removing properties with object spread
Fixes #12766
2016-12-08 15:12:35 -08:00
Ron Buckton 09761b5f07 Fix error on extends in declaration file with importHelpers 2016-12-08 13:43:32 -08:00
Anders Hejlsberg 29f6e7ff12 Merge branch 'master' into deferIndexedAccess
# Conflicts:
#	src/compiler/checker.ts
#	tests/baselines/reference/keyofAndIndexedAccess.js
#	tests/baselines/reference/keyofAndIndexedAccess.symbols
#	tests/baselines/reference/keyofAndIndexedAccess.types
#	tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts
2016-12-08 09:53:56 -08:00
Nathan Shively-Sanders f79fca7087 Merge pull request #12675 from Microsoft/subsubclass-can-access-protected-constructor
Subsubclass can access protected constructor
2016-12-08 08:58:58 -08:00
Anders Hejlsberg ca2768caf6 Property report circularity errors in indexed access types 2016-12-08 06:40:02 -08:00