Default exports required for deno doc? #515
Replies: 3 comments 7 replies
-
|
This sounds like the error message is a bit confusing. The // Can users import this type from your package?
import { IssueOrPRRequestData } from "@example/your-package";Or is the |
Beta Was this translation helpful? Give feedback.
-
|
I apologize @marvinhagemeister. I reopened the conversation because I ran into issues. I started the conversion process by following the docs and using the migration tool. I am running the Here is the feature branch that I have set up with some of the conversion stuff set up. Would you mind checking out the project/branch and see where I might be going wrong? It is with the IssueClient. |
Beta Was this translation helpful? Give feedback.
-
|
So, just to clarify about exports, I have a few questions I was hoping you could answer. Few questions:
"exports": {
"./client": "./GitHubClients/IssueClient.ts"
},
"exports": {
".": "./mod.ts",
"./packaging/": "./PackageClients/mod.ts",
"./github/": "./GitHubClients/mod.ts",
},
"exports": {
".": "./mod.ts",
"./github": "./GitHubClients",
},Also, do you know when that fix will make it out to deno? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was poking around JSR so I can learn and eventually publish my package to JSR. During this process, I was trying out the
deno doc --lintcommand and came across something that was confusing to me. I am not sure if this is a bug or not or if it is just me not fully understanding something.IssueOrPRRequestData.ts
I ran the command
deno doc --lintagainst a file namedIssueClient.ts. Doing this showed the following results:So with my understanding of the lint error, it is saying that
IssueOrPRRequestData.tsisprivateand notpublic. So this confuses me because I know for a fact that the interface is exported using theexportkeyword. I open the file of course discover that this is the case.Here is the IssueOrPRRequestData.ts file
So using my gut feeling, I converted the interface from an
exportto anexport defaultinterface like the below:I executed the
deno doc --lintcommand again and the lint error went away.Questions:
default exportsto get the doc linting to work.import { LabelModel } from "../deps.ts";LabelModel? How does this have anything to do withIssueOrPRRequestDatabeing public or private?exportandexport defaultboth considered public?I hope you can see my confusion here.
Of course, I could have missed it in the documents, and in this case, it is on me.
Any info on this matter would be great!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions