All files / builder/platform/util type-predicate.ts

100% Statements 11/11
100% Branches 0/0
100% Functions 5/5
100% Lines 11/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 261x                   1x 2196x   1x 1168x   1x 273x   1x 243x   1x 1098x    
import {
  NgBoundTextMeta,
  NgContentMeta,
  NgElementMeta,
  NgNodeKind,
  NgNodeMeta,
  NgTemplateMeta,
  NgTextMeta,
} from '../../mini-program-compiler';
 
export function isNgElementMeta(node: NgNodeMeta): node is NgElementMeta {
  return node.kind === NgNodeKind.Element;
}
export function isNgBoundTextMeta(node: NgNodeMeta): node is NgBoundTextMeta {
  return node.kind === NgNodeKind.BoundText;
}
export function isNgContentMeta(node: NgNodeMeta): node is NgContentMeta {
  return node.kind === NgNodeKind.Content;
}
export function isNgTemplateMeta(node: NgNodeMeta): node is NgTemplateMeta {
  return node.kind === NgNodeKind.Template;
}
export function isNgTextMeta(node: NgNodeMeta): node is NgTextMeta {
  return node.kind === NgNodeKind.Text;
}