487 Views
June 06, 25
スライド概要
TSKaigi 2025 事後勉強会
https://smarthr.connpass.com/event/355359/
Brand New World w/ Annotated Types #tskaigi2025_kataritai 2025/06/06
Type as Annotation
tsc o -g ts
type stripping via amaro(swc)
Type as Annotation
Stage: 1
class Person { name: string; constructor(name: string) { this.name = name; } TypeScript getGreeting(): string { return Hello, ${this.name}; } }
Types as Annotation class Person { name /*: string*/; constructor(name /*: string*/) { this.name = name; } getGreeting()/*: string*/ { return Hello ${this.name}; } }
🤔 ?? How ?? 🤔
Standardise TypeScript in ECMA
Comments not wrapped with /* */
const name: string = "Jxck" Treat as Comment
const name: ここはどうせコメント なので何を書いても 怒られない??🤔 = "Jxck"
Brand new World !! 🤩🤩🤩
SQL as Comments const user: logging(warn) = "Jxck"
Cooments as Comments const regist: (FIXME) regist って 日本語は無いって 何度言ったら、、 = true
Decorator as comments const user: select id, name from Users where user id = "Jxck"
Brain f**k as comments const user: ++++++++[>++++++++++++++<-]>+++.< >+.< >--.< >---------.< >+++++.< >-------.< = "Jxck"
Type as Annotation 🤔 Your World as Comments Your Preprocessor
🤔 ?? Possible ?? 🤔
Last discussion: 2023/09 tl;dr; Work In Very Early Progress
🤔