metz-sh / simulacrum

Code-playground to visualise complex engineering flows.
https://metz.sh
Apache License 2.0
361 stars 16 forks source link

Handle Imports #37

Open naomi-lgbt opened 2 hours ago

naomi-lgbt commented 2 hours ago

I rarely, if ever, have a code file without any import statements. It would be nice if I could paste a file into the visualiser and it would "mock" the imports, so I could see the building blocks instead of a bunch of TS errors:

image

iostreamer-X commented 2 hours ago

Fair point @naomi-lgbt. The lack of import actually stems from the fact that the compiler doesn't support "general" idiomatic TypeScript. There's quite an overlap, but there are a few things which the compiler needs in order to function.

That being said, the ability mock(in essence be flexible) rather than throw errors seems a great idea. Right now it gives a brittle feeling.

Thank you for bringing this up! Lemme start looking into this.