Skip to content

⬅️ Back to Table of Contents

📄 type-predicate1.ts

📊 Analysis Summary

Metric Count
🔧 Functions 1

📚 Table of Contents

🛠️ File Location:

📂 packages/scope-manager/tests/fixtures/functions/function-declaration/type-predicate1.ts

Functions

foo(arg: any): arg is string

Code
function foo(arg: any): arg is string {
  return typeof arg === 'string';
}
  • Parameters:
  • arg: any
  • Return Type: arg is string