the only way to completely hide certain files is ignoring them - this can be done by adding corresponding file patterns to 'Ignore files and folders' in Settings | Editor | File types. These files will be excluded from project and indexing and hidden in the Project tool window.
But note that when .ts files are compiled using built-in Typescript compiler service or file watchers, the generated .js and .js/map files are visually nested inside original .ts files and thus are hidden unless the .ts node is expanded:
On a project level, you can only exclude certain folders, but not individual files. You can set up the compiler to save .js and .map files to a separate folder, and then exclude this folder from project using Mark directory as/Excluded
the only way to completely hide certain files is ignoring them - this can be done by adding corresponding file patterns to 'Ignore files and folders' in Settings | Editor | File types. These files will be excluded from project and indexing and hidden in the Project tool window.
But note that when .ts files are compiled using built-in Typescript compiler service or file watchers, the generated .js and .js/map files are visually nested inside original .ts files and thus are hidden unless the .ts node is expanded:
This works, but this setting effects all projects which is not preferred. Is it possible to do this setting for a particular project only?
No, this option is IDE-wide.
On a project level, you can only exclude certain folders, but not individual files. You can set up the compiler to save .js and .map files to a separate folder, and then exclude this folder from project using Mark directory as/Excluded
@Elena That sound perfect. Where can I set up the compiler to save .js and .map files to a separate folder?
When using the built-in TypeScript compiler, you can specify the output directory in your tsconfig.json:
if you are not using tsconfig, you can pass the
--outDir
option to compiler (https://www.typescriptlang.org/docs/handbook/compiler-options.html)