mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
1.3 KiB
Plaintext
30 lines
1.3 KiB
Plaintext
//// [tests/cases/compiler/intrinsicStringMappingLoneSurrogate.ts] ////
|
|
|
|
=== intrinsicStringMappingLoneSurrogate.ts ===
|
|
// Intrinsic string mapping types should preserve lone surrogates, matching tsc.
|
|
// A lone surrogate has no case mapping, so it passes through unchanged.
|
|
type U = Uppercase<"\uD800">;
|
|
>U : Symbol(U, Decl(intrinsicStringMappingLoneSurrogate.ts, 0, 0))
|
|
>Uppercase : Symbol(Uppercase, Decl(lib.es5.d.ts, --, --))
|
|
|
|
type L = Lowercase<"A\uD800B">;
|
|
>L : Symbol(L, Decl(intrinsicStringMappingLoneSurrogate.ts, 2, 29))
|
|
>Lowercase : Symbol(Lowercase, Decl(lib.es5.d.ts, --, --))
|
|
|
|
type C = Capitalize<"\uDC00x">;
|
|
>C : Symbol(C, Decl(intrinsicStringMappingLoneSurrogate.ts, 3, 31))
|
|
>Capitalize : Symbol(Capitalize, Decl(lib.es5.d.ts, --, --))
|
|
|
|
type Un = Uncapitalize<"\uD834X">;
|
|
>Un : Symbol(Un, Decl(intrinsicStringMappingLoneSurrogate.ts, 4, 31))
|
|
>Uncapitalize : Symbol(Uncapitalize, Decl(lib.es5.d.ts, --, --))
|
|
|
|
const u: "\uD800" = "x" as unknown as U;
|
|
>u : Symbol(u, Decl(intrinsicStringMappingLoneSurrogate.ts, 7, 5))
|
|
>U : Symbol(U, Decl(intrinsicStringMappingLoneSurrogate.ts, 0, 0))
|
|
|
|
const l: "a\uD800b" = "x" as unknown as L;
|
|
>l : Symbol(l, Decl(intrinsicStringMappingLoneSurrogate.ts, 8, 5))
|
|
>L : Symbol(L, Decl(intrinsicStringMappingLoneSurrogate.ts, 2, 29))
|
|
|