Skip to content

⬅️ Back to Table of Contents

📄 getDeclaration.test.ts

📊 Analysis Summary

Metric Count
🔧 Functions 11
📦 Imports 3
📊 Variables & Constants 1

📚 Table of Contents

🛠️ File Location:

📂 packages/type-utils/tests/getDeclaration.test.ts

📦 Imports

Name Source
TSESTree @typescript-eslint/types
ParserServicesWithTypeInformation @typescript-eslint/typescript-estree
getDeclaration ../src/index.js

Variables & Constants

Name Type Kind Value Exported
node TSESTree.Node const {} as TSESTree.Node

Functions

mockSymbol(declarations: ts.Declaration[]): ts.Symbol

Code
(declarations?: ts.Declaration[]): ts.Symbol => {
  return {
    getDeclarations: () => declarations,
  } as ts.Symbol;
}
  • Parameters:
  • declarations: ts.Declaration[]
  • Return Type: ts.Symbol

getDeclarations(): ts.Declaration[]

Code
() => declarations
  • Return Type: ts.Declaration[]

getDeclarations(): ts.Declaration[]

Code
() => declarations
  • Return Type: ts.Declaration[]

getDeclarations(): ts.Declaration[]

Code
() => declarations
  • Return Type: ts.Declaration[]

getDeclarations(): ts.Declaration[]

Code
() => declarations
  • Return Type: ts.Declaration[]

mockServices(symbol: ts.Symbol): ParserServicesWithTypeInformation

Code
(
  symbol?: ts.Symbol,
): ParserServicesWithTypeInformation => {
  return {
    getSymbolAtLocation: (_: TSESTree.Node) => symbol,
  } as ParserServicesWithTypeInformation;
}
  • Parameters:
  • symbol: ts.Symbol
  • Return Type: ParserServicesWithTypeInformation

getSymbolAtLocation(_: TSESTree.Node): ts.Symbol

Code
(_: TSESTree.Node) => symbol
  • Parameters:
  • _: TSESTree.Node
  • Return Type: ts.Symbol

getSymbolAtLocation(_: TSESTree.Node): ts.Symbol

Code
(_: TSESTree.Node) => symbol
  • Parameters:
  • _: TSESTree.Node
  • Return Type: ts.Symbol

getSymbolAtLocation(_: TSESTree.Node): ts.Symbol

Code
(_: TSESTree.Node) => symbol
  • Parameters:
  • _: TSESTree.Node
  • Return Type: ts.Symbol

getSymbolAtLocation(_: TSESTree.Node): ts.Symbol

Code
(_: TSESTree.Node) => symbol
  • Parameters:
  • _: TSESTree.Node
  • Return Type: ts.Symbol

mockDeclaration(): ts.Declaration

Code
(): ts.Declaration => {
  return {} as ts.Declaration;
}
  • Return Type: ts.Declaration