diff --git a/jsdoc.md b/jsdoc.md index 9fed13b50..027076aa7 100644 --- a/jsdoc.md +++ b/jsdoc.md @@ -79,18 +79,22 @@ function play (song) { See: -### 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