Commit graph

18 commits

Author SHA1 Message Date
Orta Therox cdafb7157b
Replaces the default module index resolver with '/index' instead of '' when handling internal routing for dts bundles (#39277)
* Adds support for declaring the bundled name of a dts module export

Co-authored-by: Wesley Wigham <wwigham@gmail.com>

* Adds baselines

* Update the tests

* Try to reduce the scope of the bundledPackageName error

* Use the flag in more baselines

* Get it green

* More tests

* Handle more feedback

* More test cleanup

* Set the moduleResolution for the tsconfigs

Co-authored-by: Wesley Wigham <wwigham@gmail.com>
2020-09-11 08:12:07 -04: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
Daniel Rosenwasser cc477ee891 Only use 'es2015.iterable' to avoid accidental es2015 feature usage. 2018-12-10 17:46:17 -08:00
Andy 12f3d0d54c
Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Andy cea4838972
Set rootDir in tsconfig-base.json (#26415) 2018-08-13 15:19:27 -07:00
Wesley Wigham 84f5aa540e
Put error spans deep on nested object literals (#25140)
* Add ncie deep elaborations

* Nice stuff

* Modify tuple error to use length error mroe often

* Accept good baselines

* Accept meh baselines

* Fix literal types

* Calculate elaborations like it was the very first time again~

* Use tristate for enum relationship to ensure elaborations are printed at least once

* Update message text, nits

* move some functions back to where they were

* Add test of deep JSX elaboration

* Add elaboration test with parenthesized expressions, comma expressions, and assignments

* Move check to allow elaborations on more anonymous types

* Fix nits

* Add specialized error to elaborations of nonliteral computed named-members

* Update error message
2018-07-03 19:40:58 -07:00
Ryan Cavanaugh 2428220015 Turn on SLC 2018-06-14 11:17:37 -07:00
Ryan Cavanaugh ab10b86205 Almost working? 2018-06-10 19:28:38 -07:00
Ryan Cavanaugh 336c37662d Projzilla phase 1 2018-06-09 16:48:08 -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 7f7d0c6c7b Baseline public API (#18897)
* Add unit test which tracks public API changes

* Accept strict function types updates

* 100% Linefeeds, no carriage returns

* How were these missing?

* That would be why they were there

* Extract and comment

* Accept comment changes
2017-10-02 17:37:40 -07:00
t_ 51fb7e9a81 Add alwaysStrict option (#16562)
* Add alwaysStrict option

* Enable alwaysStrict

* Fix for strict mode

* keep whitespace
2017-06-28 19:44:15 -07:00
DLehenbauer 3f980bead0 Remove vestiges of WScript support (Issue #14414) 2017-03-10 07:10:58 -08:00
Andy Hanson 7baeb9726a Merge branch 'master' into no_dom 2017-01-17 14:35:33 -08:00
Andy Hanson 9fbadfdc67 Move "types": [] to tsconfig-base 2017-01-17 08:02:39 -08:00
Andy Hanson b40613c4d7 Stop using "dom" types 2017-01-12 14:05:18 -08:00
Andy Hanson 757af2e1d6 Fix tsconfig inheritance in gulpfile -- must do it manually 2017-01-12 13:11:26 -08:00
Andy Hanson 733111a931 Use tsconfig inheritance 2017-01-12 07:46:55 -08:00