Error --------------------------------------------------------------------------------------------------- encaps.js:3:16 Cannot get `a.x` because property `x` is missing in `A` [1]. [prop-missing] encaps.js:3:16 3| var s1 = `l${a.x}r`; // error: no prop x in A ^ References: encaps.js:2:9 2| var a = new A(); ^^^^^^^ [1] Error --------------------------------------------------------------------------------------------------- encaps.js:6:20 Cannot assign `strings[0]` to `x` because `string` [1] is incompatible with `number` [2]. [incompatible-type] encaps.js:6:20 6| var x:number = strings[0]; // error: string ~> number ^^^^^^^^^^ References: encaps.js:5:37 5| function tag(strings: ReadonlyArray, ...values: Array) { ^^^^^^ [1] encaps.js:6:11 6| var x:number = strings[0]; // error: string ~> number ^^^^^^ [2] Error --------------------------------------------------------------------------------------------------- encaps.js:16:1 Cannot cast `s3.foo` to `number` because `string` [1] is incompatible with `number` [2]. [incompatible-type] encaps.js:16:1 16| s3.foo as number; // error: string ~> number ^^^^^^ References: encaps.js:12:17 12| return { foo: "" }; // ok: tagged templates can return whatever ^^ [1] encaps.js:16:11 16| s3.foo as number; // error: string ~> number ^^^^^^ [2] Found 3 errors