-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to make use of & debug the example type checking? #59
Comments
The error you're receiving is due to the fact that As a workaround, you could add the following two files to the
{
"name": "examples"
}
{
"compilerOptions": {
"module": "CommonJS"
// your other options
}
} |
The manifest in :/docs/ is because docs-ts doesn't yet support ESM: gcanti/docs-ts#59 (comment)
@gcanti That doesn't appear to work for me with ESM imports: // https://www.typescriptlang.org/docs/handbook/esm-node.html
import x from './y.js'
// https://nodejs.org/api/packages.html#subpath-imports
import x from '#self/y'
Repro (slightly different files in Edit: Built a workaround script: samhh/fp-ts-std@4d679d6#diff-11acf79cfa31caef7478b768e28dffb6d7272c308c98f666c529f68bc9685871 |
Do you want to request a feature or report a bug?
feature
What is the current behavior?
I have a library I am trying to document using docs-ts, because it is a library of io-ts codecs. I have written examples for each of the core codecs and suddenly encounter an issue where
npx docs-ts
fails like that:It seems like docs-ts is doing some awesome footwork to prove that my examples actually compile or type check anyway. However I haven't found docs or other issues that reference this behavior. Could we get an explainer on this, or info in the docs? I need to write examples, auto checking is optional feature for me so I would also be happy turning it off if there is need.
Thanks very much!
Which versions of docs-ts, and which browser and OS are affected by this issue? Did this work in previous versions of docs-ts?
NodeJS 18.14.0, macos 13.3, docs-ts 0.7.2
The text was updated successfully, but these errors were encountered: