Add the given types to the given type set. Order is preserved, freshness is removed from literal types, duplicates are removed, and nested types of the given kind are flattened into the set.
(typeSet *orderedSet[*Type], includes TypeFlags, types []*Type)
| 26143 | // Add the given types to the given type set. Order is preserved, freshness is removed from literal |
| 26144 | // types, duplicates are removed, and nested types of the given kind are flattened into the set. |
| 26145 | func (c *Checker) addTypesToIntersection(typeSet *orderedSet[*Type], includes TypeFlags, types []*Type) TypeFlags { |
| 26146 | for _, t := range types { |
| 26147 | includes = c.addTypeToIntersection(typeSet, includes, c.getRegularTypeOfLiteralType(t)) |
| 26148 | } |
| 26149 | return includes |
| 26150 | } |
| 26151 | |
| 26152 | func (c *Checker) addTypeToIntersection(typeSet *orderedSet[*Type], includes TypeFlags, t *Type) TypeFlags { |
| 26153 | flags := t.flags |
no test coverage detected