Elektrine lite

← Feed

@ashur@front-end.social

Post #1940668

2026-02-04 22:51 UTC

The not-so-new-anymore `@import` #JSDoc tag support that landed in TypeScript 5.5 makes it much, much nicer to import type definitions ✨ ``` /** @import {Page, Post} from "../types.js" */ /** * Build permalinks for pages and posts * @param {Page | Post} entry * @return {string} */ ``` Great for keeping JSDoc blocks tidy, and especially nice when the same type is used multiple times throughout a single script. https://multiline.co/mment/2024/02/importing-jsdoc-type-definitions/#typescript-5.5-or-newer

Replies (0)

No replies.