Closed
Description
Bug Report
π Search Terms
Template string, Intersection type
π Version & Regression Information
4.5.4
β― Playground Link
Playground link with relevant code
π» Code
const a = 'a'
type A = typeof a
type Mix = A & {foo: string}
type Origin1 = `${A}` // type is 'a'
type Origin2 = `${Mix}` // type is string
π Actual behavior
Origin1
is 'a'
and Origin2
is string
π Expected behavior
Origin1
and Origin2
both are 'a'
Activity
XGHeaven commentedon Mar 2, 2022
And I found that I cannot use Mix in indexed object.
const
template literal #54648