Skip to content

Commit

Permalink
Fix TSC generating broken .d.ts files
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 20, 2023
1 parent d61fa74 commit fc8207e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
* @property {VFileReporter | string | undefined} [reporter]
* Reporter to use (default: `'vfile-reporter'`); if a `string` is passed,
* it’s loaded from `cwd`, and `'vfile-reporter-'` can be omitted
* @property {VFileReporterKnownFields & {[key: string]: unknown} | undefined} [reporterOptions]
* @property {VFileReporterOptions | undefined} [reporterOptions]
* Config to pass to the used reporter (optional).
* @property {UnifiedSettings | undefined} [settings]
* Configuration for the parser and compiler of the processor (optional).
Expand Down Expand Up @@ -190,10 +190,15 @@
* for unknown fields in options and async support.
* @param {Array<VFile>} files
* Files.
* @param {VFileReporterKnownFields & {[key: string]: unknown}} options
* @param {VFileReporterOptions} options
* Configuration.
* @returns {Promise<string> | string}
* Report.
*
* @typedef {{[Key in keyof VFileReporterKnownFields]: VFileReporterKnownFields[Key]} & Record<string, unknown>} VFileReporterOptions
* Configuration.
*
* Note: this weird type fixes TSC:
*/

import process from 'node:process'
Expand Down

0 comments on commit fc8207e

Please sign in to comment.