-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding TypeScript to "Getting Started" #1891
Adding TypeScript to "Getting Started" #1891
Conversation
Looks like you were right about the commits. Thanks for sticking it out like this. Looks like there's failures with respect to the main branch changes now, but once those are taken care of, I can approve. |
Thanks for the information. It's been fixed 👍 |
@open-telemetry/javascript-approvers PTAL! |
thanks for figthing this true! TY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. See inline comments, and questions for @svrnm and other reviewers.
Really want to have this merged soon, @kaiwalyakoparkar can you give the reviews another look?:) |
Sure, I will commit the required changes soon |
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
@open-telemetry/javascript-approvers please give this another look :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM % some nits.
{{< ot-tabs TypeScript JavaScript >}} | ||
|
||
{{< ot-tab lang="html">}} | ||
<script type="module" src="document-load.ts"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think browsers are able to load typescript source codes directly. For both JavaScript and TypeScript projects, here the src attribute value should be document-load.js
(the output of tsc compilation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly parel (the build tool used in the example) will infer the type of the file from that and then do a proper compile and replacement. @kaiwalyakoparkar have you run through that example with TS and can verify, if not let's try this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @svrnm I did run these files and can confirm that the output I received is according to the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's quite confusing as parcel isn't mentioned until after the code samples. If you want to depend on bundler-specific behavior I would at least call it out at the top of the document that the samples will require some particular build process or dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dyladan fair point! That one is on me, I wrote that tutorial initially. Let's have this in a separate (follow-up) issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #1989 for this issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code samples look good to me. I share @legendecas reservation about the ts extension when it isn't clear that this is enabled by build tooling
{{< ot-tabs TypeScript JavaScript >}} | ||
|
||
{{< ot-tab lang="html">}} | ||
<script type="module" src="document-load.ts"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it's quite confusing as parcel isn't mentioned until after the code samples. If you want to depend on bundler-specific behavior I would at least call it out at the top of the document that the samples will require some particular build process or dependency.
I will go ahead and merge, then we can address #1989 orthogonally, since it is all that remains. Thanks all, and especially @kaiwalyakoparkar for your diligence and patience across several PRs! |
Ref #1800 and #1888
@svrnm @chalin @cartermp kindly take a look