https://github.com/Microsoft/TypeScript

sort by:
Revision Author Date Message Commit Date
e262f49 Accept new baselines 06 March 2020, 01:37:50 UTC
27a80c1 Merge branch 'master' into fixGenericSignatureRelation # Conflicts: # src/compiler/checker.ts # tests/baselines/reference/keyofAndIndexedAccess2.errors.txt # tests/baselines/reference/keyofAndIndexedAccess2.symbols 06 March 2020, 01:31:13 UTC
3c0c01c LEGO: Merge pull request 37229 LEGO: Merge pull request 37229 05 March 2020, 10:11:18 UTC
5b06ce6 LEGO: check in for master to temporary branch. 05 March 2020, 10:10:40 UTC
0e8540b LEGO: Merge pull request 37220 LEGO: Merge pull request 37220 04 March 2020, 22:11:06 UTC
89410e9 LEGO: check in for master to temporary branch. 04 March 2020, 22:10:31 UTC
0a1af90 add string.prototype.replaceAll (#33845) * add string.prototype.replaceAll * accept baseline * fix bad merge in tests * update missed baselines Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 04 March 2020, 21:25:17 UTC
061338e Don't inferFromIndexTypes() twice (#34501) * Don't inferFromIndexTypes() twice * Add tests 04 March 2020, 21:19:35 UTC
5c8def9 Fix emitting `?.` Use `emit()` for writing `questionDotToken`, leading to properly calling the emit hooks (which `emitTokenWithComment` doesn't) and printing the comments. This fixes #35372 by calling its hooks to set the `.__pos` and `.__end` fields. Also, remove `getDotOrQuestionDotToken` which was used only here -- mainly because it seems likely to encourage misusing the `questionDotToken` again. Also, fix a bunch of `visitor` -> `tokenVisiton` calls in `visitorPublic.ts`. 04 March 2020, 19:52:33 UTC
67930fc Don't crash when there's no class type to derive a 'this' type from (#37164) Fixes #37161 04 March 2020, 17:34:28 UTC
dfc0b58 Preserve arity for preserving js optional parameters (#37173) 04 March 2020, 08:48:53 UTC
7a82b74 LEGO: Merge pull request 37202 LEGO: Merge pull request 37202 04 March 2020, 04:11:08 UTC
b28e1b8 LEGO: check in for master to temporary branch. 04 March 2020, 04:10:28 UTC
b481dd4 More precise property-overwritten-by-spread errors (#37192) * More precise property-overwritten-by-spread errors Trying to do this check in getSpreadType just doesn't have enough information, so I moved it to checkObjectLiteral, which is a better place for issuing errors anyway. Unfortunately, the approach is kind of expensive in that it 1. creates a new map for each property and 2. iterates over all properties of the spread type, even if it's a union. I have some ideas to improve (1) that might work out. I'm not sure how bad (2) is since we're going to iterate over all properties of all constituents of a union. Fixes #36779 * another test and rename 03 March 2020, 23:10:19 UTC
3046a54 fix(36883): accessor allows `this` parameter but is not checke… (#36889) 03 March 2020, 20:26:41 UTC
176241c fix(36238): allow aliases in spelling suggestions (#37168) 03 March 2020, 18:58:29 UTC
5941c6e Emit an `any` for namepath types (#37176) 03 March 2020, 18:55:21 UTC
ab8adc5 fix(37135): handle PrivateIdentifiers in isPropertyName (#37184) 03 March 2020, 18:51:50 UTC
b9c0999 Thread host.useCaseSensitiveFileNames through program and node builder into specifier generation (#37170) 03 March 2020, 18:50:01 UTC
0c5878d `symbol.parent` really is possibly sometimes undefined here. (#37159) Fixes #37158 03 March 2020, 18:47:07 UTC
67c6ceb Reinterpret a type parameter constrained to any as an upper bound constraint (#29571) * Reinterpret a type parameter constrained to any as an upper bound constraint * Use real constraqint in alias in test Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 03 March 2020, 17:51:15 UTC
3fdce8e LEGO: Merge pull request 37185 LEGO: Merge pull request 37185 03 March 2020, 16:11:13 UTC
344b0a8 LEGO: check in for master to temporary branch. 03 March 2020, 16:10:36 UTC
3c468d2 Clean up convert-to-async refactor (#36858) * Start renaming some stuff, fix deep cloning identifiers, which apparently fixed some unnoticed bugs * Wow a lot of stuff seems to be unused 03 March 2020, 15:47:18 UTC
dd6811f Stop looking for the default configured project at node_modules (#35011) * Optionally stop looking for the default configured project at node_modules * Make stopping at node_modules non-optional * Generalize and simplify the change - node_modules files don't have default configured projects 03 March 2020, 00:52:03 UTC
3b996de fix: Intl.PluralRulesOptions to behave according to spec (#33414) TL;DR: MDN doc is not accurate: https://github.com/tc39/ecma402/issues/365#issuecomment-530617744 According to spec, `PluralRulesOptions` do take in these extra params (point 2 in https://tc39.es/ecma402/#sec-intl-pluralrules-constructor) Add LDMLPluralRule according to http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories ResolvedPluralRulesOptions also have these params as optional because according to spec https://tc39.es/ecma402/#sec-initializepluralrules https://tc39.es/ecma402/#sec-setnfdigitoptions 02 March 2020, 23:49:44 UTC
ff04220 Update LKG (#37175) * Update LKG * Remove unneeded check (handled by top of function) 02 March 2020, 23:15:41 UTC
af4201f Retain reexports in js emit even when they export nothing (#37124) 02 March 2020, 22:33:53 UTC
478dbfd LEGO: Merge pull request 37172 LEGO: Merge pull request 37172 02 March 2020, 22:11:27 UTC
8c19102 LEGO: check in for master to temporary branch. 02 March 2020, 22:10:50 UTC
d209092 Use merged symbol to pick up js-alias-merged members on export assignments (#37162) 02 March 2020, 20:57:00 UTC
24b926f Update user baselines (#37147) 02 March 2020, 19:52:41 UTC
392fd0a Remove bogus @implements errors (#37114) * Remove bogus @implements errors Make the search for the actual host more comprehensive by reusing the code that previously only searched for functions. I don't know what to call this function now, since the old name wasn't accurate either. * undo gratuitous name change * Improve name and make calling more uniform It's slightly less efficient but I think worthwhile for readability. 02 March 2020, 17:48:53 UTC
1e46185 LEGO: Merge pull request 37154 LEGO: Merge pull request 37154 02 March 2020, 16:11:08 UTC
8443ed0 LEGO: check in for master to temporary branch. 02 March 2020, 16:10:31 UTC
c7f27c3 LEGO: Merge pull request 37146 LEGO: Merge pull request 37146 02 March 2020, 04:10:59 UTC
88fd339 LEGO: check in for master to temporary branch. 02 March 2020, 04:10:23 UTC
a5796cf Remove ordering restrictions in control flow analysis (#37134) * Don't reset CFA type for x.y when x is narrowed * Add tests * Accept new baselines * Remove unnecessary type assertion 29 February 2020, 20:03:09 UTC
f914db0 LEGO: Merge pull request 37133 LEGO: Merge pull request 37133 29 February 2020, 16:11:01 UTC
a3d4822 LEGO: check in for master to temporary branch. 29 February 2020, 16:10:24 UTC
4e25aed LEGO: Merge pull request 37128 LEGO: Merge pull request 37128 29 February 2020, 04:11:06 UTC
9ad4c5f LEGO: check in for master to temporary branch. 29 February 2020, 04:10:25 UTC
be4b814 Reduce intersections by discriminants (#36696) * Treat never-like intersections as never * Accept new baselines * Fix compiler issues revealed by increased intersection correctness * Delete fourslash tests that are no longer applicable * Include isNeverLikeIntersection check in getNormalizedType * Erase never-like types in several more places * Check that base types are not never-like * Add comments * Revert isNeverLikeType check in getIndexType (keyof shouldn't resolve member types) * Introduce getReducedType for union and intersection types * Don't reduce in getApparentType * Avoid relationship check in resolveMappedTypeMembers * Accept new baselines * Don't call getReducedType in getIndexType * Ensure reduced and unreduced forms of a type can compare identical * Reduce types before converting them to string representation * Accept new baselines * Reduce intersections before obtaining keyof X * Add tests * Accept new baselines * Fix comment in tests * Don't infer from empty intersection types * Add tests * Accept new baselines * Defer instantiation of mapped type property types * Accept new baselines * Include more precise type in diagnostic * Accept new baselines * Minor optimization * Improve error message * Optional properties in intersections are never discriminants 29 February 2020, 01:06:44 UTC
f31ff2d Revert #36907 (#37122) 28 February 2020, 23:53:24 UTC
f9945f5 Full support for CommonJS auto-imports in JS (#37027) * Support add new requires * Always use destructuring for requiring default exports * Add more tests * Update existing fourslash tests * Use `getExportsAndPropertiesOfModule` * Add UMD test * Apply suggestions from code review Fix typos Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 28 February 2020, 22:34:20 UTC
6a1e474 Update LKG (#37116) 28 February 2020, 22:02:40 UTC
c6c2c4c Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar (#37093) * Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar * Copy hoisted identifiers so they do not create sourcemaps * Accept updated baselines 28 February 2020, 21:25:28 UTC
634d514 LEGO: Merge pull request 37098 LEGO: Merge pull request 37098 28 February 2020, 04:11:15 UTC
c09001c LEGO: check in for master to temporary branch. 28 February 2020, 04:10:26 UTC
0a6ee77 Grammar error on `export type *` (#37064) * Recognize `export type *` syntax, but disallow it * Add more comments to test * Revert recognizing invalid forms as type-only * Revert more 28 February 2020, 00:35:15 UTC
f1457c1 office-ui-fabric: silence progress counter again 27 February 2020, 23:29:09 UTC
f4e371c Harden findAllReferences.ts against `symbol.declarations = undefined` cases (#37088) Fixes #37086 27 February 2020, 22:55:49 UTC
241b3b9 Forcibly remove _the other_ submodules 27 February 2020, 22:36:08 UTC
a792fbb Forcibly remove submodules 27 February 2020, 22:30:50 UTC
0326534 Update LKG (#37087) 27 February 2020, 22:24:21 UTC
d0c1a52 LEGO: Merge pull request 37089 LEGO: Merge pull request 37089 27 February 2020, 22:11:21 UTC
3d23f08 LEGO: check in for master to temporary branch. 27 February 2020, 22:10:46 UTC
5c85feb Fix Get/Set being enumerable (#32264) * Fix Get/Set being enumerable fixes #3610 * fix tests Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 27 February 2020, 22:08:20 UTC
e7c578a Reapply contextual type when recalculating array literals as tuples (#37071) 27 February 2020, 22:02:28 UTC
e71614a Proper treatment of splicing tuples in array literals Fixes #32465. After this was done, I continued to extend the implementation to handle TupleLike types but it'ss broken since JS doesn't allow splicing TupleLike values into array literals so pulled that out, and instead keeping it for reference below. (It Includes tests, which are broken too.) modified src/compiler/checker.ts @@ -22268,6 +22268,21 @@ namespace ts { else hasNonEndingSpreadElement = true; } } + else if (spreadType && isTupleLikeType(spreadType)) { + let i = 0, tupleEltType: Type | undefined; + while (tupleEltType = getTypeOfPropertyOfType(spreadType, "" + i as __String)) { + elementTypes.push(tupleEltType); + i++; + } + const stringIndexInfo = getIndexInfoOfType(spreadType, IndexKind.String); + const numberIndexInfo = getIndexInfoOfType(spreadType, IndexKind.Number); + if (stringIndexInfo || numberIndexInfo) { + if (stringIndexInfo) elementTypes.push(stringIndexInfo.type); + if (numberIndexInfo) elementTypes.push(numberIndexInfo.type); + if (i === elementCount - 1) hasEndingSpreadElement = true; + else hasNonEndingSpreadElement = true; + } + } else { if (inDestructuringPattern && spreadType) { // Given the following situation: new file tests/cases/compiler/spliceTupleLikesWIntegers.ts @@ -0,0 +1,23 @@ +declare const sb: { [0]: string, [1]: boolean }; + +let k1: [number, string, boolean]; +k1 = [1, ...sb]; + +let k2: [number, string, boolean, number]; +k2 = [1, ...sb, 1]; + +// declare const sb_: [string, ...boolean[]]; + +// let k3: [number, string, ...boolean[]]; +// k3 = [1, ...sb_]; + +// declare const sbb_: [string, boolean, ...boolean[]]; + +// let k4: [number, string, ...boolean[]]; +// k4 = [1, ...sbb_]; + +// let k5: [number, string, boolean, ...boolean[]]; +// k5 = [1, ...sbb_]; + +// let k6: [number, string, boolean, boolean, ...boolean[]]; +// k6 = [1, ...sbb_]; new file tests/cases/compiler/spliceTupleLikesWStrings.ts @@ -0,0 +1,23 @@ +declare const sb: { 0: string, 1: boolean }; + +let k1: [number, string, boolean]; +k1 = [1, ...sb]; + +let k2: [number, string, boolean, number]; +k2 = [1, ...sb, 1]; + +declare const sb_: { 0: string, [s: string]: (boolean|string) }; + +let k3: [number, string, ...(boolean|string)[]]; +k3 = [1, ...sb_]; + +declare const sbb_: { 0: string, 1: boolean, [s: string]: (boolean|string) }; + +let k4: [number, string, boolean, ...(boolean|string)[]]; +k4 = [1, ...sbb_]; + +// let k5: [number, string, boolean, ...(boolean|string)[]]; +// k5 = [1, ...sbb_]; + +// let k6: [number, string, boolean, boolean, ...(boolean|string)[]]; +// k6 = [1, ...sbb_]; 27 February 2020, 21:43:29 UTC
6c5c48c Exempt ambient [#]private from unused error (#37050) * Exempt ambient [#]private from unused error These declarations exist to create nominality so they _must_ be unused. There should be no error for them. * Switch to fourslash test I don't know how to baseline suggestion diagnostics in the compiler tests. 27 February 2020, 21:18:43 UTC
35aea8b Remove crashing diagnostic code that wasn't helping us (#36913) 27 February 2020, 20:45:28 UTC
d33fb87 Include input PR title in bot PR title 27 February 2020, 19:07:32 UTC
188c3b7 Measure module and type reference directive times (#37054) 27 February 2020, 18:22:40 UTC
e804dc8 Update the authors script to generate the content of authors.md (#36867) 27 February 2020, 17:47:09 UTC
2c4155c Adds underlines to differences in strings (#36409) 27 February 2020, 17:46:15 UTC
f883bf3 Adding support for @implements. (#36292) * Adding support for @implements. * Fixed code review issues for @implements, added some more tests. * Fixed declaration emit for @interface * Improved getImplementsTypes to not cache the results since it is only used once. * Removed unnecessary checks from getImplementsTypes 27 February 2020, 17:27:37 UTC
e3ec3d1 LEGO: Merge pull request 37080 LEGO: Merge pull request 37080 27 February 2020, 16:11:08 UTC
5d38883 LEGO: check in for master to temporary branch. 27 February 2020, 16:10:31 UTC
a6393b3 LEGO: Merge pull request 37074 LEGO: Merge pull request 37074 27 February 2020, 10:11:09 UTC
97157b4 LEGO: check in for master to temporary branch. 27 February 2020, 10:10:32 UTC
baff821 fix(36989): 'async' modifier cannot be used in an ambient context.ts (#37010) * fix(36989): omit 'async' modifier for methods in declaration files. * remove useless condition 27 February 2020, 08:11:29 UTC
60f50e2 LEGO: Merge pull request 37068 LEGO: Merge pull request 37068 27 February 2020, 04:11:06 UTC
91df1c8 LEGO: check in for master to temporary branch. 27 February 2020, 04:10:29 UTC
d07761f Allow --composite false or --composite null on the command line (#36997) * Add tests for specifying composite as command line option * Allow passing --composite false on commandline * Add test to verify tsc --composite false from command line * Handle "undefined" as option value to be set to undefined for that option * Support "null" as option to be converted to undefined which is normally end result from our config file as well * Support null as option for any tsconfig only option as well, and dont support undefined * Fix public api test case * Validates objects instead of stringify result * Add composite true to base source 26 February 2020, 23:26:26 UTC
05c9ec3 Remove unnecessary assert (since we allow already open file to be opened again even through openFile command - partially) from updateOpen command (#37059) Fixes #35034 26 February 2020, 23:25:51 UTC
c4e9685 Detect circularities when removing 'undefined' from defaulted params (#37023) Fixes #37008 Note that referencing a variable in its initializer is a TDZ error; the OP report had OOB logic that prevented this in practice (?) 26 February 2020, 22:59:04 UTC
f7d2beb LEGO: Merge pull request 37058 LEGO: Merge pull request 37058 26 February 2020, 22:11:15 UTC
42058a8 LEGO: check in for master to temporary branch. 26 February 2020, 22:10:40 UTC
b424f36 Expose call count for instantiateType in extendedDiagnostics (#36797) * Expose call count for instantiateType in extendedDiagnostics * Update API baselines 26 February 2020, 20:55:28 UTC
3d63401 Update baseline (#37049) 26 February 2020, 18:28:22 UTC
af901ba No error on `this` exprs in static property inits (#36781) No error on `this` expressions in static property declaration initialisers when targetting ESNext and with useDefineForClassFields. In this case the emit is correct and the types are correct, so the error should not be issued. 26 February 2020, 17:07:45 UTC
454cdb8 Retain undefined initializations (#36806) * Emit an export assignment even when the initializer is elided * User a void 0; and elide assignments for enum/namespace-sourced exported variables * HAHA, SIMPLIFY GREATLY 26 February 2020, 16:48:18 UTC
56b6d0d Update user baselines (#37033) 26 February 2020, 01:47:21 UTC
15dd000 Unwrap substitutions both before _and_ after potential simplification (#32116) * Unwrap substitutions both before _and_ after potential simplification * Repeatedly unwrap/simplify until no more can be performed * Use seperate loops for source and target to reduce redundant calls * Move loop into function * Inline worker 26 February 2020, 01:36:56 UTC
4d5464e Revert "Support declaration emit for late bound element accesses assigned to functions in both TS and JS (#36593)" (#37034) This reverts commit 3e4ce4777d382f2f2b49bd2c7a279b068278552a. 26 February 2020, 00:40:38 UTC
9ed73eb Properly handle control flows from returns in try/catch within IIFE (#36901) * Properly handle control flows from returns in try/catch within IIFE * Accept new baselines * Add tests * Accept new baselines * When end of finally is unreachable, end of try statement is too * Add additional test case 26 February 2020, 00:14:00 UTC
e89df5c Handle getScriptVersion correctly to ensure program structure is checked correctly (#36808) * Fix tests when there are project references but has disableSourceOfProjectReferenceRedirect * Handle getScriptVersion correctly to ensure program structure is checked correctly Fixes #36748 * Harness's language service host doesnt have getProjectVersion. This means earlier we were creating fresh program everytime we did LS operation Now we reuse same program, so quick info depends on order of quickinfo demands * Because same program is used, it unvails a bug that if `export=` is evaluated before finding references, it cant find all definitions from the merge * Update src/server/project.ts Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Make clearSourceMapperCache required Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 26 February 2020, 00:11:21 UTC
e99173a Ignore data- props when excess property checking (#36952) 25 February 2020, 23:52:24 UTC
d92aca2 Reduce lerna loglevel (#37024) * Reduce lerna loglevel * Also add silent 25 February 2020, 22:23:55 UTC
8a797ca Adds floating block comments to the outlining spans response (#36880) * Adds floating block comments to the outlining spans response * Only use one route for grabbing outline nodes, which now includes special casing the EOF token 25 February 2020, 22:09:16 UTC
43863ca Check for undefined `source.symbol` (#37021) Fixes #37014 25 February 2020, 21:46:24 UTC
3e4ce47 Support declaration emit for late bound element accesses assigned to functions in both TS and JS (#36593) 25 February 2020, 21:45:27 UTC
7d8dc73 Baseline arity checks for jsx sfc tags (#36643) Finish comment PR feedback 25 February 2020, 21:44:22 UTC
e536c89 Add js-equivalent test for the binary expression stress and introduce trampoline into getJSSyntacticDiagnosticsForFile (#36724) * Add js-equivalent test for the binary expression stress and introduce trampiline into getJSSyntacticDiagnosticsForFile * Update src/compiler/parser.ts Comment text update Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Fix lint Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 25 February 2020, 21:29:34 UTC
01f81df Add helpers to helper list, per comment on #36806 25 February 2020, 19:46:05 UTC
c22cdb4 Harden telemetryOnOpenFile (#36993) 25 February 2020, 19:32:32 UTC
e54b796 Declare dependencies between helpers in the declaritive fashion introduced by #35967 (#37001) 25 February 2020, 19:29:59 UTC
e120762 Remove unneeded branch from getHelperName (#36998) 25 February 2020, 19:29:45 UTC
26184f0 LEGO: Merge pull request 37018 LEGO: Merge pull request 37018 25 February 2020, 16:11:01 UTC
back to top