function isTypeScript(node) {
    const lang = getLangAttribute(node) || '';
    return ['typescript', 'ts'].includes(lang);
}
Checks whether the node contains a `lang` or `type` attribute which indicates that
the script contents are written in TypeScript. Note that the absence of the tag
does not mean it's not TypeScript, because the user could have set the default
to TypeScript in his settings.