mirror of
https://github.com/toddbluhm/env-cmd.git
synced 2025-12-08 18:23:33 +00:00
9 lines
378 B
JavaScript
9 lines
378 B
JavaScript
export function checkIfTypescriptSupported() {
|
|
if (!process.features.typescript) {
|
|
const error = new Error('To load typescript files with env-cmd, you need to upgrade to node v23.6' +
|
|
' or later. See https://nodejs.org/en/learn/typescript/run-natively');
|
|
Object.assign(error, { code: 'ERR_UNKNOWN_FILE_EXTENSION' });
|
|
throw error;
|
|
}
|
|
}
|