Use Typescript version instead of servicesVersion for version gating
TS has said that the `servicesVersion` is not actually reliable and that we should use `typescript.version` instead
This commit is contained in:
Родитель
f270baf36e
Коммит
bc764d9147
|
@ -37,7 +37,6 @@ export = function init({ typescript }: { typescript: typeof ts_module }) {
|
|||
};
|
||||
|
||||
function isValidTypeScriptVersion(typescript: typeof ts_module): boolean {
|
||||
const servicesVersion = typescript.servicesVersion;
|
||||
const [major, minor] = servicesVersion.split('.');
|
||||
return (+major === 0 && +minor >= 8);
|
||||
const [major] = typescript.version.split('.');
|
||||
return +major >= 3;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче