⬅️ Back to Table of Contents
📄 version-check.ts
📊 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", "5.1", "5.2", "5.3", "5.4"] |
const |
`[ |
|
'4.7', |
|
|
|
|
'4.8', |
|
|
|
|
'4.9', |
|
|
|
|
'5.0', |
|
|
|
|
'5.1', |
|
|
|
|
'5.2', |
|
|
|
|
'5.3', |
|
|
|
|
'5.4', |
|
|
|
|
] as const` |
✗ |
|
|
|
typescriptVersionIsAtLeast |
Record<"4.7" | "4.8" | "4.9" | "5.0" | "5.1" | "5.2" | "5.3" | "5.4", boolean> |
const |
{} as Record<Versions, boolean> |
✓ |
Functions
semverCheck(version: string): boolean
Code
function semverCheck(version: string): boolean {
return semver.satisfies(
ts.version,
`>= ${version}.0 || >= ${version}.1-rc || >= ${version}.0-beta`,
{
includePrerelease: true,
},
);
}
- Parameters:
version: string
- Return Type:
boolean
- Calls:
semver.satisfies
Type Aliases
Versions
type Versions = typeof versions extends ArrayLike<infer U> ? U : never;