-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
docs(guides): typescript-guide rewrite #1446
Conversation
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.
Nice work @mtrivera, just left a few minor comments re formatting. Also, I was under the impression that we'd be somehow synchronizing this with the other guides (probably modifying the final example from Getting Started would work). This is what we've done for the others in #1258.
@TheDutchCoder and I could probably help with direction a bit -- this synchronization could also happen in another PR.
content/guides/typescript.md
Outdated
|
||
|
||
## Source Maps | ||
|
||
To learn more about Source Maps, see the [development guide](/guides/development.md) |
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.
Missing period at the end of this sentence.
@@ -136,3 +134,10 @@ declare module "*.svg" { | |||
``` | |||
|
|||
Here we declare a new module for SVGs by specifying any import that ends in `.svg` and defining the module's `content` as `any`. We could be more explicit about it being a url by defining the type as string. The same concept applies to other assets including CSS, SCSS, JSON and more. | |||
|
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.
We usually use two line breaks between h2
sections.
content/guides/typescript.md
Outdated
[`awesome-typescript-loader`](https://github.com/s-panferov/awesome-typescript-loader) | ||
|
||
Awesome TypeScript Loader has created a [wonderful explanation](https://github.com/s-panferov/awesome-typescript-loader#differences-between-ts-loader) of the difference between `awesome-typescript-loader` and `ts-loader`. The | ||
configuration for `awesome-typescript-loader` is more complex than `ts-loader`. |
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.
This should just be joined with the previous line. At some point we may enforce a max line length (webpack-contrib/webpack-defaults#73) or something to keep it consistent but for now each paragraph should just be on one line for consistency. Then you can turn on word-wrapping in your editor if it's a pain to read.
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 made the corrections |
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.
@mtrivera great thank you!
@mtrivera are you interested in synchronizing this with the other guides in a separate PR? |
Sure, but I would need some help with that.
|
Loader
Removed awesome-ts-loader and moved it to bottom of guide. I think it’s confusing to list two loaders if one is preferred for simplicity, focus on the one that is simple to use.
Source Maps
Some people might not know about source maps, so mention another guide that discusses it.
Using Third Party Libraries
The word third is easier to read than 3rd, and people might not be familiar with its definition. I replaced types github repo with TypeSearch. The search functionality on TypeSearch is easier than reading the documentation on the DefinitelyTyped repo.
Feedback welcome and appreciated!