Skip to content

Commit

Permalink
type: fix type error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 2, 2022
1 parent 64abbf6 commit c88c2f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { marked } from 'marked';

export default new Transformer({
async loadConfig({ config }) {
// @ts-ignore
const conf = await config.getConfig([
const conf = await config.getConfig<{ marked: marked.MarkedOptions; html: boolean; }>([
path.resolve('.markedrc'),
path.resolve('.markedrc.js'),
path.resolve('marked.config.js'),
]);
], {});
if (conf) {
let isJavascript = path.extname(conf.filePath) === '.js';
if (isJavascript) {
Expand All @@ -27,7 +26,7 @@ export default new Transformer({
xhtml: false,
},
html: false,
...conf.contents as any,
...conf.contents,
};
}
},
Expand Down

0 comments on commit c88c2f4

Please sign in to comment.