I was taking a look to the Angular code and I've just found something that I can't find documented anywhere.
const typingsFile = p `testing/testing.d.ts`;
It seems like a p function is invoked without using the parentheses??
This is the p function code:
/**
* Utility functions that allows me to create fs paths
* p`${foo}/some/${{bar}}/path` rather than path.join(foo, 'some',
*/
function p(templateStringArray: TemplateStringsArray) {
const segments = [];
for (const entry of templateStringArray) {
segments.push(...entry.split('/').filter(s => s !== ''));
}
return '';
}
The full code can be found @ the angular repo - angular-master\packages\bazel\test\ng_package\core_package.spec.ts