xxxxxxxxxx
type SitemapPriority = `${'0.1'|'0.2'|'0.3'|'0.4'|'0.5'|'0.6'|'0.7'|'0.8'|'0.9'|'1.0'}`;
let priority: SitemapPriority = '0.1'; // valid
let priority: SitemapPriority = '0.10'; // invalid
xxxxxxxxxx
const regex_alphanumeric = /^[a-zA-Z\d]*$/;
console.log(regex_alphanumeric.test('a'));
console.log(regex_alphanumeric.test('1'));
console.log(regex_alphanumeric.test('!'));
xxxxxxxxxx
type MarkerTime =`${number| ''}${number}:${number}${number}`
let a: MarkerTime = "0-00" // error
let b: MarkerTime = "0:00" // ok
let c: MarkerTime = "09:00" // ok