rasendubi / uniorg

An accurate Org-mode parser for JavaScript/TypeScript
https://oleksii.shmalko.com/uniorg
GNU General Public License v3.0
256 stars 24 forks source link

Type error with `rehype-stringify` #102

Closed Eliot00 closed 5 months ago

Eliot00 commented 5 months ago

dependencies

{
  "dependencies": {
    "rehype-stringify": "^10.0.0",
    "unified": "^11.0.4",
    "uniorg-parse": "^2.1.1",
    "uniorg-rehype": "^1.1.1"
  }
}

error

src/index.ts:6:60 - error TS2349: This expression is not callable.
  Each member of the union type '{ <Parameters_2 extends unknown[] = [], Input extends string | Node | undefined = 
undefined, Output = Input>(preset?: Preset | null | undefined): Processor<undefined, undefined, undefined, undefine
d, undefined>; <Parameters_2 extends unknown[] = [], Input extends string | ... 1 more ... | undefined = undefined,
 Outp...' has signatures, but none of those signatures are compatible with each other.

6 const processor = unified().use(uniorg).use(uniorg2rehype).use(html)
rasendubi commented 5 months ago

Does it type check without rehype-stringify?

Eliot00 commented 5 months ago

Type checking can pass without rehype-stringify or uniorg-rehype

Eliot00 commented 5 months ago

After adding uniorg to devDependencies, the error disappeared.