Skip to content

[Doc EN]: Line return fix in typescript.md #1251

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

Merged
merged 7 commits into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/v2/guide/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ var vm = new Vue({

## Annotating Return Types

Because of the circular nature of Vue's declaration files, TypeScript may have difficulties inferring the types of certain methods.
For this reason, you may need to annotate the return type on methods like `render` and those in `computed`.
Because of the circular nature of Vue's declaration files, TypeScript may have difficulties inferring the types of certain methods. For this reason, you may need to annotate the return type on methods like `render` and those in `computed`.

```ts
import Vue, { VNode } from 'vue'
Expand Down Expand Up @@ -175,5 +174,4 @@ const Component = Vue.extend({
})
```

If you find type inference or member completion isn't working, annotating certain methods may help address these problems.
Using the `--noImplicitAny` option will help find many of these unannotated methods.
If you find type inference or member completion isn't working, annotating certain methods may help address these problems. Using the `--noImplicitAny` option will help find many of these unannotated methods.
18 changes: 9 additions & 9 deletions src/v2/style-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1377,34 +1377,34 @@ This is the default order we recommend for component options. They're split into
2. **List Rendering** (creates multiple variations of the same element)
- `v-for`

2. **Conditionals** (whether the element is rendered/shown)
3. **Conditionals** (whether the element is rendered/shown)
- `v-if`
- `v-else-if`
- `v-else`
- `v-show`
- `v-cloak`

3. **Render Modifiers** (changes the way the element renders)
4. **Render Modifiers** (changes the way the element renders)
- `v-pre`
- `v-once`

4. **Global Awareness** (requires knowledge beyond the component)
5. **Global Awareness** (requires knowledge beyond the component)
- `id`

5. **Unique Attributes** (attributes that require unique values)
6. **Unique Attributes** (attributes that require unique values)
- `ref`
- `key`
- `slot`

6. **Two-Way Binding** (combining binding and events)
7. **Two-Way Binding** (combining binding and events)
- `v-model`

7. **Other Attributes** (all unspecified bound & unbound attributes)
8. **Other Attributes** (all unspecified bound & unbound attributes)

8. **Events** (component event listeners)
9. **Events** (component event listeners)
- `v-on`

9. **Content** (overrides the content of the element)
10. **Content** (overrides the content of the element)
- `v-html`
- `v-text`

Expand Down Expand Up @@ -1476,7 +1476,7 @@ computed: {

### Single-file component top-level element order <sup data-p="c">recommended</sup>

**[Single-file components](../guide/single-file-components.html) should always order `template`, `script`, and `style` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**
**[Single-file components](../guide/single-file-components.html) should always order `<template>`, `<script>`, and `<style>` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**

{% raw %}<div class="style-example example-bad">{% endraw %}
#### Bad
Expand Down