Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
272419c
Add check order variants and a check order fuzzer to the test harness
jakebailey Oct 22, 2026
f746951
Add tests for check order dependence
jakebailey Oct 22, 2026
6b67874
Don't crash reporting a too large tuple outside of checking
jakebailey Nov 3, 2026
18f6080
Check assertion operands once, with their normal type
jakebailey Oct 19, 2026
7c7b65f
Derive binding pattern parent types without peeking at caches
jakebailey Oct 19, 2026
54ed1ac
Make contextual typing of functions independent of query order
jakebailey Oct 19, 2026
19132e4
Resolve calls in source order and locate their errors at the call
jakebailey Oct 19, 2026
830d9fa
Do not cache results that depend on who asked first
jakebailey Oct 19, 2026
e9cd059
Report unresolved names after resolution completes
jakebailey Oct 19, 2026
44aaf12
Make flow analysis of a reference independent of other references
jakebailey Oct 19, 2026
cd98704
Track computed property name cycles on the resolution stack
jakebailey Oct 19, 2026
9d1a450
Order and intern types by content instead of by type id
jakebailey Oct 20, 2026
44477d3
Cache relation results only once their assumptions are resolved
jakebailey Oct 20, 2026
c480195
Look through instantiation when reusing a parameter name
jakebailey Oct 22, 2026
d51cb97
Check computed enum initializers when checking the member
jakebailey Oct 22, 2026
7204b82
Make checker results independent of check and query order
jakebailey Nov 3, 2026
1d69a74
Do not blame a use for the circular constraint of a declaration
jakebailey Oct 22, 2026
02f0189
Resolve mapped type constraints whenever the mapped type is requested
jakebailey Oct 22, 2026
00a4c23
Resolve return type cycles as if entered at their first member
jakebailey Nov 1, 2026
036bfb2
Use JSDoc type tags when assigning contextual parameter types
jakebailey Nov 1, 2026
2856385
Name an instantiation cycle from its first declared type
jakebailey Nov 1, 2026
bc360be
Discard results computed from a binding pattern's own elements
jakebailey Nov 2, 2026
7f91469
Keep the result of a resolution nested in a hidden one of itself
jakebailey Nov 1, 2026
c97b992
Keep results a cycle yield computes from scratch
jakebailey Nov 2, 2026
b143a9a
Fuzz which files share a checker
jakebailey Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion packages/typescript/enums/objectFlags.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export declare enum ObjectFlags {
ContainsSpread = 1 << 22,
ObjectRestType = 1 << 23,
IsClassInstanceClone = 1 << 26,
IdenticalBaseTypeCalculated = 1 << 27,
IdenticalBaseTypeExists = 1 << 28,
FromTypeNode = 1 << 29,
IsGenericTypeComputed = 1 << 22,
Expand Down
1 change: 0 additions & 1 deletion packages/typescript/enums/objectFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export var ObjectFlags;
ObjectFlags[ObjectFlags["ContainsSpread"] = 4194304] = "ContainsSpread";
ObjectFlags[ObjectFlags["ObjectRestType"] = 8388608] = "ObjectRestType";
ObjectFlags[ObjectFlags["IsClassInstanceClone"] = 67108864] = "IsClassInstanceClone";
ObjectFlags[ObjectFlags["IdenticalBaseTypeCalculated"] = 134217728] = "IdenticalBaseTypeCalculated";
ObjectFlags[ObjectFlags["IdenticalBaseTypeExists"] = 268435456] = "IdenticalBaseTypeExists";
ObjectFlags[ObjectFlags["FromTypeNode"] = 536870912] = "FromTypeNode";
ObjectFlags[ObjectFlags["IsGenericTypeComputed"] = 4194304] = "IsGenericTypeComputed";
Expand Down
1 change: 0 additions & 1 deletion tsc/internal/api/enum_values_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tsc/internal/ast/symbol.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ func (m *SymbolMap) SymbolAt(i int) *Symbol {
return symbol
}

// At returns the name and symbol of the i-th entry, in insertion order.
func (m *SymbolMap) At(i int) (string, *Symbol) {
return m.KeyAt(i), m.SymbolAt(i)
}

func (m *SymbolMap) Find(key string) int {
if m == nil {
return -1
Expand Down
10 changes: 10 additions & 0 deletions tsc/internal/ast/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ func GetNodeId(node *Node) NodeId {
return NodeId(id)
}

// PeekNodeId returns the id of node, or 0 if it has none yet.
func PeekNodeId(node *Node) NodeId {
return NodeId(node.id.Load())
}

// PeekSymbolId returns the id of symbol, or 0 if it has none yet.
func PeekSymbolId(symbol *Symbol) SymbolId {
return SymbolId(symbol.id.Load())
}

func GetSymbolId(symbol *Symbol) SymbolId {
id := symbol.id.Load()
if id == 0 {
Expand Down
5,463 changes: 3,998 additions & 1,465 deletions tsc/internal/checker/checker.go

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions tsc/internal/checker/checker_test.go

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion tsc/internal/checker/emitresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (r *EmitResolver) IsReferencedAliasDeclaration(node *ast.Node) bool {
if aliasLinks.referenced {
return true
}
target := aliasLinks.aliasTarget
target := aliasLinks.aliasTarget.get(c)
if target != nil && node.ModifierFlags()&ast.ModifierFlagsExport != 0 &&
c.getSymbolFlags(target)&ast.SymbolFlagsValue != 0 &&
(c.compilerOptions.ShouldPreserveConstEnums() || !isConstEnumOrConstEnumOnlyModule(target)) {
Expand Down Expand Up @@ -502,6 +502,12 @@ func (r *EmitResolver) MarkLinkedReferencesRecursively(file *ast.SourceFile) {
defer r.checkerMu.Unlock()

if file != nil {
r.checker.withReferenceMarks(func() { r.markLinkedReferencesRecursively(file) })
}
}

func (r *EmitResolver) markLinkedReferencesRecursively(file *ast.SourceFile) {
{
var visit ast.Visitor
visit = func(n *ast.Node) bool {
if ast.IsImportEqualsDeclaration(n) && n.ModifierFlags()&ast.ModifierFlagsExport == 0 {
Expand Down
Loading
Loading