Skip to content

prmichaelsen/tempalte

Repository files navigation

CI

Tempalte [sic]

Create type safe re-usable template strings.

  const salute = tempalte<{
    salutation: string,
    entity: string,
  }>()(
    "${salutation} ${entity}!"
  ),

  expect(salute({
    salutation: 'Hello',
    entity: 'Word',
  }).toBe('Hello World!');