Commit Graph

11648 Commits

Author SHA1 Message Date
Ryan Cavanaugh 7a1de6142b Scaffold watch mode 2018-06-01 09:44:35 -07:00
Ryan Cavanaugh d21c03ab9d Invalidation + separated downstream builds 2018-05-31 14:38:26 -07:00
Ryan Cavanaugh cd7a844a48 We definitely have a type system 2018-05-30 10:12:51 -07:00
Ryan Cavanaugh f8c4301f14 Add more errors; commandline help for --build; invalid flag combo detection 2018-05-30 10:00:35 -07:00
Ryan Cavanaugh fe191fec6d Merge branch 'master' into tsbuild 2018-05-29 13:14:12 -07:00
Ryan Cavanaugh 70fa29b627 Add graph ordering tests 2018-05-29 10:00:54 -07:00
Ryan Cavanaugh a7fcbcd3a4 Use better toposorting algorithm 2018-05-25 16:06:33 -07:00
Mohamed Hegazy a7a68d9591 Merge branch 'fix-es5-export-class-name-object' of https://github.com/Kingwl/TypeScript into Kingwl-fix-es5-export-class-name-object 2018-05-25 15:45:31 -07:00
王文璐 7f127de89e remove invalid check 2018-05-25 09:36:16 +08:00
Ryan Cavanaugh 1863d3fd48 Graph ordering test WIP 2018-05-24 17:48:45 -07:00
Ryan Cavanaugh 8ac795ba01 Correctly skip upstream-blocked projects 2018-05-24 16:21:32 -07:00
Wesley Wigham 8f9c0861bc Use external aliases in quickinfo and signature help return types (#24391)
* Dont include import types in quick info type names

* Add UseAliasDefinedOutsideCurrentScope flag to LS operations which were missing it
2018-05-24 15:19:57 -07:00
Nathan Shively-Sanders e250942d6a Disallow nested object param syntax in callback tag (#24392)
* Callback tag:Disallow nested-object-param syntax

Previously this caused a crash in parsing. If/when we want to support
this syntax, we will need to fix this crash.

* Update baselines
2018-05-24 15:11:33 -07:00
Elizabeth Dinella 13734e7d68 Fix for issue #6154 - overriding methods with properties in the derived class (#24343)
* Fix to issue 6154 - Overriding a method with a property in the derived class should not cause a compiler error

* new baselines

* fixed deleted baselines
2018-05-24 14:12:13 -07:00
Ryan Cavanaugh 19ab8abbb9 Fix strictNullChecks breaks 2018-05-24 13:42:12 -07:00
Sheetal Nandi 51058b56e5 Do not trigger invalidation if emitted file is in declarationDir 2018-05-24 13:36:52 -07:00
Ryan Cavanaugh 8936b030cd Merge branch 'master' into tsbuild 2018-05-24 13:01:58 -07:00
Wesley Wigham 4be4e56579 Hoisted declarations should occur after prologue directives (#24386) 2018-05-24 12:49:02 -07:00
Ryan Cavanaugh 07812796d1 Add resolution branding 2018-05-24 12:46:28 -07:00
Ryan Cavanaugh 8a883ae204 Comments 2018-05-24 12:38:33 -07:00
Ryan Cavanaugh fc22b5b146 WIP 2018-05-24 10:59:07 -07:00
Andy ee8337d8e4 Minor cleanups in importFixes (#23995) 2018-05-24 07:46:39 -07:00
王文璐 d5239cdf6a fix ambient context 2018-05-24 18:20:54 +08:00
kingwl cb2be44d02 fix export class declare with name object targeting es5 (#17494) 2018-05-24 18:16:38 +08:00
Mohamed Hegazy 10ac8b47e5 Merge pull request #22022 from Kingwl/enum-eval-div-zero
disallow nan and infinity in enum member
2018-05-23 15:32:35 -07:00
Wenlu Wang 4606709672 add code fix convert to mapped object type (#24286)
* add code fix convert to mapped object type

* add support for type literal and improve test

* fix typo

* add support for heritageClauses

* only determine declaration is not class
2018-05-23 14:09:49 -07:00
Andy 5983c45e24 Fix typo: seperate -> separate (#24338)
* Fix typo: seperate -> separate

* update tests
2018-05-23 09:36:17 -07:00
Wesley Wigham 0102f8050c Check for keyof constraint type instead of syntactic check (#24098)
* Check for keyof constraint type instead of syntactic check

* Readopt older candidateType check, even though it shouldnt really matter

* OK. Just use maybetypeOfKind

* Remove redundant boolean check
2018-05-22 16:58:31 -07:00
Wesley Wigham 8b8cd31784 Use unknown serialization kind when type symbol isnt resolved (#24332)
* Use unknown serialization kind when type symbol isnt resolved

* Add test for the isolated modules case
2018-05-22 16:56:12 -07:00
Andy e53e56cf82 Enable '--strictNullChecks' (#22088)
* Enable '--strictNullChecks'

* Fix API baselines

* Make sys.getEnvironmentVariable non-nullable

* make properties optional instead of using `| undefined` in thier type

* reportDiagnostics should be required

* Declare firstAccessor as non-nullable

* Make `some` a type guard

* Fix `getEnvironmentVariable` definition in tests

* Pretend transformFlags are always defined

* Fix one more use of sys.getEnvironmentVariable

* `requiredResponse` accepts undefined, remove assertions

* Mark optional properties as optional instead of using `| undefined`

* Mark optional properties as optional instead of using ` | undefined`

* Remove unnecessary null assertions

* Put the bang on the declaration instead of every use

* Make `createMapFromTemplate` require a parameter

* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional

* Plumb through undefined in emitLsit and EmitExpressionList

* `ElementAccessExpression.argumentExpression` can not be `undefined`

* Add overloads for `writeTokenText`

* Make `shouldWriteSeparatingLineTerminator` argument non-nullable

* Make `synthesizedNodeStartsOnNewLine` argument required

* `PropertyAssignment.initializer` cannot be undefined

* Use one `!` at declaration site instead of on every use site

* Capture host in a constant and avoid null assertions

* Remove few more unused assertions

* Update baselines

* Use parameter defaults

* Update baselines

* Fix lint

* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions

* Make Node#symbol and Type#symbol non-optional to reduce assertions

* Make `flags` non-nullable to reduce assertions

* Convert some asserts to type guards

* Make `isNonLocalAlias` a type guard

* Add overload for `getSymbolOfNode` for `Declaration`

* Some more `getSymbolOfNode` changes

* Push undefined suppression into `typeToTypeNodeHelper`

* `NodeBuilderContext.tracker` is never `undefined`

* use `Debug.assertDefined`

* Remove unnecessary tag

* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
2018-05-22 14:46:57 -07:00
Wesley Wigham 3fe946df78 Use symbolToTypeNode for class & interface references (#24330)
* Use merged symbols when calculating qualification, use symbolToTypeNode

* Accept baselines
2018-05-22 14:09:45 -07:00
Ryan Cavanaugh fa07830ca9 Passing tests 2018-05-22 12:53:31 -07:00
Andy 7106a587cc Add type for diagnostics where location is defined (#23686)
* Add type for diagnostics where location is defined

* getSemanticDiagnostics may return global diagnostics

* Reduce array creation
2018-05-22 11:01:18 -07:00
Anders Hejlsberg a5029e3d4e Merge pull request #23794 from Microsoft/fixDiscriminatedContextualType
Fix discriminant checking in contextual types
2018-05-22 10:35:29 -07:00
Ryan Cavanaugh 18f2baa88b Fix errors 2018-05-22 10:16:24 -07:00
Andy 982c8d0af9 Add suggestion diagnostics for unused label and unreachable code (#24261)
* Add suggestion diagnostics for unused label and unreachable code

* Always error on unused left hand side of comma
2018-05-22 07:56:29 -07:00
Anders Hejlsberg f52c4af448 Merge pull request #24310 from Microsoft/nonWideningLiteralInferences
Non-widening literal type inferences
2018-05-22 06:56:34 -07:00
Ryan Cavanaugh 5a9a88320a WIP 2018-05-22 00:15:27 -07:00
Ryan Cavanaugh 76d2ba64df Testing WIP 2018-05-21 21:24:29 -07:00
Ryan Cavanaugh 6d04378e90 Testing WIP 2018-05-21 19:40:09 -07:00
Ryan Cavanaugh 7e0825a3e7 Clean, etc 2018-05-21 17:47:58 -07:00
Mohamed Hegazy a9e89ce3f1 Merge pull request #24180 from Microsoft/updateVersion
Update version
2018-05-21 17:18:39 -07:00
Anders Hejlsberg 8528dbee76 Handle union types in getRegularTypeOfLiteralType 2018-05-21 16:17:56 -07:00
Andy 802dc2bb9b fixUnusedIdentifier: If every VariableDeclaration is unused, remove the VariableStatement (#24231) 2018-05-21 15:54:33 -07:00
Anders Hejlsberg c8ac085498 Infer non-widening literal types when type parameter constraint includes primitive types 2018-05-21 15:28:51 -07:00
Ryan Cavanaugh b1dedf2540 WIP 2018-05-21 13:05:14 -07:00
Ryan Cavanaugh b2720adbc3 Lint 2018-05-21 10:56:24 -07:00
Daniel Rosenwasser 3563a0576d Use single quotes around 'typeof' in message. 2018-05-18 23:44:38 -07:00
Wesley Wigham 02fe840732 Get constraint with this argument of the type parameter for comparisons (#21210)
* Get constraint with this argument of the type parameter for comparisons

* Also instantiate indexed accesses

* Add much simpler test
2018-05-18 18:30:23 -07:00
Andy 4c22bf786e getEditsForFileRename: Do fresh module resolution instead of relying on cache (#24211)
* getEditsForFileRename: Do fresh module resolution instead of relying on cache

* Add host.resolveModuleNameWithFailedLookupLocations method

* Make host.resolveModuleNameWithFailedLookupLocations mandatory, and implement for Project

* Add test, and no need to check host.fileExists

* Change method name and always use cache

* Update name in string
2018-05-18 16:42:42 -07:00