CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.13 (changelog, source)

Member predicate Type::unfoldUnionAndIntersection

Repeatedly unfolds union and intersection types and gets any of the underlying types, or this type itself if it is not a union or intersection.

For example, for a type (S & T) | U this gets the types S, T, and U.

Type unfoldUnionAndIntersection()