1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2024-11-09 23:22:41 +00:00

Interface extraction

This commit is contained in:
Gordey Doronin 2021-06-21 11:37:50 +02:00
parent c8c6442c74
commit e761a7024e

View file

@ -24,6 +24,10 @@ interface INodeVersionInfo {
fileName: string;
}
interface INodeRelease extends tc.IToolRelease {
lts?: string;
}
export async function getNode(
versionSpec: string,
stable: boolean,
@ -182,7 +186,7 @@ function isLts(versionSpec: string): boolean {
function findLtsVersionFromManifest(
versionSpec: string,
stable: boolean,
candidates: Array<tc.IToolRelease & { lts?: string }>
candidates: INodeRelease[]
): string {
const alias = versionSpec.split('lts/')[1]?.toLowerCase();