(t *Type, info TupleElementInfo)
| 23336 | } |
| 23337 | |
| 23338 | func (n *TupleNormalizer) add(t *Type, info TupleElementInfo) { |
| 23339 | if info.flags&ElementFlagsRequired != 0 { |
| 23340 | n.lastRequiredIndex = len(n.types) |
| 23341 | } |
| 23342 | if info.flags&ElementFlagsRest != 0 && n.firstRestIndex < 0 { |
| 23343 | n.firstRestIndex = len(n.types) |
| 23344 | } |
| 23345 | if info.flags&(ElementFlagsOptional|ElementFlagsRest) != 0 { |
| 23346 | n.lastOptionalOrRestIndex = len(n.types) |
| 23347 | } |
| 23348 | n.types = append(n.types, n.c.addOptionalityEx(t, true /*isProperty*/, info.flags&ElementFlagsOptional != 0)) |
| 23349 | n.infos = append(n.infos, info) |
| 23350 | } |
| 23351 | |
| 23352 | // Return count of starting consecutive tuple elements of the given kind(s) |
| 23353 | func getStartElementCount(t *TupleType, flags ElementFlags) int { |
no test coverage detected