diff --git a/jsdoc.md b/jsdoc.md index dae7a7a0c..027076aa7 100644 --- a/jsdoc.md +++ b/jsdoc.md @@ -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: +### 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