You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I run the code, I get a errors for importing a -- first it requires a relative URL (so, I make it ./a but then I get an error saying it's looking for a.js).
Is there a clean solution in Chapter 9 for using TypeScript modules? It hardly feels realistic if all of the project is in main.ts.
In the mean time, rather than using a bundler, I'll follow the advice of specifying .js at the end of the import's specification microsoft/TypeScript#27287 (comment)
The text was updated successfully, but these errors were encountered:
In the example in Chapter 9, a third-party JavaScript module is imported (reused) in the TypeScript.
What about when you want to make your own separate modules in TypeScript?
I tried to extend the Chapter 9 code with a
src/browser/a.ts
class that is simplyVS Code wants to import A using classic TypeScript syntax (just after the blockchain elements are imported):
But when I run the code, I get a errors for importing
a
-- first it requires a relative URL (so, I make it./a
but then I get an error saying it's looking fora.js
).Is there a clean solution in Chapter 9 for using TypeScript modules? It hardly feels realistic if all of the project is in
main.ts
.In the mean time, rather than using a bundler, I'll follow the advice of specifying
.js
at the end of the import's specification microsoft/TypeScript#27287 (comment)The text was updated successfully, but these errors were encountered: