-- Views
September 21, 25
スライド概要
#fec_tokyo 2025/09/21
- Type = #fec_tokyo 2025/09/21 ?
JS + Type
Google Closure Compiler
??
main.c compile a.out exec > "hello world" main.java compile main.class exec > "hello world" VM main.ts compile main.js exec > "hello world" VM
Type
Type ● syntax ● check/infer
main.ts compile main.js exec > "hello world" VM TypeCheck TypeStrip
compile 🤔
compile 🤔
de-sugar compile minify 🤔
de-sugar compile 🤔 y nif mi
Enums Namespaces Decorators ... 🤔 Extending Type Language... ● syntax ● check/infer
Enums Namespaces Decorators ... Type Not Recommended ?? ● syntax ● check/infer 🤔
Enums Namespaces Decorators ... Type ● syntax ● check/infer 🤔
main.ts compile main.js exec > "hello world" VM TypeCheck TypeStrip
TSC TypeCheck isTypeCheck too Slow main.ts compile main.js exec > "hello world" VM TypeStrip
Chance To 🤩 Re-Implement !! Not 😱 Documented ...
TypeScript Parsers TS/JS Rust Go 🤔 Zig Why so many Parsers ... ?
Performance Battle
TypeStrip = Type Check-Less Compile tsc swc
TSC (Language Server) P LS main.ts TypeCheck compile main.js exec > "hello world" VM TypeStrip
TSC (Language Server) P LS main.ts TypeCheck 🤔 run TypeStrip Run on v8 is Deno a TypeScript runtine ?
TSC (Language Server) TypeStrip TypeCheck Run on v8 P LS run TypeStrip main.ts run Run on v8 🤔 is Node a TypeScript runtine ?
😳
Don't we consider Type only as an annotation? 🤔
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}; } }
Standardise TypeScript in ECMA
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"
TSC (Language Server) TypeStrip Run on v8 TypeCheck P LS run TypeStrip Run on v8 main.ts run TypeStrip Run on v8 run 🤔 Then is Browser a TypeScript runtine ?
main.c compile a.out exec > "hello world" main.java compile main.class exec > "hello world" VM main.ts TypeStrip 🤔 main.js exec > "hello world" VM Language... ?
🤔 Type as External Annotation ?
Type ● check/infer ● syntax ● lint/fmt ● tree shake ● bundle ● minify ● JSX ● Testing ● ... Enums Namespaces Decorators ...
TSC (Language Server) P LS TypeCheck TS CodeBases build bundle.js exec > "hello world" VM ● TypeStrip ● Treshake ● Bundle ● Minify
Type ● check/infer ● syntax ● lint/fmt ● tree shake ● bundle ● minify ● JSX ● Testing ● ... 💥The Wild West💥of frontend toolchains !! 🤩🤩🤩
TSC (Language Server) P LS TypeCheck TS CodeBases build bundle.js exec > "hello world" VM ● TypeStrip ● Treshake ● Bundle ● Minify
TypeScript Parsers TS/JS Rust Go Zig 😳‼
TypeScript Parsers TS/JS Rust Go Zig Great Migration ? ��
● AI 出すと互換性の問題があるからあまりやりたくない。 ● IPC なら中⾝は隠せるからあり。 ● そもそも Go 実装ツールためではなく、 JS のためにやってる。 ● どうしてもやりたいなら fork して好きにイジるのがいい。 ● バージョン管理での合意が取れるならまだ、、でも難しくない?
TypeScript Parsers TS/JS Rust Go 🤔 Zig Fast parser is still required...
TSC (Language Server) P LS TypeCheck TS CodeBases build bundle.js exec > "hello world" VM ● TypeStrip ● Treshake ● Bundle ● Minify
Type Aware Linting TS CodeBases Type Aware Parse 🤔 Who covers here ? Lint TS CodeBases
Type Aware Linting TS CodeBases Type Aware Parse Lint 🤩 TS CodeBases
TSC (Language Server) P LS TypeCheck TS CodeBases build bundle.js exec > "hello world" Li nt VM TypeCheck ● TypeStrip ● Treshake Type Aware Linting ● Bundle ● Minify
TSC Development (Language Server) Experience P LS TypeCheck TS CodeBases bundle.js build exec > "hello world" Li nt VM TypeCheck ● TypeStrip ● Treshake Type Aware Linting Deployment Experience ● Bundle ● Minify
TypeCheck 🤔
Type ● check/infer ● syntax ● lint/fmt ● tree shake ● bundle ● minify ● JSX ● Testing ● ... Enums Namespaces Decorators ...
+ Type =
- Type =
+ Type as Annotation =
+ ● TypeCheck ● Lint+Fmt ● Testing = Better DX
Enums Namespaces Decorators ... Despite not being a programming language, Type tried to act like one? ● syntax ● check/infer 🤔
Do we really expect TypeScript to be a programming language? 🤔
We really expect TypeScript to be a Ultra Fast Type Checker !! 🤩