Skip to content

Commit 49b83b8

Browse files
committed
docs(loader): fix jsdoc annotations
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 560b8d5 commit 49b83b8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

loader.mjs

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
*/
66

77
import * as mlly from '@flex-development/mlly'
8-
import pathe from '@flex-development/pathe'
8+
import * as pathe from '@flex-development/pathe'
9+
import * as tutils from '@flex-development/tutils'
910
import * as esbuild from 'esbuild'
1011
import { fileURLToPath, pathToFileURL } from 'node:url'
1112
import tsconfig from './tsconfig.json' assert { type: 'json' }
@@ -17,7 +18,8 @@ mlly.EXTENSION_FORMAT_MAP.set('', mlly.Format.COMMONJS)
1718
/**
1819
* URL of current working directory.
1920
*
20-
* @const {URL} cwd
21+
* @type {import('node:url').URL}
22+
* @const cwd
2123
*/
2224
const cwd = pathToFileURL(tsconfig.compilerOptions.baseUrl)
2325

@@ -43,14 +45,16 @@ export const load = async (url, context) => {
4345
/**
4446
* File extension of {@linkcode url}.
4547
*
46-
* @const {ReturnType<typeof pathe['extname']>} ext
48+
* @type {pathe.Ext | tutils.EmptyString}
49+
* @const ext
4750
*/
4851
const ext = pathe.extname(url)
4952

5053
/**
5154
* Source code.
5255
*
53-
* @var {Uint8Array | string | undefined} source
56+
* @type {Uint8Array | string | undefined}
57+
* @var source
5458
*/
5559
let source = await mlly.getSource(url, { format: context.format })
5660

@@ -119,7 +123,8 @@ export const resolve = async (specifier, context) => {
119123
/**
120124
* Resolved module URL.
121125
*
122-
* @const {URL} url
126+
* @type {import('node:url').URL}
127+
* @const url
123128
*/
124129
const url = await mlly.resolveModule(specifier, { conditions, parent })
125130

0 commit comments

Comments
 (0)