jsdoc: Note that importing is TypeScript-specific
This commit is contained in:
parent
fa9f16c5ee
commit
94db676cfe
10
jsdoc.md
10
jsdoc.md
|
@ -79,18 +79,22 @@ function play (song) {
|
|||
|
||||
See: <http://usejsdoc.org/tags-typedef.html>
|
||||
|
||||
### Importing Types
|
||||
### Importing types
|
||||
|
||||
```js
|
||||
/**
|
||||
* @typedef {import('Foo').default} Bar
|
||||
* @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
|
||||
|
|
Loading…
Reference in New Issue