Y
Hacker News
new
|
ask
|
show
|
jobs
by
chrisweekly
390 days ago
Pls forgive my ignorance, but how is Typescript (a superset of Javascript) used to type-check Python?
4 comments
thraxil
390 days 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.
link
ItsHarper
390 days ago
They're saying pyright is a Python type checker, but it's written in Typescript, not Rust.
link
Yoric
390 days 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.
link
dist-epoch
390 days ago
just like the Python compiler/interpreter is written in C.
link