Currently, we are utilizing the public API to analyze TypeScript files in this manner:
ts.createSourceFile(
file.name,
file.textContent,
languageVersion,
/*setParentNodes*/ true);
Something that has caught our attention is the significance of the languageVersion
. Why is it essential for the parsing process to be aware of the target languageVersion
(es3/es5/es2015/esnext) being used?
Your input on this matter would be greatly valued. Thank you.