Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
764198d
Fail tests whose baseline should be deleted
jakebailey Nov 5, 2026
5ce0384
Add check order variants and a check order fuzzer to the test harness
jakebailey Oct 22, 2026
b60adea
Fuzz which files share a checker
jakebailey Nov 3, 2026
7bedb0a
Add tests for check order dependence
jakebailey Oct 22, 2026
61d8656
Don't crash reporting a too large tuple outside of checking
jakebailey Nov 3, 2026
17d2da5
Check assertion operands once, with their normal type
jakebailey Oct 19, 2026
d38dd90
Derive binding pattern parent types without peeking at caches
jakebailey Oct 19, 2026
f299593
Make contextual typing of functions independent of query order
jakebailey Oct 19, 2026
97108f9
Resolve calls in source order and locate their errors at the call
jakebailey Oct 19, 2026
db99b0a
Do not cache results that depend on who asked first
jakebailey Oct 19, 2026
3e86d4c
Report unresolved names after resolution completes
jakebailey Oct 19, 2026
2475fcd
Make flow analysis of a reference independent of other references
jakebailey Oct 19, 2026
1f358de
Track computed property name cycles on the resolution stack
jakebailey Oct 19, 2026
654f5d7
Order and intern types by content instead of by type id
jakebailey Oct 20, 2026
5cbd0e0
Cache relation results only once their assumptions are resolved
jakebailey Oct 20, 2026
fecdfb8
Look through instantiation when reusing a parameter name
jakebailey Oct 22, 2026
231bc62
Check computed enum initializers when checking the member
jakebailey Oct 22, 2026
53c648f
Make checker results independent of check and query order
jakebailey Nov 3, 2026
8921c47
Do not blame a use for the circular constraint of a declaration
jakebailey Oct 22, 2026
b57674a
Resolve mapped type constraints whenever the mapped type is requested
jakebailey Oct 22, 2026
6eff82d
Resolve return type cycles as if entered at their first member
jakebailey Nov 1, 2026
f9a4950
Use JSDoc type tags when assigning contextual parameter types
jakebailey Nov 1, 2026
beaedf5
Name an instantiation cycle from its first declared type
jakebailey Nov 1, 2026
3aa8810
Discard results computed from a binding pattern's own elements
jakebailey Nov 2, 2026
0c69fe3
Keep the result of a resolution nested in a hidden one of itself
jakebailey Nov 1, 2026
d3a4495
Keep results a cycle yield computes from scratch
jakebailey Nov 2, 2026
2cc2e9b
Record per-node check facts eagerly instead of as effects
jakebailey Nov 5, 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,423 changes: 3,983 additions & 1,440 deletions tsc/internal/checker/checker.go

Large diffs are not rendered by default.

507 changes: 507 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.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