type Heads<S> = S extends `${infer C}${infer R}` ? [C, R] : never;
type A = Heads<"😀abc">;
declare let a: A;
const chk: ["😀", "abc"] = a;
main.ts(4,7): error TS2322: Type '["�", "�abc"]' is not assignable to type '["😀", "abc"]'.
Type at position 0 in source is not compatible with type at position 0 in target.
Type '"�"' is not assignable to type '"😀"'.
No error.
Steps to reproduce
main.ts:Behavior with
typescript@6.0Behavior with
tsgoNo error.