Merge branch 'pr-982'

This commit is contained in:
Rico Sta. Cruz 2019-03-24 07:34:55 +08:00
commit 61dd655951
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 17 additions and 1 deletions

View File

@ -2,7 +2,7 @@
title: Jsdoc
category: JavaScript
layout: 2017/sheet
updated: 2017-10-29
updated: 2019-01-10
weight: -1
---
@ -79,6 +79,22 @@ function play (song) {
See: <http://usejsdoc.org/tags-typedef.html>
### Importing types
```js
/**
* @typedef {import('./Foo').default} Bar
*/
/**
* @param {Bar} x
*/
function test(x) { }
```
This syntax is [TypeScript-specific](https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-in-JavaScript#import-types).
### Other keywords
```js