We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fdd929 commit cd87d90Copy full SHA for cd87d90
1 file changed
src/compiler/checker.ts
@@ -10041,9 +10041,9 @@ namespace ts {
10041
return f(type) ? type : neverType;
10042
}
10043
10044
- // Apply a mapping function to a contextual type and return the resulting type. If the contextual type
10045
- // is a union type, the mapping function is applied to each constituent type and a union of the resulting
10046
- // types is returned.
+ // Apply a mapping function to a type and return the resulting type. If the source type
+ // is a union type, the mapping function is applied to each constituent type and a union
+ // of the resulting types is returned.
10047
function mapType(type: Type, mapper: (t: Type) => Type): Type {
10048
if (!(type.flags & TypeFlags.Union)) {
10049
return mapper(type);
0 commit comments