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
817deed
Add check order variants and a check order fuzzer to the test harness
jakebailey Oct 22, 2026
f65546d
Add tests for check order dependence
jakebailey Oct 22, 2026
6702ebe
Don't crash reporting a too large tuple outside of checking
jakebailey Nov 3, 2026
e1f74c3
Check assertion operands once, with their normal type
jakebailey Oct 19, 2026
86af35a
Derive binding pattern parent types without peeking at caches
jakebailey Oct 19, 2026
4da6931
Make contextual typing of functions independent of query order
jakebailey Oct 19, 2026
a9ca22a
Resolve calls in source order and locate their errors at the call
jakebailey Oct 19, 2026
29a4823
Do not cache results that depend on who asked first
jakebailey Oct 19, 2026
eb41d9f
Report unresolved names after resolution completes
jakebailey Oct 19, 2026
1020303
Make flow analysis of a reference independent of other references
jakebailey Oct 19, 2026
60c8ae8
Track computed property name cycles on the resolution stack
jakebailey Oct 19, 2026
3ab6442
Order and intern types by content instead of by type id
jakebailey Oct 20, 2026
f763c9e
Cache relation results only once their assumptions are resolved
jakebailey Oct 20, 2026
035c530
Look through instantiation when reusing a parameter name
jakebailey Oct 22, 2026
d8bd2ec
Check computed enum initializers when checking the member
jakebailey Oct 22, 2026
53dfb02
Make checker results independent of check and query order
jakebailey Nov 3, 2026
705145f
Do not blame a use for the circular constraint of a declaration
jakebailey Oct 22, 2026
1fa1280
Resolve mapped type constraints whenever the mapped type is requested
jakebailey Oct 22, 2026
0002ffd
Resolve return type cycles as if entered at their first member
jakebailey Nov 1, 2026
b62cff0
Use JSDoc type tags when assigning contextual parameter types
jakebailey Nov 1, 2026
c54b837
Name an instantiation cycle from its first declared type
jakebailey Nov 1, 2026
3d2e34f
Discard results computed from a binding pattern's own elements
jakebailey Nov 2, 2026
903b6d9
Keep the result of a resolution nested in a hidden one of itself
jakebailey Nov 1, 2026
5de0086
Keep results a cycle yield computes from scratch
jakebailey Nov 2, 2026
0b221ed
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,440 changes: 3,985 additions & 1,455 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