Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Apr 24, 2019
1 parent 10c5810 commit 9b25475
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,27 @@ Completion:

- Collects information from `<script>` region by traversing its AST
- Offer `props`, `data` and `methods` in interpolation regions
- Offer `:prop` completion on child components
- Offer `:prop` completion on child components

## Type Checking with JSDocs

You don't have to use `lang="ts"` for typing functions. This would show error that `'foo'` is not assignable to `number`

```vue
<template>
<div>{{ numOnly('foo') }}</div>
</template>
<script>
export default {
methods: {
/**
* @param {number} num
*/
numOnly(num) {
}
}
}
</script>
```

0 comments on commit 9b25475

Please sign in to comment.