How to list all registered template names

Cant find where templates are registered, such as:

<template name="temp1"...></template>
<template name="temp2"...></template>
<template name="temp3"...></template>

I would like to receive array of: [“temp1”, “temp2”, “temp3”].
Any tips will be helpful.

Given that template names are registered into the Template namespace, something like:

let names = [];
for (name of Object.keys(Template)) {
  if (Template[name] instanceof Template) names.push(name);
}