Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/binder/binder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ func (b *Binder) bindTryStatement(node *ast.Node) {
b.addAntecedent(b.currentReturnTarget, b.createReduceLabel(finallyLabel, returnLabel.Antecedents, b.currentFlow))
}
// If we have an outer exception target (i.e. a containing try-finally or try-catch-finally), add a
// control flow that goes back through the finally blok and back through each possible exception source.
// control flow that goes back through the finally block and back through each possible exception source.
if b.currentExceptionTarget != nil && exceptionLabel.Antecedents != nil {
b.addAntecedent(b.currentExceptionTarget, b.createReduceLabel(finallyLabel, exceptionLabel.Antecedents, b.currentFlow))
}
Expand Down
2 changes: 1 addition & 1 deletion internal/checker/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17728,7 +17728,7 @@ func (c *Checker) isValidBaseType(t *Type) bool {
return c.isValidBaseType(constraint)
}
}
// TODO: Given that we allow type parmeters here now, is this `!isGenericMappedType(type)` check really needed?
// TODO: Given that we allow type parameters here now, is this `!isGenericMappedType(type)` check really needed?
// There's no reason a `T` should be allowed while a `Readonly<T>` should not.
return t.flags&(TypeFlagsObject|TypeFlagsNonPrimitive|TypeFlagsAny) != 0 && !c.isGenericMappedType(t) ||
t.flags&TypeFlagsIntersection != 0 && core.Every(t.Types(), c.isValidBaseType)
Expand Down
2 changes: 1 addition & 1 deletion internal/checker/relater.go
Original file line number Diff line number Diff line change
Expand Up @@ -3860,7 +3860,7 @@ func (r *Relater) typeArgumentsRelatedTo(sources []*Type, targets []*Type, varia
var related Ternary
if varianceFlags&VarianceFlagsUnmeasurable != 0 {
// Even an `Unmeasurable` variance works out without a structural check if the source and target are _identical_.
// We can't simply assume invariance, because `Unmeasurable` marks nonlinear relations, for example, a relation tained by
// We can't simply assume invariance, because `Unmeasurable` marks nonlinear relations, for example, a relation tainted by
// the `-?` modifier in a mapped type (where, no matter how the inputs are related, the outputs still might not be)
if r.relation == r.c.identityRelation {
related = r.isRelatedTo(s, t, RecursionFlagsBoth, false /*reportErrors*/)
Expand Down
4 changes: 2 additions & 2 deletions internal/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type PrintHandlers struct {

// !!!
////OnEmitSourceMapOfNode func(hint EmitHint, node *ast.Node, emitCallback func(hint EmitHint, node *ast.Node))
////OnEmitSourceMapOfToken func(nodeOpt *ast.Node | undefined, toke: ast.Kind, writeKind WriteKind, pos int, emitCallback func(token ast.Kind, writeKind WriteKind, pos int) int) int
////OnEmitSourceMapOfToken func(nodeOpt *ast.Node | undefined, token: ast.Kind, writeKind WriteKind, pos int, emitCallback func(token ast.Kind, writeKind WriteKind, pos int) int) int
////OnEmitSourceMapOfPosition func(pos int)

OnBeforeEmitNode func(nodeOpt *ast.Node)
Expand Down Expand Up @@ -166,7 +166,7 @@ func (p *Printer) getLiteralTextOfNode(node *ast.LiteralLikeNode, sourceFile *as
}

// !!! Printer option to control whether to terminate unterminated literals
// !!! If necessary, printer option to control whether to preserve numeric seperators
// !!! If necessary, printer option to control whether to preserve numeric separators
if p.emitContext.EmitFlags(node)&EFNoAsciiEscaping != 0 {
flags |= getLiteralTextFlagsNeverAsciiEscape
}
Expand Down
6 changes: 3 additions & 3 deletions internal/transformers/commonjsmodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ func (tx *CommonJSModuleTransformer) visitAssignmentExpression(node *ast.BinaryE
return tx.visitor.VisitEachChild(node.AsNode())
}

// Visits a destructuring asssignment which might target an exported identifier.
// Visits a destructuring assignment which might target an exported identifier.
func (tx *CommonJSModuleTransformer) visitDestructuringAssignment(node *ast.BinaryExpression) *ast.Node {
return tx.factory.UpdateBinaryExpression(
node,
Expand Down Expand Up @@ -1530,7 +1530,7 @@ func (tx *CommonJSModuleTransformer) visitCommaExpression(node *ast.BinaryExpres
return tx.factory.UpdateBinaryExpression(node, left, node.OperatorToken, right)
}

// Visits a prefix unary expression that might modifify an exported identifier.
// Visits a prefix unary expression that might modify an exported identifier.
func (tx *CommonJSModuleTransformer) visitPrefixUnaryExpression(node *ast.PrefixUnaryExpression, resultIsDiscarded bool) *ast.Node {
// When we see a prefix increment expression whose operand is an exported
// symbol, we should ensure all exports of that symbol are updated with the correct
Expand Down Expand Up @@ -1568,7 +1568,7 @@ func (tx *CommonJSModuleTransformer) visitPrefixUnaryExpression(node *ast.Prefix
return tx.visitor.VisitEachChild(node.AsNode())
}

// Visits a postfix unary expression that might modifify an exported identifier.
// Visits a postfix unary expression that might modify an exported identifier.
func (tx *CommonJSModuleTransformer) visitPostfixUnaryExpression(node *ast.PostfixUnaryExpression, resultIsDiscarded bool) *ast.Node {
// When we see a postfix increment expression whose operand is an exported
// symbol, we should ensure all exports of that symbol are updated with the correct
Expand Down
2 changes: 1 addition & 1 deletion internal/tsoptions/tsconfigparsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ func removeWildcardFilesWithLowerPriorityExtension(file string, wildcardFiles co
// basePath is the base path for any relative file specifications.
// options is the Compiler options.
// host is the host used to resolve files and directories.
// extraFileExtensions optionaly file extra file extension information from host
// extraFileExtensions optionally file extra file extension information from host

func getFileNamesFromConfigSpecs(
configFileSpecs configFileSpecs,
Expand Down