|
|
|
|
|
by 8chanAnon
801 days ago
|
|
A simple search on "javascript import export" will yield much information on this topic. You can only import what has been explicitly exported. I don't know of any projects that are handled this way. Normally, you would just use the script tag in html. As for Node, I have only used "require" to import the standard modules but an npm package should import the same way. >seem to leave out all instructions for how to actually get the files there, as if it's obvious. I see this all the time and it's frustrating. I can't even begin to count the number of hours lost hunting down little snippets of information simply because some people think it's too "obvious" to mention. This is usually because people are pretenders. They don't actually know what they are doing because they are simply repeating what they saw on the Internet somewhere. You just have to laugh (to keep your sanity). My favourite example is people explaining how to make an SSL certificate. It's so simple, you just type this OpenSSL command. How do you get this "OpenSSL" they speak of? I've tried using OpenSSL and it's a bitch. It's bad enough that I've rolled my own code to make certs just so I don't have to use OpenSSL because I can't remember how I managed to use it the last time. Just have to laugh. >And finally, if you answer this, can you spare a word about typescript? Brother, you are asking a lot of questions that I can't answer but hopefully someone else will. I have to ask: why do want to use typescript? Did somebody tell you that it's better than javascript? For what, exactly? P.S. Looking forward to further discussion on this. |
|