jsdoc: Note that importing is TypeScript-specific
This commit is contained in:
parent
fa9f16c5ee
commit
94db676cfe
8
jsdoc.md
8
jsdoc.md
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue