Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
chrisweekly
· 1y ago · 0 comments
Pls forgive my ignorance, but how is Typescript (a superset of Javascript) used to type-check Python?
Comments
[–]
thraxil
1y ago
You can write a parser and type checker for pretty much any language
in
pretty much any language. It's just text files as input and text as output.
[–]
ItsHarper
1y ago
They're saying pyright is a Python type checker, but it's written in Typescript, not Rust.
[–]
Yoric
1y ago
There's nothing magical to type-checking Python. You can write this in any programming language. TypeScript is actually a pretty nice language for writing static analysis tools.
[–]
dist-epoch
1y ago
just like the Python compiler/interpreter is written in C.