Skip to content

⬅️ Back to Table of Contents

📄 class-scope-analyzer/types

📊 Analysis Summary

Metric Count
🔧 Functions 2
📦 Imports 1
📑 Type Aliases 5

📚 Table of Contents

🛠️ File Location:

📂 packages/eslint-plugin/src/util/class-scope-analyzer/types.ts

📦 Imports

Name Source
TSESTree @typescript-eslint/utils

Functions

publicKey(name: string): PublicKey

Parameters:

  • name string

Returns: PublicKey

Code
export function publicKey(name: string): PublicKey {
  return name as PublicKey;
}

privateKey(node: TSESTree.PrivateIdentifier): PrivateKey

Parameters:

  • node TSESTree.PrivateIdentifier

Returns: PrivateKey

Code
export function privateKey(node: TSESTree.PrivateIdentifier): PrivateKey {
  return `#private@@${node.name}` as PrivateKey;
}

Type Aliases

ClassNode

type ClassNode = TSESTree.ClassDeclaration | TSESTree.ClassExpression;

MemberNode

type MemberNode = | TSESTree.AccessorProperty
  | TSESTree.MethodDefinition
  | TSESTree.PropertyDefinition
  | TSESTree.TSAbstractAccessorProperty
  | TSESTree.TSAbstractMethodDefinition
  | TSESTree.TSAbstractPropertyDefinition
  | TSESTree.TSParameterProperty;

PrivateKey

type PrivateKey = string & { __brand: 'private-key' };

PublicKey

type PublicKey = string & { __brand: 'public-key' };

Key

type Key = PrivateKey | PublicKey;

Generated by Syntax Scribe