and have expressed interest in continuing to develop with it 12 https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages
x instanceof HogeClass - Literal typeʹ͓͚Δಉ֬ೝʢ if (x === “some message”) ʣ - obj.x obj[“x”] x in objͳͲͷଘࡏ֬ೝ - User Defined Type Guard function: function fn(x: any): x is { msg: string } { return !!x.msg && typeof x.msg === "string"; } 67
Typeʢநͳܕʣͷํ ʹݶఆ͞ΕΔ͔ΒͰ͢ type SomeString = "some string"; const x: SomeString = "some string"; const y: string = x; const z: SomeString = y; Super type Sub type type SomeString string
Super type Sub type type SomeString string type SomeString = "some string"; const x: SomeString = "some string"; const y: string = x; const z = y as SomeString;