Skip to content

⬅️ Back to Table of Contents

📄 version-check

📊 Analysis Summary

Metric Count
🔧 Functions 1
📊 Variables & Constants 2
📑 Type Aliases 1

📚 Table of Contents

🛠️ File Location:

📂 packages/typescript-estree/src/version-check.ts

Variables & Constants

Name Type Kind Value Exported
versions readonly ["4.7", "4.8", "4.9", "5.0",... const [ '4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7'...
typescriptVersionIsAtLeast Record<"6.0" \| "4.7" \| "4.8" \| "4.... const {} as Record<Versions, boolean>

Functions

semverCheck(version: string): boolean

Parameters:

  • version string

Returns: boolean

Calls:

  • semver.satisfies
Code
function semverCheck(version: string): boolean {
  return semver.satisfies(
    ts.version,
    `>= ${version}.0 || >= ${version}.1-rc || >= ${version}.0-beta`,
    {
      includePrerelease: true,
    },
  );
}

Type Aliases

Versions

type Versions = typeof versions extends ArrayLike<infer U> ? U : never;

Generated by Syntax Scribe