Dictionary type errors #96
-
Just wanted to check I'm not missing something obvious - first time using retext ecosystem. I'm trying to use retext-spell, but despite importing a dictionary as described in the readme retext-spell is throwing an error - looking through retext-spell's code, it's expecting typeof dictionary to be a function, but the dictionary modules at https://github.com/wooorm/dictionaries seem to export objects. My code is exactly as per the retext-spell readme, except that I am using unified (have also tried with retext which gives the same issue). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Welcome @The1029! 👋 Could you share the code you are trying to run, the error message you are seeing, and what runtime (Node, Deno, Chrome, etc) you are using? |
Beta Was this translation helpful? Give feedback.
Thanks @The1029!
A couple issues
TypeScript highlighted this, but JS fails as you described.
unified().process()
is a promise and needs to be awaited.To use the versions of
dictionary-en-gb
andretext-spell
from you package json, use the following snippet.