I want to match all none-ts files, and all files inside templates folder including ts files
and totally exclude node_modules
please don't suggest extended patterns
i.e: {!(node_modules/), !(*.ts), templates/}
because it will run the glob multiple times, causing to include node_modules in the other extended patterns
also !(node_modules/) not works
and !(node_modules)/ cannot be used with files, i.e: !(node_modules | .ts)/*
examples:
node_modules/some-module/file.js (not matches: inside node_modules)
dir/subdir/file.ts (not matches: .ts)
dir/subdir/files/file.ts (matches: .ts file, but inside files/ dir)