32 Commits

Author SHA1 Message Date
Sheetal Nandi
0019cee6de Handle --isolatedModules and d.ts emit in the builder 2019-09-11 12:52:23 -07:00
Sheetal Nandi
c0f0d9f798 Merge branch 'master' into dtsOnlyEmit 2019-09-11 12:42:48 -07:00
Sheetal Nandi
11fd654cf9 Separate emitOnlyDtsFiles and forcing dts emit (for builder signature detection where we want it irrespective of settings) 2019-09-09 16:22:50 -07:00
Alexander
b1d748b644 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-08-31 22:12:41 +03:00
Sheetal Nandi
79bcb3d547
Handle seenEmittedFiles which was not being set when emit of a file was complete (#33145)
* Add test that fails because file is written multiple times
Reported from #33061

* Handle seenEmittedFiles which was not being set when emit of a file was complete.
It was issue only when errors are reported before emitting (which puts the files into pendingEmit that needs to check only in seenEmittedFiles)
If emit happens before semantic diagnostics query this issue is not repro, because the affected files come into play and those are being set correctly
Fixes #31398

* make baselining source map optional

* Handle emitDeclarationOnly in --build scenario

* Ensure we are using d.ts emit as signature even when --declarationMap is on (map files are emitted before d.ts)

* Move module specifiers to verifyTsBuildOutput

* implement create Hash to be default hashing plus data so we can verify it easily in baseline

* Remove failing baseline

* Accept correct baseline name
2019-08-30 16:33:44 -07:00
Alexander
e30266598e remove spaces from @internal tag 2019-08-10 10:26:33 +03:00
Alexander
023e4c6249 disable no-redeclare 2019-08-09 07:30:40 +03:00
Alexander
ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander T
4defd1d635 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-04 12:49:33 +03:00
Ron Buckton
e8bf9584aa
Improve type checking and inference for Generators and Async Generators (#30790)
* Improve typing for Generators and Async Generators

* Add TReturn and TNext to Iterator, IterableIterator, etc.

* Update ts internal Iterator to be assignable from global Iterator

* Make 'done' optional in IteratorYieldResult

* Revert Iterable and IterableIterator to simpler versions plus other fixes

* Add additional inference tests

* Added additional tests

* PR cleanup and minor async iteration type fix

* Updated diagnostics message and added non-strict tests

* Fix expected arity of Iterator/AsyncIterator
2019-07-03 21:55:59 -07:00
Alexander T
136f4cfc0f no-redeclare 2019-06-27 12:29:32 +03:00
Sheetal Nandi
17d2c8bcfb Handle dts change as well as signature update when exported module affects dts but not js file 2019-04-16 13:27:51 -07:00
Sheetal Nandi
684c531386 Always assert that source files are versioned when program is used with Builder 2019-03-26 11:55:12 -07:00
Sheetal Nandi
e3f8c34bc9 Add mechanism to dump and read program to build info 2019-02-07 12:10:15 -08:00
Matthew Aynalem
f30e8a284a fix spelling errors 2019-01-27 20:33:33 -08:00
Sheetal Nandi
69abc12494 Handle declaration emit errors in tsbuild mode by backing up builder state
This helps us revert to state where we pretend as if emit is not done (since we do not do emit if there are errors)
2018-12-26 12:25:27 -08:00
Sheetal Nandi
47f51060e9 Use oldProgram to create the new Program.
This helps in storing the semantic diagnostics
2018-12-21 12:53:26 -08:00
Sheetal Nandi
941d97c45a Handle global augmentation in the module 2018-11-09 16:41:18 -08:00
Sheetal Nandi
d352b8c2c7 Use reference map from declaration file as exported map to handle deep import semantic diagnostics invalidation
Fixes #27973
2018-10-18 12:04:14 -07:00
Sheetal Nandi
03a3978d65 Use ambient modules as references to keep track of reporting and usage of modules correctly
Fixes #27585
2018-10-08 15:56:39 -07:00
Sheetal Nandi
d51b8d940c Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
This also ensures that originalFileName, resolvedPath are set correctly even when we are reusing program structure
Fixes #26036
2018-09-17 19:00:30 -07:00
Sheetal Nandi
aac961e60d Builder to use project reference redirects to output in the dependencies instead of source files 2018-09-17 12:18:59 -07:00
Sheetal Nandi
51837bb59a Make ExportedModulesFromDeclarationEmit as ReadonlyArray of symbols combining exportSpecifiers emitted and dynamic import type nodes written 2018-08-01 12:37:39 -07:00
Sheetal Nandi
50b75e7585 Optimize the deletion and calculation of bigger set of semantic diagnostics to be calculated 2018-07-12 13:44:56 -07:00
Sheetal Nandi
585acb1990 Use exported modules through declaration emit to invalidate the semantic diagnostics
Fixes #24986
2018-07-11 16:43:02 -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
Ryan Cavanaugh
8294259ec2 Remove all reference comments from compiler/ 2018-04-11 15:38:26 -07:00
Sheetal Nandi
2611c9b339 Merge branch 'master' into builderApi 2017-12-07 20:23:15 -08:00
Sheetal Nandi
965f40f213 Use builder state in the semantic/emit builder as well 2017-12-07 17:11:36 -08:00
Sheetal Nandi
bb0fc0d2bc Convert builder state to mutable data, so that later we can create builder Program out of this 2017-12-07 14:15:59 -08:00
Sheetal Nandi
2586bb303c From builder use the builderState containing references and file infos 2017-12-07 12:39:26 -08:00
Sheetal Nandi
4c21cbf145 Create builderState so that when FilesAffectedBy is only api needed, we arent tracking changed files 2017-12-07 11:47:49 -08:00