Commit Graph

15345 Commits

Author SHA1 Message Date
Wesley Wigham
f0f3862cd9 Merge pull request #41314 from weswigham/fix-global-jsx-ns-alias-crashes
Fix crashes when the global JSX namespace is an alias
2020-10-28 18:38:26 -07:00
Wesley Wigham
d722392d81 Fix crashes when the global JSX namespace is an alias 2020-10-28 14:31:40 -07:00
Wesley Wigham
4ec02a56b8 Bind comma expression LHS call expressions 2020-10-28 13:48:29 -07:00
Wesley Wigham
ca8a15d37b Merge pull request #41287 from weswigham/bind-exports-assigned-object-as-alias
Bind `module.export = {Thing}` with alias symbols
2020-10-28 13:14:20 -07:00
Anders Hejlsberg
bd27bd8d47 Don't relate unmatched parameter positions in signatures (#41308)
* Don't relate unmatched parameter positions in signatures

* Add regression test

* Accept new baselines
2020-10-28 11:55:32 -07:00
Sheetal Nandi
e17d95dada When creating synthetic default symbol set parent as module symbol (#41282)
Fixes #40684
2020-10-28 11:24:40 -07:00
Wesley Wigham
6acce0ca6f Merge pull request #41075 from uhyo/fix-36958
allow type narrowing with NonNullExpression
2020-10-27 20:10:27 -07:00
Oleksandr T
af38ab90e2 feat(41249): allow import.meta with module: es2020 (#41274) 2020-10-27 17:26:15 -07:00
Anders Hejlsberg
40b81224f9 Remove string literals from unions with matching template literals (#41276)
* Remove string literals from unions with matching template literals

* Add tests

* Accept new baselines
2020-10-27 16:21:07 -07:00
Wesley Wigham
d1bc6b1ba6 Bind module.export = {Thing} with alias symbols 2020-10-27 15:43:00 -07:00
Wesley Wigham
c923023494 Merge pull request #41191 from weswigham/control-flow-comma-exprs
Track control flow for comma expressions in call expressions
2020-10-27 12:37:02 -07:00
Wesley Wigham
aaa8b74229 Merge pull request #41257 from weswigham/jsdoc-declaration-emit-names
Fix visibility lookup for cjs require aliases
2020-10-27 12:01:52 -07:00
Anders Hejlsberg
f9dcd9ef98 Don't cache Ternary.Maybe results when recursion is encountered during variance measurement (#41218)
* Don't record Ternary.Maybe results in cache during recursive variance measurement

* Add regression test

* Accept new baselines

* Use Ternary.Unknown to signal variance recursion

* Add comments

* Fix comment
2020-10-27 10:53:13 -07:00
Andrew Casey
e712d42e44 Stop doing tracing work when tracing is disabled 2020-10-26 17:27:44 -07:00
Wesley Wigham
2abc8bd3fa Limit binding element visibility painting to those biding elements which are declarations of aliases 2020-10-26 16:47:43 -07:00
Wesley Wigham
ef810f5d02 Fix visibility lookup for cjs require aliases 2020-10-26 14:37:35 -07:00
Ron Buckton
0847d85a4c Fix dependency order and observer registration 2020-10-26 12:27:34 -07:00
Daniel Rosenwasser
3517af8f80 Make 'getIndentString' just use a loop. (#41221)
* Make 'getIndentString' just use a loop.

* Added test.

* Accepted baselines.
2020-10-26 12:19:31 -07:00
Ron Buckton
db6f66cc4e Merge pull request #40593 from microsoft/nativePerformanceHooks
Migrate 'ts.performance' to use native performance hooks when available
2020-10-23 17:32:55 -07:00
Ron Buckton
8ed645ae1a Don't emit duplicate triple-slash directives when using API to print a .d.ts (#40968) 2020-10-23 16:31:58 -07:00
Andrew Casey
85ef91e223 Merge pull request #41180 from amcasey/ProgramTracing
Add tracepoints within createProgram
2020-10-23 13:08:53 -07:00
Oleksandr T
e5ca77626e fix(41176): Missing Compiler API predicate function: isTemplateLiteralTypeNode (#41177) 2020-10-23 14:15:04 -04:00
Wesley Wigham
94b0e0e389 Merge pull request #41190 from weswigham/handle-binding-element-aliases
Handle the new js binding element alias symbols in JS declaration emit
2020-10-23 10:31:08 -07:00
Wesley Wigham
3bbc963303 Style feedback 2020-10-22 16:42:35 -07:00
Ron Buckton
c5800d1928 Remove shims, workaround for bug in peformance.measure 2020-10-22 13:52:10 -07:00
Anders Hejlsberg
d1f87d18b1 Support partial reverse mapped inferences with tuple types (#41106)
* Support partial reverse mapped inferences with tuple types

* Add tests

* Accept new baselines
2020-10-22 11:27:41 -07:00
Andrew Casey
dcb18d6f18 Adopt push-pop API 2020-10-22 11:01:42 -07:00
Andrew Casey
9ad9ec984e Add tracepoint in resolveTypeReferenceDirectiveNamesWorker 2020-10-22 10:58:52 -07:00
Andrew Casey
0b31e487c2 Add tracepoints within createProgram
These were useful during the Midgard investigation.
2020-10-22 10:58:51 -07:00
Vincent Boivin
010ffdc121 New error format (#40974) 2020-10-21 15:02:49 -07:00
Eli Barzilay
fe7ec1ee2e Tracing work
* Fix: `E` events need to have the same information that is on the
  corresponding `B` events.  (Superseded below.)

* Use `I` (not `i`) for instant events, so they show in devtools
  too.  (Though they don't go through the flame chart as they do in
  `about://tracing`, so they're not nearly as useful.)

* Abstract the code that writes the records in a single `writeEvent`
  local function.

* Make `args` optional, and default to `undefined` (which will not add
  them) at all.

* Drop the `{ "ts": ... }` wrapper around the `args`, after verifying
  that having arguments with names like `begin`, `end`, `pos`, `id`
  doesn't interfere with either UIs.

* Add `tracing.push`/`tracing.pop` for complete events, change a few
  `.begin`/`.end` to use these.  (The caveat is that until there's an exit
  handler to dump unterminated events, these won't show in the dump.  When
  that's done the push/pop variant can be used everywhere.)

* Add meta lines to name the process and the thread, and a line that
  avoids the warning when opening in devtools.
2020-10-21 17:31:33 -04:00
Wesley Wigham
6dde1621cb Track control flow for comma expressions in call expressions 2020-10-21 12:31:29 -07:00
Anders Hejlsberg
5d021b401a Don't reduce 'keyof M' for mapped types with non-distributive 'as' clauses (#41186)
* Don't reduce 'keyof M' for mapped types with non-distributive as clauses

* Add regression test

* Accept new baselines
2020-10-21 12:16:46 -07:00
Wesley Wigham
f4255dd237 Handle the new js binding element alias symbols in JS declaration emit 2020-10-21 11:24:19 -07:00
Andrew Branch
1f852ed747 Percent-encode source map URLs (#41102) 2020-10-20 13:11:52 -07:00
Wesley Wigham
0ad22de146 Merge branch 'master' into fix/create-element-new-jsx-transform 2020-10-19 15:21:52 -07:00
Wesley Wigham
aa9445bc15 Merge branch 'master' into empty-jsx-child 2020-10-19 14:54:20 -07:00
Wesley Wigham
de93173f53 Revert "Add extensions to jsx automatically added import, per babel change (#40871)"
This reverts commit 798b18be6e.
2020-10-19 14:27:28 -07:00
Wesley Wigham
b8dfa28ca8 Do not consider empty jsx expressions semantically important children 2020-10-19 13:34:16 -07:00
Anders Hejlsberg
4638c685b1 Properly reduce intersections of string literal and template literal types (#41162)
* Properly reduce single element intersections

* Add regression test

* Accept new baselines
2020-10-19 13:05:29 -07:00
Sheetal Nandi
15cec9d1f7 Optimizes project loading in few scenarios (#41126)
* Some refactoring of forEachResolvedProjectReference

* More refactoring

* Test before the change

* When loading project tree, load projects that directly or indirectly reference the projects we are looking for

* Optimize finding project in solution scenario by directly finding possible default project through projectReferenceRedirect
This helps in avoiding loading indirect projects when solution indirectly referenced default project
2020-10-19 12:59:59 -07:00
Jesse Trinity
08e4f369fb Add editor configurable filename-based ATA (#40952)
* add typeAcquisition:inferTypings

* remove unused property

* handle inferred and external projects separately

* update missed rename

* fix tests

* pass as external compilerOption

* update test

* remove hostConfig reference

* change option name

* remove extraneous property

* add inferredProjectCompilerOptions
2020-10-19 09:53:58 -07:00
Anders Hejlsberg
3918e6c535 Move anonymous type instantiation cache from AST node to root type (#41084)
* Move anonymous type instantiation cache from AST node to root type

* Use "root" type reference as cache location for deferred type references

* Add test

Co-authored-by: Andrew Branch <andrew@wheream.io>
2020-10-19 07:26:48 -07:00
Mateusz Burzyński
9fd2c2cb4b Add auto-import for createElement when using the new JSX transform 2020-10-17 19:47:49 +02:00
Ron Buckton
68806c67f1 Simplify tests for enablement in mark/measure, remove onProfilerEvent 2020-10-15 19:10:51 -04:00
Ron Buckton
dfa55add5a Write message instead of crashing when native perf API not found. 2020-10-15 19:10:51 -04:00
Ron Buckton
a197beef6d Migrate 'ts.performance' to use native performance hooks when available 2020-10-15 19:10:50 -04:00
Eli Barzilay
868638ae04 performanceTimestamp: use performance.now on node
On node, `performance` is found in `require("perf_hooks")`.
2020-10-15 19:01:50 -04:00
Wesley Wigham
ce1947b0be Merge pull request #41070 from weswigham/use-minimal-endings-in-bundled-declaration-emit
Use minimal endings when generating declarations for js
2020-10-14 15:29:50 -07:00
Eli Barzilay
5b2fba3334 transformGenerators: handle CommaListExpression
Uses essentially the same code as `visitCommaExpression` (which was
moved, to keep both together and close to
`visit{Right,Left}AssociativeBinaryExpression`).

Fixes #40614.
2020-10-14 15:58:13 -04:00