Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

const modifier on type parameters#51865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ahejlsberg merged 15 commits intomainfromfix30680
Dec 16, 2022
Merged

const modifier on type parameters#51865

ahejlsberg merged 15 commits intomainfromfix30680
Dec 16, 2022

Conversation

ahejlsberg
Copy link
Member

@ahejlsbergahejlsberg commentedDec 12, 2022
edited
Loading

With this PR we implement a newconst modifier for type parameters. In a function, method, or constructor invocation, when a literal expression in an argument is contextually typed by aconst type parameter, the literal expression is given the most precise type possible, similar to having applied anas const assertion (see#29510). The kinds of literal expressions affected by aconst contextual type are string, numeric, and boolean literal values, array literals, and object literals.

Theconst modifier is permitted on type parameters of functions, methods, and classes. It is an error to apply theconst modifier to type parameters of interfaces and type aliases.

Given the function declarations

declarefunctionfoo<constT>(x:T):T;declarefunctionbar<constT>(obj:[T,T]):T;

the invocations

constx1=foo('a');constx2=foo(['a',['b','c']]);constx3=foo({a:1,b:"c",d:["e",2,true,{f:"g"}]});constx4=bar([{a:1,b:'x'},{a:2,b:'y'}]);

infer the types

declareconstx1:"a";declareconstx2:readonly["a",readonly["b","c"]];declareconstx3:{readonlya:1;readonlyb:"c";readonlyd:readonly["e",2,true,{readonlyf:"g";}];};declareconstx4:{readonlya:1;readonlyb:"x";}|{readonlya:2;readonlyb:"y";};

Aconst type parameter has no effect on variables or other kinds of expressions used as function arguments. For example:

consta=[1,2,3];// number[]constb=foo(a);// number[]

The example above still requires writing[1, 2, 3] as const to infer typereadonly [1, 2, 3] fora.

When aconst type parameter is constrained to an array type, that array type should include areadonly modifier; otherwise, inferences for the type parameter will fail to meet the constraint. For example:

declarefunctionbaz<constTextendsreadonlyunknown[]>(...args:T):T;constz=baz(1,'b',{a:1,b:'x'});// readonly [1, "b", { readonly a: 1; readonly b: "x"; }]

Without thereadonly modifier in the constraint, inference defaults tounknown[] because an inferred readonly tuple type wouldn't be assignable tounknown[].

Fixes#30680.
Fixes#41114.

Thundercraft5, aaronccasanova, Jack-Works, zyhou, davidkpiano, lffg, pioluk, ghoullier, tonivj5, jasonkuhrt, and 81 more reacted with thumbs up emojir-cyr, tjjfvi, conartist6, futurGH, Thundercraft5, almeidx, yume-chan, davidkpiano, lffg, endel, and 54 more reacted with hooray emojitonivj5, jasonkuhrt, beaussan, mkosir, Thundercraft5, ecyrbe, btoo, anuraghazra, oparin10, conejocarlo, and 35 more reacted with heart emojiecyrbe, btoo, Thundercraft5, anuraghazra, jacob-alford, chernodub, crutchcorn, malcolmstill, MarkPieszak, Puppo, and 14 more reacted with rocket emojiThundercraft5, tonivj5, ecyrbe, tmm, MarkPieszak, and unao reacted with eyes emoji
@typescript-bottypescript-bot added Author: Team For Uncommitted BugPR for untriaged, rejected, closed or missing bug labelsDec 12, 2022
@ahejlsbergahejlsberg added this to theTypeScript 5.0.0 milestoneDec 12, 2022
@ahejlsberg
Copy link
MemberAuthor

@typescript-bot test this
@typescript-bot user test this inline
@typescript-bot run dt
@typescript-bot perf test faster
@typescript-bot test top100

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the diff-based top-repos suite on this PR atccf252f. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the abridged perf test suite on this PR atccf252f. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the extended test suite on this PR atccf252f. You can monitor the buildhere.

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the diff-based user code test suite on this PR atccf252f. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR atccf252f. You can monitor the buildhere.

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the user test suite comparingmain andrefs/pull/51865/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..51865

Metricmain51865DeltaBestWorst
Angular - node (v16.17.1, x64)
Memory used340,534k (± 0.01%)339,574k (± 0.02%)-960k (- 0.28%)339,383k339,666k
Parse Time1.88s (± 0.83%)1.88s (± 0.53%)+0.01s (+ 0.32%)1.86s1.91s
Bind Time0.65s (± 0.95%)0.64s (± 0.56%)-0.01s (- 0.77%)0.64s0.65s
Check Time5.17s (± 0.60%)5.14s (± 0.52%)-0.03s (- 0.50%)5.07s5.18s
Emit Time5.15s (± 0.73%)5.05s (± 0.64%)-0.10s (- 1.88%)4.97s5.13s
Total Time12.84s (± 0.41%)12.72s (± 0.16%)-0.12s (- 0.95%)12.67s12.76s
Compiler-Unions - node (v16.17.1, x64)
Memory used187,013k (± 0.40%)186,475k (± 0.57%)-538k (- 0.29%)185,554k189,322k
Parse Time0.79s (± 0.76%)0.79s (± 0.82%)+0.01s (+ 0.89%)0.78s0.81s
Bind Time0.42s (± 1.12%)0.42s (± 1.61%)+0.00s (+ 0.95%)0.41s0.44s
Check Time6.06s (± 0.64%)5.96s (± 0.57%)-0.10s (- 1.72%)5.89s6.03s
Emit Time1.94s (± 0.53%)1.94s (± 1.18%)-0.00s (- 0.15%)1.91s2.01s
Total Time9.21s (± 0.46%)9.11s (± 0.46%)-0.10s (- 1.04%)9.01s9.19s
Monaco - node (v16.17.1, x64)
Memory used319,807k (± 0.05%)318,953k (± 0.04%)-854k (- 0.27%)318,804k319,496k
Parse Time1.42s (± 0.47%)1.41s (± 0.71%)-0.00s (- 0.21%)1.39s1.43s
Bind Time0.59s (± 0.88%)0.59s (± 0.68%)0.00s ( 0.00%)0.58s0.60s
Check Time4.87s (± 0.45%)4.92s (± 0.50%)+0.05s (+ 1.05%)4.87s4.97s
Emit Time2.73s (± 0.60%)2.70s (± 0.90%)-0.03s (- 0.95%)2.66s2.75s
Total Time9.61s (± 0.37%)9.64s (± 0.47%)+0.03s (+ 0.30%)9.55s9.72s
TFS - node (v16.17.1, x64)
Memory used282,303k (± 0.01%)281,251k (± 0.01%)-1,053k (- 0.37%)281,203k281,299k
Parse Time1.15s (± 0.65%)1.17s (± 0.79%)+0.02s (+ 1.65%)1.16s1.20s
Bind Time0.65s (± 5.76%)0.63s (± 5.63%)🟩-0.02s (- 3.52%)0.56s0.70s
Check Time4.78s (± 0.23%)4.69s (± 0.39%)-0.09s (- 1.90%)4.66s4.75s
Emit Time2.79s (± 1.77%)2.70s (± 1.74%)🟩-0.09s (- 3.22%)2.64s2.88s
Total Time9.38s (± 0.75%)9.19s (± 0.77%)-0.18s (- 1.96%)9.06s9.40s
material-ui - node (v16.17.1, x64)
Memory used435,359k (± 0.00%)435,377k (± 0.01%)+18k (+ 0.00%)435,325k435,506k
Parse Time1.63s (± 0.53%)1.63s (± 0.50%)-0.00s (- 0.12%)1.61s1.65s
Bind Time0.51s (± 0.88%)0.51s (± 1.02%)+0.00s (+ 0.59%)0.50s0.52s
Check Time11.86s (± 1.06%)12.12s (± 0.91%)+0.27s (+ 2.24%)11.87s12.35s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.00s (± 0.91%)14.26s (± 0.79%)+0.26s (+ 1.88%)13.98s14.50s
xstate - node (v16.17.1, x64)
Memory used516,191k (± 0.00%)516,233k (± 0.01%)+41k (+ 0.01%)516,159k516,292k
Parse Time2.28s (± 0.46%)2.30s (± 0.41%)+0.02s (+ 0.74%)2.28s2.33s
Bind Time0.84s (± 1.40%)0.84s (± 2.13%)-0.00s (- 0.12%)0.81s0.90s
Check Time1.37s (± 0.73%)1.36s (± 0.59%)-0.01s (- 0.88%)1.34s1.38s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.55s (± 0.43%)4.55s (± 0.44%)+0.00s (+ 0.11%)4.51s4.61s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
BenchmarkNameIterations
Current5186510
Baselinemain10

Developer Information:

Download Benchmark

@ahejlsberg
Copy link
MemberAuthor

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the perf test suite on this PR atccf252f. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

@ahejlsberg Here are the results of running the top-repos suite comparingmain andrefs/pull/51865/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - main..51865
Metricmain51865DeltaBestWorst
Angular - node (v18.10.0, x64)
Memory used341,047k (± 0.02%)340,194k (± 0.01%)-854k (- 0.25%)340,122k340,259k
Parse Time1.56s (± 0.74%)1.57s (± 1.14%)+0.01s (+ 0.45%)1.52s1.62s
Bind Time0.52s (± 1.07%)0.53s (± 1.14%)+0.01s (+ 1.35%)0.51s0.54s
Check Time4.01s (± 0.63%)4.00s (± 0.74%)-0.01s (- 0.35%)3.95s4.06s
Emit Time4.31s (± 0.74%)4.25s (± 0.92%)-0.06s (- 1.37%)4.16s4.32s
Total Time10.40s (± 0.40%)10.34s (± 0.70%)-0.06s (- 0.58%)10.22s10.51s
Compiler-Unions - node (v18.10.0, x64)
Memory used187,317k (± 1.10%)187,612k (± 1.10%)+295k (+ 0.16%)184,169k189,955k
Parse Time0.61s (± 1.09%)0.62s (± 0.96%)+0.00s (+ 0.49%)0.61s0.63s
Bind Time0.33s (± 1.01%)0.33s (± 1.36%)-0.00s (- 0.61%)0.32s0.34s
Check Time5.03s (± 0.60%)4.91s (± 0.50%)-0.12s (- 2.44%)4.86s4.98s
Emit Time1.55s (± 1.12%)1.54s (± 0.76%)-0.01s (- 0.52%)1.52s1.57s
Total Time7.52s (± 0.47%)7.39s (± 0.40%)-0.13s (- 1.73%)7.33s7.45s
Monaco - node (v18.10.0, x64)
Memory used320,414k (± 0.01%)319,476k (± 0.02%)-937k (- 0.29%)319,265k319,591k
Parse Time1.15s (± 0.67%)1.16s (± 1.53%)+0.00s (+ 0.35%)1.13s1.21s
Bind Time0.48s (± 1.92%)0.49s (± 1.40%)+0.00s (+ 0.83%)0.47s0.50s
Check Time3.85s (± 0.43%)3.92s (± 0.56%)+0.07s (+ 1.87%)3.87s3.96s
Emit Time2.24s (± 0.65%)2.24s (± 1.11%)-0.01s (- 0.36%)2.18s2.29s
Total Time7.72s (± 0.47%)7.79s (± 0.40%)+0.07s (+ 0.89%)7.73s7.85s
TFS - node (v18.10.0, x64)
Memory used283,688k (± 0.24%)283,637k (± 0.15%)-52k (- 0.02%)281,889k283,958k
Parse Time0.97s (± 2.73%)0.95s (± 2.79%)-0.01s (- 1.55%)0.92s1.05s
Bind Time0.46s (± 7.43%)0.51s (± 7.92%)+0.05s (+10.65%)0.43s0.57s
Check Time3.78s (± 0.52%)3.71s (± 0.70%)-0.07s (- 1.80%)3.67s3.79s
Emit Time2.22s (± 0.76%)2.19s (± 0.72%)-0.04s (- 1.62%)2.14s2.21s
Total Time7.43s (± 0.63%)7.36s (± 0.57%)-0.07s (- 0.94%)7.25s7.45s
material-ui - node (v18.10.0, x64)
Memory used436,019k (± 0.02%)435,974k (± 0.01%)-45k (- 0.01%)435,902k436,162k
Parse Time1.33s (± 0.70%)1.32s (± 0.77%)-0.01s (- 0.68%)1.30s1.34s
Bind Time0.49s (± 2.84%)0.49s (± 1.00%)+0.01s (+ 1.86%)0.48s0.50s
Check Time10.37s (± 0.55%)10.58s (± 1.10%)+0.21s (+ 2.02%)10.41s10.88s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time12.18s (± 0.48%)12.39s (± 0.98%)+0.21s (+ 1.72%)12.22s12.70s
xstate - node (v18.10.0, x64)
Memory used518,648k (± 0.02%)518,625k (± 0.02%)-23k (- 0.00%)518,508k518,889k
Parse Time1.90s (± 0.68%)1.89s (± 0.68%)-0.01s (- 0.42%)1.87s1.92s
Bind Time0.72s (± 2.91%)0.70s (± 2.83%)🟩-0.03s (- 3.73%)0.67s0.77s
Check Time1.05s (± 0.97%)1.04s (± 1.10%)-0.01s (- 1.05%)1.02s1.06s
Emit Time0.05s (± 0.00%)0.05s (± 0.00%)0.00s ( 0.00%)0.05s0.05s
Total Time3.72s (± 0.76%)3.68s (± 0.77%)-0.05s (- 1.21%)3.62s3.76s
Angular - node (v16.17.1, x64)
Memory used340,534k (± 0.01%)339,584k (± 0.02%)-949k (- 0.28%)339,371k339,682k
Parse Time1.88s (± 0.83%)1.87s (± 0.40%)-0.00s (- 0.16%)1.86s1.90s
Bind Time0.65s (± 0.95%)0.64s (± 0.53%)-0.01s (- 0.92%)0.64s0.65s
Check Time5.17s (± 0.60%)5.13s (± 0.48%)-0.04s (- 0.72%)5.05s5.17s
Emit Time5.15s (± 0.73%)5.08s (± 0.71%)-0.07s (- 1.34%)5.00s5.14s
Total Time12.84s (± 0.41%)12.73s (± 0.36%)-0.11s (- 0.87%)12.62s12.83s
Compiler-Unions - node (v16.17.1, x64)
Memory used187,013k (± 0.40%)186,814k (± 0.61%)-199k (- 0.11%)185,776k189,154k
Parse Time0.79s (± 0.76%)0.79s (± 0.95%)+0.00s (+ 0.25%)0.77s0.80s
Bind Time0.42s (± 1.12%)0.42s (± 0.89%)-0.01s (- 1.19%)0.41s0.42s
Check Time6.06s (± 0.64%)5.91s (± 0.52%)-0.15s (- 2.53%)5.83s5.97s
Emit Time1.94s (± 0.53%)1.92s (± 0.84%)-0.02s (- 0.98%)1.90s1.97s
Total Time9.21s (± 0.46%)9.03s (± 0.40%)-0.17s (- 1.88%)8.93s9.09s
Monaco - node (v16.17.1, x64)
Memory used319,807k (± 0.05%)318,821k (± 0.01%)-986k (- 0.31%)318,746k318,933k
Parse Time1.42s (± 0.47%)1.40s (± 0.54%)-0.01s (- 0.92%)1.38s1.42s
Bind Time0.59s (± 0.88%)0.59s (± 0.58%)-0.00s (- 0.68%)0.58s0.59s
Check Time4.87s (± 0.45%)4.91s (± 0.45%)+0.04s (+ 0.82%)4.88s4.96s
Emit Time2.73s (± 0.60%)2.69s (± 0.62%)-0.04s (- 1.50%)2.64s2.72s
Total Time9.61s (± 0.37%)9.60s (± 0.41%)-0.01s (- 0.14%)9.51s9.70s
TFS - node (v16.17.1, x64)
Memory used282,303k (± 0.01%)281,265k (± 0.01%)-1,038k (- 0.37%)281,214k281,317k
Parse Time1.15s (± 0.65%)1.16s (± 0.95%)+0.01s (+ 0.61%)1.14s1.19s
Bind Time0.65s (± 5.76%)0.63s (± 4.19%)🟩-0.02s (- 3.37%)0.57s0.67s
Check Time4.78s (± 0.23%)4.68s (± 0.37%)-0.10s (- 2.03%)4.65s4.71s
Emit Time2.79s (± 1.77%)2.72s (± 2.14%)-0.07s (- 2.47%)2.65s2.88s
Total Time9.38s (± 0.75%)9.20s (± 0.79%)-0.18s (- 1.90%)9.06s9.39s
material-ui - node (v16.17.1, x64)
Memory used435,359k (± 0.00%)435,346k (± 0.01%)-12k (- 0.00%)435,297k435,414k
Parse Time1.63s (± 0.53%)1.63s (± 0.58%)-0.01s (- 0.31%)1.61s1.64s
Bind Time0.51s (± 0.88%)0.51s (± 1.19%)-0.00s (- 0.59%)0.49s0.52s
Check Time11.86s (± 1.06%)12.14s (± 0.68%)+0.29s (+ 2.41%)11.97s12.29s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.00s (± 0.91%)14.27s (± 0.61%)+0.28s (+ 1.98%)14.10s14.44s
xstate - node (v16.17.1, x64)
Memory used516,191k (± 0.00%)516,160k (± 0.01%)-32k (- 0.01%)516,087k516,307k
Parse Time2.28s (± 0.46%)2.28s (± 0.44%)-0.01s (- 0.31%)2.26s2.30s
Bind Time0.84s (± 1.40%)0.82s (± 1.21%)-0.02s (- 1.91%)0.80s0.85s
Check Time1.37s (± 0.73%)1.35s (± 0.64%)-0.02s (- 1.31%)1.34s1.37s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.55s (± 0.43%)4.51s (± 0.32%)-0.04s (- 0.84%)4.47s4.53s
Angular - node (v14.15.1, x64)
Memory used334,014k (± 0.00%)333,005k (± 0.01%)-1,008k (- 0.30%)332,956k333,048k
Parse Time2.04s (± 0.57%)2.04s (± 0.67%)+0.00s (+ 0.05%)2.01s2.08s
Bind Time0.69s (± 0.49%)0.70s (± 0.68%)+0.00s (+ 0.58%)0.69s0.71s
Check Time5.47s (± 0.29%)5.47s (± 0.65%)-0.00s (- 0.04%)5.41s5.55s
Emit Time5.36s (± 0.62%)5.24s (± 0.55%)-0.11s (- 2.15%)5.19s5.34s
Total Time13.56s (± 0.30%)13.45s (± 0.23%)-0.11s (- 0.80%)13.38s13.51s
Compiler-Unions - node (v14.15.1, x64)
Memory used183,370k (± 0.68%)181,110k (± 0.42%)-2,260k (- 1.23%)180,656k184,199k
Parse Time0.88s (± 0.76%)0.89s (± 0.58%)+0.01s (+ 0.91%)0.88s0.90s
Bind Time0.45s (± 1.09%)0.46s (± 0.80%)+0.00s (+ 0.44%)0.45s0.46s
Check Time6.38s (± 0.59%)6.21s (± 0.73%)-0.17s (- 2.62%)6.13s6.34s
Emit Time2.04s (± 0.78%)2.02s (± 0.78%)-0.03s (- 1.32%)1.99s2.06s
Total Time9.76s (± 0.47%)9.57s (± 0.55%)-0.18s (- 1.89%)9.49s9.75s
Monaco - node (v14.15.1, x64)
Memory used314,673k (± 0.04%)313,670k (± 0.01%)-1,003k (- 0.32%)313,591k313,756k
Parse Time1.56s (± 0.72%)1.56s (± 0.22%)-0.00s (- 0.26%)1.55s1.56s
Bind Time0.63s (± 0.47%)0.63s (± 0.54%)+0.00s (+ 0.16%)0.63s0.64s
Check Time5.17s (± 0.49%)5.23s (± 0.45%)+0.06s (+ 1.12%)5.18s5.27s
Emit Time2.87s (± 0.71%)2.84s (± 0.88%)-0.03s (- 1.18%)2.79s2.90s
Total Time10.24s (± 0.46%)10.26s (± 0.41%)+0.02s (+ 0.19%)10.17s10.34s
TFS - node (v14.15.1, x64)
Memory used279,378k (± 0.01%)278,277k (± 0.01%)-1,102k (- 0.39%)278,225k278,319k
Parse Time1.34s (± 1.74%)1.32s (± 0.76%)-0.02s (- 1.34%)1.30s1.34s
Bind Time0.59s (± 0.98%)0.59s (± 0.76%)-0.00s (- 0.34%)0.58s0.60s
Check Time5.10s (± 0.34%)4.98s (± 0.38%)-0.12s (- 2.27%)4.95s5.02s
Emit Time3.08s (± 0.72%)3.04s (± 1.55%)-0.05s (- 1.56%)2.87s3.10s
Total Time10.11s (± 0.44%)9.93s (± 0.52%)-0.18s (- 1.77%)9.77s10.02s
material-ui - node (v14.15.1, x64)
Memory used430,804k (± 0.01%)430,786k (± 0.01%)-18k (- 0.00%)430,715k430,843k
Parse Time1.86s (± 0.84%)1.85s (± 0.40%)-0.01s (- 0.54%)1.84s1.87s
Bind Time0.54s (± 0.69%)0.53s (± 0.90%)-0.01s (- 1.50%)0.52s0.54s
Check Time12.33s (± 0.79%)12.48s (± 0.41%)+0.15s (+ 1.18%)12.34s12.60s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time14.73s (± 0.63%)14.86s (± 0.38%)+0.13s (+ 0.87%)14.72s15.01s
xstate - node (v14.15.1, x64)
Memory used504,601k (± 0.02%)504,463k (± 0.01%)-138k (- 0.03%)504,333k504,599k
Parse Time2.56s (± 0.35%)2.57s (± 0.41%)+0.00s (+ 0.20%)2.54s2.59s
Bind Time0.84s (± 0.66%)0.84s (± 0.44%)-0.00s (- 0.24%)0.83s0.84s
Check Time1.48s (± 0.65%)1.46s (± 0.42%)-0.01s (- 0.95%)1.45s1.48s
Emit Time0.07s (± 0.00%)0.07s (± 0.00%)0.00s ( 0.00%)0.07s0.07s
Total Time4.94s (± 0.32%)4.93s (± 0.19%)-0.01s (- 0.16%)4.91s4.95s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.15.1, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.15.1, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.15.1, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.15.1, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.15.1, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.15.1, x64)
BenchmarkNameIterations
Current5186510
Baselinemain10

TSServer

Comparison Report - main..51865
Metricmain51865DeltaBestWorst
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,056ms (± 0.76%)1,051ms (± 1.16%)-4ms (- 0.39%)1,028ms1,084ms
Req 2 - geterr2,586ms (± 0.69%)2,531ms (± 0.52%)-55ms (- 2.14%)2,514ms2,581ms
Req 3 - references166ms (± 0.73%)160ms (± 0.94%)🟩-6ms (- 3.62%)156ms162ms
Req 4 - navto138ms (± 0.83%)137ms (± 0.74%)-2ms (- 1.09%)134ms139ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo61ms (± 3.14%)60ms (± 2.57%)-1ms (- 1.96%)57ms62ms
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,099ms (± 0.94%)1,106ms (± 0.28%)+8ms (+ 0.72%)1,100ms1,112ms
Req 2 - geterr1,601ms (± 0.54%)1,574ms (± 0.52%)-27ms (- 1.69%)1,560ms1,597ms
Req 3 - references169ms (± 1.15%)163ms (± 0.46%)🟩-6ms (- 3.60%)162ms165ms
Req 4 - navto151ms (± 0.90%)150ms (± 0.24%)-1ms (- 0.80%)149ms150ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo53ms (± 1.69%)52ms (± 1.34%)-1ms (- 0.95%)51ms54ms
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen1,508ms (± 0.98%)1,505ms (± 0.92%)-3ms (- 0.21%)1,478ms1,538ms
Req 2 - geterr555ms (± 0.84%)554ms (± 0.62%)-2ms (- 0.27%)547ms561ms
Req 3 - references59ms (± 2.47%)58ms (± 2.21%)-0ms (- 0.68%)57ms63ms
Req 4 - navto195ms (± 1.00%)196ms (± 1.06%)+0ms (+ 0.20%)192ms202ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo214ms (± 1.40%)211ms (± 1.03%)-3ms (- 1.49%)205ms217ms
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,306ms (± 0.60%)1,295ms (± 0.41%)-11ms (- 0.86%)1,286ms1,310ms
Req 2 - geterr3,221ms (± 0.68%)3,154ms (± 0.52%)-67ms (- 2.09%)3,112ms3,176ms
Req 3 - references191ms (± 0.65%)186ms (± 0.71%)-5ms (- 2.56%)183ms189ms
Req 4 - navto151ms (± 0.72%)153ms (± 1.04%)+2ms (+ 1.32%)150ms157ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo60ms (± 2.45%)59ms (± 2.40%)-2ms (- 2.49%)56ms62ms
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,380ms (± 0.67%)1,378ms (± 0.76%)-3ms (- 0.19%)1,360ms1,402ms
Req 2 - geterr2,103ms (± 0.40%)2,062ms (± 0.43%)-41ms (- 1.95%)2,042ms2,086ms
Req 3 - references199ms (± 0.52%)192ms (± 0.38%)🟩-7ms (- 3.32%)191ms194ms
Req 4 - navto166ms (± 1.09%)165ms (± 0.90%)-2ms (- 0.96%)162ms168ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo58ms (± 3.32%)55ms (± 1.26%)🟩-3ms (- 5.87%)53ms56ms
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen1,820ms (± 0.62%)1,820ms (± 0.31%)-0ms (- 0.02%)1,808ms1,833ms
Req 2 - geterr723ms (± 0.74%)719ms (± 0.76%)-3ms (- 0.44%)707ms728ms
Req 3 - references68ms (± 1.01%)69ms (± 2.10%)+1ms (+ 2.07%)67ms73ms
Req 4 - navto201ms (± 0.97%)198ms (± 1.21%)-3ms (- 1.45%)193ms203ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo254ms (± 0.80%)254ms (± 1.15%)-0ms (- 0.04%)248ms264ms
Compiler-UnionsTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,449ms (± 0.45%)1,451ms (± 0.31%)+1ms (+ 0.08%)1,443ms1,464ms
Req 2 - geterr3,450ms (± 0.53%)3,389ms (± 0.66%)-61ms (- 1.78%)3,352ms3,451ms
Req 3 - references207ms (± 0.73%)199ms (± 0.44%)🟩-8ms (- 4.06%)197ms201ms
Req 4 - navto164ms (± 0.88%)163ms (± 0.91%)-1ms (- 0.67%)160ms166ms
Req 5 - completionInfo count1,356 (± 0.00%)1,356 (± 0.00%)0 ( 0.00%)1,3561,356
Req 5 - completionInfo58ms (± 2.17%)61ms (± 6.58%)+3ms (+ 5.73%)57ms72ms
CompilerTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,526ms (± 0.59%)1,530ms (± 0.39%)+4ms (+ 0.28%)1,519ms1,542ms
Req 2 - geterr2,291ms (± 0.41%)2,242ms (± 0.21%)-49ms (- 2.15%)2,231ms2,250ms
Req 3 - references216ms (± 1.11%)211ms (± 0.82%)-5ms (- 2.46%)207ms215ms
Req 4 - navto174ms (± 0.86%)171ms (± 0.91%)-3ms (- 1.72%)168ms176ms
Req 5 - completionInfo count1,518 (± 0.00%)1,518 (± 0.00%)0 ( 0.00%)1,5181,518
Req 5 - completionInfo56ms (± 1.30%)56ms (± 0.72%)+0ms (+ 0.18%)55ms57ms
xstateTSServer - node (v14.15.1, x64)
Req 1 - updateOpen1,996ms (± 0.37%)1,993ms (± 0.33%)-3ms (- 0.15%)1,981ms2,014ms
Req 2 - geterr746ms (± 0.30%)746ms (± 0.55%)-0ms (- 0.01%)735ms754ms
Req 3 - references72ms (± 1.31%)72ms (± 0.86%)-0ms (- 0.41%)71ms74ms
Req 4 - navto218ms (± 0.55%)218ms (± 0.40%)-0ms (- 0.09%)217ms220ms
Req 5 - completionInfo count3,154 (± 0.00%)3,154 (± 0.00%)0 ( 0.00%)3,1543,154
Req 5 - completionInfo270ms (± 0.56%)270ms (± 0.76%)-1ms (- 0.19%)267ms277ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.15.1, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.15.1, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.15.1, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.15.1, x64)
BenchmarkNameIterations
Current5186510
Baselinemain10

Startup

Comparison Report - main..51865
Metricmain51865DeltaBestWorst
tsc-startup - node (v16.17.1, x64)
Execution time118.71ms (± 0.52%)118.47ms (± 0.45%)-0.24ms (- 0.20%)115.83ms124.48ms
tsserver-startup - node (v16.17.1, x64)
Execution time198.83ms (± 0.44%)198.31ms (± 0.32%)-0.52ms (- 0.26%)194.93ms205.74ms
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time194.52ms (± 0.45%)192.92ms (± 0.34%)-1.60ms (- 0.82%)189.67ms202.20ms
typescript-startup - node (v16.17.1, x64)
Execution time178.06ms (± 0.38%)178.61ms (± 0.42%)+0.55ms (+ 0.31%)174.97ms186.48ms
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
BenchmarkNameIterations
Current5186510
Baselinemain10

Developer Information:

Download Benchmark

@RyanCavanaugh
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Heya@RyanCavanaugh, I've started to run the tarball bundle task on this PR atccf252f. You can monitor the buildhere.

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 12, 2022
edited
Loading

Hey@RyanCavanaugh, I've packed this intoan installable tgz. You can install it for testing by referencing it in yourpackage.json like so:

{    "devDependencies": {        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/140211/artifacts?artifactName=tgz&fileId=CA3B45CC535782C19A9298B874660B26676FB269A6536FD945B1E1CBC0B5671E02&fileName=/typescript-5.0.0-insiders.20221212.tgz"    }}

and then runningnpm install.


There is also a playgroundfor this build and annpm module you can use via"typescript": "npm:@typescript-deploys/pr-build@5.0.0-pr-51865-14".;

@ahejlsberg
Copy link
MemberAuthor

@typescript-bot perf test faster

@typescript-bot
Copy link
Collaborator

typescript-bot commentedDec 13, 2022
edited
Loading

Heya@ahejlsberg, I've started to run the abridged perf test suite on this PR atf8fd1fd. You can monitor the buildhere.

Update:The results are in!

@typescript-bot
Copy link
Collaborator

@ahejlsberg
The results of the perf run you requested are in!

Here they are:

Comparison Report - main..51865

Metricmain51865DeltaBestWorst
Angular - node (v16.17.1, x64)
Memory used340,488k (± 0.02%)339,603k (± 0.02%)-886k (- 0.26%)339,389k339,673k
Parse Time1.85s (± 0.55%)1.87s (± 0.59%)+0.02s (+ 1.24%)1.84s1.89s
Bind Time0.64s (± 0.90%)0.64s (± 0.56%)+0.00s (+ 0.16%)0.64s0.65s
Check Time5.16s (± 0.64%)5.13s (± 0.41%)-0.03s (- 0.68%)5.09s5.17s
Emit Time5.06s (± 1.14%)5.09s (± 0.54%)+0.03s (+ 0.67%)5.02s5.16s
Total Time12.71s (± 0.62%)12.74s (± 0.41%)+0.02s (+ 0.20%)12.64s12.87s
Compiler-Unions - node (v16.17.1, x64)
Memory used188,320k (± 0.66%)186,500k (± 0.55%)-1,820k (- 0.97%)185,754k189,388k
Parse Time0.79s (± 1.20%)0.79s (± 0.94%)+0.01s (+ 0.76%)0.78s0.81s
Bind Time0.42s (± 0.89%)0.42s (± 1.23%)+0.01s (+ 1.45%)0.41s0.43s
Check Time6.04s (± 0.51%)5.98s (± 0.87%)-0.06s (- 1.06%)5.85s6.07s
Emit Time1.94s (± 0.73%)1.92s (± 0.77%)-0.01s (- 0.72%)1.90s1.97s
Total Time9.19s (± 0.37%)9.12s (± 0.66%)-0.07s (- 0.74%)8.96s9.22s
Monaco - node (v16.17.1, x64)
Memory used319,729k (± 0.01%)318,830k (± 0.01%)-899k (- 0.28%)318,769k318,926k
Parse Time1.40s (± 0.50%)1.42s (± 0.71%)+0.02s (+ 1.14%)1.40s1.44s
Bind Time0.59s (± 0.76%)0.59s (± 0.50%)+0.00s (+ 0.68%)0.59s0.60s
Check Time4.85s (± 0.69%)4.93s (± 0.37%)+0.08s (+ 1.59%)4.87s4.96s
Emit Time2.71s (± 0.59%)2.70s (± 0.60%)-0.01s (- 0.33%)2.66s2.73s
Total Time9.55s (± 0.49%)9.64s (± 0.39%)+0.09s (+ 0.98%)9.53s9.70s
TFS - node (v16.17.1, x64)
Memory used282,309k (± 0.01%)281,279k (± 0.00%)-1,031k (- 0.37%)281,258k281,296k
Parse Time1.16s (± 0.94%)1.16s (± 0.91%)+0.01s (+ 0.52%)1.15s1.20s
Bind Time0.64s (± 4.33%)0.65s (± 4.70%)+0.01s (+ 1.56%)0.58s0.70s
Check Time4.74s (± 0.57%)4.68s (± 0.39%)-0.06s (- 1.26%)4.64s4.72s
Emit Time2.76s (± 2.15%)2.74s (± 1.88%)-0.01s (- 0.51%)2.63s2.83s
Total Time9.30s (± 0.68%)9.24s (± 0.59%)-0.06s (- 0.62%)9.08s9.32s
material-ui - node (v16.17.1, x64)
Memory used435,352k (± 0.01%)435,351k (± 0.01%)-1k (- 0.00%)435,292k435,451k
Parse Time1.61s (± 0.40%)1.63s (± 0.61%)+0.02s (+ 1.30%)1.62s1.66s
Bind Time0.50s (± 1.04%)0.51s (± 1.09%)+0.01s (+ 1.40%)0.50s0.52s
Check Time11.75s (± 0.58%)12.14s (± 0.71%)+0.39s (+ 3.31%)11.95s12.30s
Emit Time0.00s (± 0.00%)0.00s (± 0.00%)0.00s ( NaN%)0.00s0.00s
Total Time13.87s (± 0.51%)14.29s (± 0.64%)+0.42s (+ 2.99%)14.08s14.46s
xstate - node (v16.17.1, x64)
Memory used516,243k (± 0.01%)516,312k (± 0.01%)+70k (+ 0.01%)516,214k516,489k
Parse Time2.26s (± 0.29%)2.29s (± 0.41%)+0.03s (+ 1.41%)2.27s2.31s
Bind Time0.82s (± 0.75%)0.83s (± 1.39%)+0.01s (+ 1.58%)0.82s0.88s
Check Time1.35s (± 0.59%)1.35s (± 0.81%)0.00s ( 0.00%)1.32s1.37s
Emit Time0.06s (± 0.00%)0.06s (± 0.00%)0.00s ( 0.00%)0.06s0.06s
Total Time4.50s (± 0.27%)4.54s (± 0.34%)+0.04s (+ 0.80%)4.51s4.59s
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-131-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
BenchmarkNameIterations
Current5186510
Baselinemain10

Developer Information:

Download Benchmark

@mon-jai
Copy link

Could this fix#13923 too?

@ConaclosConaclos mentioned this pull requestFeb 22, 2023
2 tasks
dominikjasek added a commit to dominikjasek/required-properties that referenced this pull requestJun 16, 2023
@JavaScriptBach
Copy link

This is a great feature. Would you consider allowing it for type aliases as well?

Example use case:Automattic/mongoose#12782

@RyanCavanaugh
Copy link
Member

@JavaScriptBach huh? There's no straightforward correspondence from this feature to something that would apply to type aliases.const type parameters in generic functions change the interpretation of objects in expression-space, but type aliases operate entirely in type-space.

@JavaScriptBach
Copy link

@RyanCavanaugh My point is that I have generic type aliases that expect to take in const type parameters, e.g. something like

typeFoo<T>= ...

It would be great to be able to typeT as a const parameter instead of requiring all callers to specifyas const. I can't speak for implementation, but I think supporting const type parameters for type aliases would be useful for the same reasons that they're useful today for functions, methods, and classes.

@RyanCavanaugh
Copy link
Member

It would be great to be able to type T as a const parameter instead of requiring all callers to specify as const

Again, not understanding. You can't write this, it's syntactically illegal:

typeX=Foo<{x:3}asconst>;

@sroucheraysroucheray mentioned this pull requestSep 24, 2024
17 tasks
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull requestDec 18, 2024
Summary:Adds support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```We parse an optional `const` keyword right before parsing the variance of a type parameter.```cd ~/fbsource/xplat/hermes/unsupported/tools/rustgenbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- ffi > ../../juno/crates/hermes/src/parser/generated_ffi.rsbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- cvt > ../../juno/crates/juno/src/hparser/generated_cvt.rs```Reviewed By: avpDifferential Revision: D66739150fbshipit-source-id: 66411ee424cea3ab19a1f8c2ab09d80abdf2737a
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull requestDec 18, 2024
Summary:JS changes for support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```Reviewed By: SamChou19815Differential Revision: D66856337fbshipit-source-id: 109911abd8400b97a35d20d611b376dd12c46bed
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull requestJan 7, 2025
Summary:Original Author: pvekris@meta.comOriginal Git:3a24531Original Reviewed By: avpOriginal Revision: D66739150Adds support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```We parse an optional `const` keyword right before parsing the variance of a type parameter.```cd ~/fbsource/xplat/hermes/unsupported/tools/rustgenbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- ffi > ../../juno/crates/hermes/src/parser/generated_ffi.rsbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- cvt > ../../juno/crates/juno/src/hparser/generated_cvt.rs```Reviewed By: fbmal7Differential Revision: D67867901fbshipit-source-id: 4683aee20adfed18e0a6343b4fdacf8e016015df
facebook-github-bot pushed a commit to facebook/hermes that referenced this pull requestJan 7, 2025
Summary:Original Author: pvekris@meta.comOriginal Git:d9b1826Original Reviewed By: SamChou19815Original Revision: D66856337JS changes for support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```Reviewed By: fbmal7Differential Revision: D67867911fbshipit-source-id: a711201cad644a6659c8b443a349f9f70f251511
vmoroz pushed a commit to vmoroz/hermes-windows that referenced this pull requestApr 17, 2025
Summary:Adds support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```We parse an optional `const` keyword right before parsing the variance of a type parameter.```cd ~/fbsource/xplat/hermes/unsupported/tools/rustgenbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- ffi > ../../juno/crates/hermes/src/parser/generated_ffi.rsbuck run //xplat/hermes/unsupported/tools/rustgen:rustgen -- cvt > ../../juno/crates/juno/src/hparser/generated_cvt.rs```Reviewed By: avpDifferential Revision: D66739150fbshipit-source-id: 66411ee424cea3ab19a1f8c2ab09d80abdf2737a
vmoroz pushed a commit to vmoroz/hermes-windows that referenced this pull requestApr 17, 2025
Summary:JS changes for support for [`const` modifier on type parameters](microsoft/TypeScript#51865). E.g.```function foo<const T>(x: T): [T] {...}```Reviewed By: SamChou19815Differential Revision: D66856337fbshipit-source-id: 109911abd8400b97a35d20d611b376dd12c46bed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AndaristAndaristAndarist left review comments

@juansalvatorejuansalvatorejuansalvatore left review comments

@RyanCavanaughRyanCavanaughRyanCavanaugh approved these changes

@DanielRosenwasserDanielRosenwasserAwaiting requested review from DanielRosenwasser

Assignees

@ahejlsbergahejlsberg

Labels
Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Const Type Constraint Suggestion: Const contexts for generic type inference
13 participants
@ahejlsberg@typescript-bot@RyanCavanaugh@mon-jai@Andarist@Thundercraft5@L13@magic-akari@ctjlewis@Mlocik97@SalathielGenese@JavaScriptBach@juansalvatore

[8]ページ先頭

©2009-2025 Movatter.jp