Skip to content

⬅️ Back to Table of Contents

📄 TSTypePredicate/spec

📊 Analysis Summary

Metric Count
📦 Imports 5
📐 Interfaces 3
📑 Type Aliases 1

📚 Table of Contents

🛠️ File Location:

📂 packages/ast-spec/src/type/TSTypePredicate/spec.ts

📦 Imports

Name Source
AST_NODE_TYPES ../../ast-node-types
BaseNode ../../base/BaseNode
Identifier ../../expression/Identifier/spec
TSTypeAnnotation ../../special/TSTypeAnnotation/spec
TSThisType ../TSThisType/spec

Interfaces

TSTypePredicateBase

Interface Code
interface TSTypePredicateBase extends BaseNode {
  type: AST_NODE_TYPES.TSTypePredicate;
  asserts: boolean;
  parameterName: Identifier | TSThisType;
  typeAnnotation: TSTypeAnnotation | null;
}

Properties

Name Type Optional Description
type AST_NODE_TYPES.TSTypePredicate not shown
asserts boolean not shown
parameterName Identifier \| TSThisType not shown
typeAnnotation TSTypeAnnotation \| null not shown

TSTypePredicateWithAsserts

Interface Code
export interface TSTypePredicateWithAsserts extends TSTypePredicateBase {
  asserts: true;
}

Properties

Name Type Optional Description
asserts true not shown

TSTypePredicateNoAsserts

Interface Code
export interface TSTypePredicateNoAsserts extends TSTypePredicateBase {
  asserts: false;
  typeAnnotation: TSTypeAnnotation;
}

Properties

Name Type Optional Description
asserts false not shown
typeAnnotation TSTypeAnnotation not shown

Type Aliases

TSTypePredicate

type TSTypePredicate = TSTypePredicateNoAsserts | TSTypePredicateWithAsserts;

Generated by Syntax Scribe