Skip to content

Commit

Permalink
fix: correctly merge compile output type
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb committed Jan 4, 2024
1 parent 3725a00 commit cf7fef7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workspace/marqua/src/fs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { marker } from '../artisan/index.js';
import { parse } from '../core/index.js';

/**
* @template {object} [Output = import('../types.js').Metadata & { content: string }]
* @template {object} Output
* @param {string} entry
* @returns {Output}
* @returns {Output & import('../types.js').Metadata & { content: string }}
*/
export function compile(entry) {
const { content, metadata } = parse(fs.readFileSync(entry, 'utf-8'));
const result = { ...metadata, content: marker.render(content) };
return /** @type {Output} */ (result);
return /** @type {any} */ (result);
}

/**
Expand Down

0 comments on commit cf7fef7

Please sign in to comment.