MCPcopy Create free account
hub / github.com/babel/babel / TSIntersectionType

Function TSIntersectionType

packages/babel-generator/src/node/parentheses.ts:320–331  ·  view source on GitHub ↗
(
  node: t.TSIntersectionType,
  parent: any,
  parentId: number,
)

Source from the content-addressed store, hash-verified

318}
319
320export function TSIntersectionType(
321 node: t.TSIntersectionType,
322 parent: any,
323 parentId: number,
324): boolean {
325 return (
326 parentId === __node("TSTypeOperator") ||
327 TSTypeOperator(node, parent, parentId) ||
328 // `A & (& B)` must not become `A & & B`
329 (parentId === __node("TSIntersectionType") && node.types.length === 1)
330 );
331}
332
333export function TSInferType(
334 node: t.TSInferType,

Callers

nothing calls this directly

Calls 1

TSTypeOperatorFunction · 0.70

Tested by

no test coverage detected