pub fn is_module(program: &Program<'_>) -> boolExpand description
Detect whether a file is a TypeScript “script” or “module”.
A file is a module if any top-level statement is an import or export.
Script files have all top-level declarations in global scope.
Module files have declarations local to the file — only declare global {}
blocks affect the global scope.