-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
Fixed code typo in Modules.md
Keyword | Description | ||
---|--- | ||
any | [Describes a type unknown at design time](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) | ||
boolean | [Boolean](http://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) |
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.
use lower case type names, so as not to mix them with boxed types, Number, String, etc..
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.
also add never
.
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.
Fixed lowercase and never
thanks @zspitz. since this is intended to be an index of sorts, i would recommend merging them all in one table. left column has one key word, all sorted alphabetically of course. the right column can have multiple links based on the context. for the JS keywords, i would also add links to MDN documentation or ES6 spec. |
@mhegazy I'm thinking that an alphabetical arrangement might be important on paper, but within the browser there's not much benefit -- it's always possible to do CTRL+F to find a specific keyword on the page. However, isn't there added value in the grouping - type annotations, type modifiers, member modifiers etc.? |
Well.. then what is the value of this page in general. you can always search this repo for keywords and that should get you close. like |
I think many people would be coming from the Handbook link on the Typescript website, and not through the repo, thus repo search can't be counted on. Unless the plan is to eventually have that link refer to the repo (similar to the spec), and not to http://www.typescriptlang.org/docs?
True. But perhaps sometimes you want to look up the available usages (basic type, type modifier, property modifier etc.) and quickly find out from there which keywords can fill each role. (I'm thinking computed enums here, which can be looked up in both directions...). Admittedly, the hard part will be to figure out the different usage groups first. Perhaps both views are in order? |
|
||
Keyword | | ||
---| | ||
of| |
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.
for-of
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.
@DanielRosenwasser fixed
I'm getting started with TypeScript and I was linked to this repository from a few different places. I do not believe the readme is informative enough to newcomers. After some more research it seems that this handbook is meant to be read online, or from the Markdown files directly in this repository. If this is incorrect, I will gladly update the readme, or I would appreciate it if someone more knowledgeable could provide some insight thanks :)
Add instructions on how to read the handbook.
@mhegazy @DanielRosenwasser I think this is pretty much complete. Could you look over it and see if I've missed anything? Any other thoughts? |
| `as` | `export as namespace` _namespace_ | [Environment/modules](#environment-modules) | [UMD/isomorphic modules](Modules.md#umd-modules) | | | ||
| `async` | | [Functions](#functions) | Marks function as asynchronous | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | ||
| `await` | | [Functions](#functions) | Waits for value within an asynchronous function | [ES draft](http://tc39.github.io/ecmascript-asyncawait/), [PR#1664](https://github.com/Microsoft/TypeScript/issues/1664), [spec](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#68-asynchronous-functions) | | ||
| `boolean` | | [Predefined type](#predefined-types) | [`boolean` type](Basic%20Types.md#boolean) | | |
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.
use "Primitive Type"
instead of "Predefined type"
. this is how the TypeScript spec refers to them anyways.
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 also applies to the rest of the document.
sorry for the delay, have been out on vacation for a while. a few comments:
|
@mhegazy Fixed 'primitive type' to 'predefined type', and headings. |
Status on this? =) |
Thank you for contributing to the TypeScript Handbook! We are currently working through a large backlog of open PRs. As part of this, we're asking authors of PRs with active merge conflicts to assess if their changes are still needed, and if so, open a new PR. For transparency, we are also working on a full-scale reimagining of the Handbook (see the TypeScript Roadmap), meaning we are largely closing down work on the current version of the Handbook. Typo fixes are always appreciated, but any new content should likely wait until the new Handbook is available so that it can be more naturally adapted to that format. Saved reply above; this technically doesn't have merge conflicts but has a ton of unrelated changes in one PR and I'm not comfortable merging it. |
Fixes #341
cc @mhegazy