jsdoc: Note that importing is TypeScript-specific

This commit is contained in:
Rico Sta. Cruz 2019-03-24 07:34:48 +08:00
parent fa9f16c5ee
commit 94db676cfe
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 7 additions and 3 deletions

View File

@ -79,18 +79,22 @@ function play (song) {
See: <http://usejsdoc.org/tags-typedef.html> See: <http://usejsdoc.org/tags-typedef.html>
### Importing Types ### Importing types
```js ```js
/** /**
* @typedef {import('Foo').default} Bar * @typedef {import('./Foo').default} Bar
*/ */
/** /**
* @param {Bar} x * @param {Bar} x
*/ */
function test(x) { } function test(x) { }
``` ```
This syntax is [TypeScript-specific](https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-in-JavaScript#import-types).
### Other keywords ### Other keywords
```js ```js