You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our codebase, we are using TypeDoc to generate a Gitbook. In the development environment, using that codebase we can preview the Gitbook generated by TypeDoc by installing relevant dependencies, building and serving the Gitbook with yarn; yarn run build; yarn gitbook serve and then viewing the Gitbook at http://localhost:4000. The production version of the GitBook is at published at https://polkadot.js.org/api/.
We encountered an issue, whereby if we apply TypeDoc to TypeScript Getters get and Setters set, TypeDoc doesn't appear to correctly recognise them and so does not render them correctly in the generated Gitbook pages.
For example, in the following code snippet we define a Getter with get provider () that returns the value of _provider:
However in Gitbook page it, whilst it correctly lists it under the heading "Accessors", it renders it as getprovider() instead
of get provider() (i.e. there's no space between, so it doesn't appear to be recognising the Getter correctly). See screenshot below:
So this is a problem because a user reading the the Gitbook documentation may think the method name is getprovider() when it's actually just provider()
We are using:
TypeScript 3.0.1
TypeDoc 0.12.0
The text was updated successfully, but these errors were encountered:
I tried looking into this issue myself. I looked through the Typedoc codebase to find where getters and setters are processed, and then added console.log's in the relevant parts of the JavaScript files of the node_modules/typedoc dependency in our codebase before building the Gitbook.
I found where it generates the method name of the getter on Line 172 of lib/models/reflections/declaration.ts and setter on Line 176 of lib/models/reflections/declaration.ts, and tried prepending a blank space in front of it. But it didn't render the blank space so somewhere else in the codebase trims the whitespace from the method name.
I tried using \u00A0 instead of just but it still didn't render. But when I prepended a letter accompanied before the space P it rendered and I could see what was being affected. See the rendered output and associated code changes below:
It would be more ideal to just add a blank space after the get and set , since prepending the blank space before the method name instead causes the blank space to appear with the method name everywhere else that the method name is rendered (as shown in the screenshot).
In our codebase, we are using TypeDoc to generate a Gitbook. In the development environment, using that codebase we can preview the Gitbook generated by TypeDoc by installing relevant dependencies, building and serving the Gitbook with
yarn; yarn run build; yarn gitbook serve
and then viewing the Gitbook at http://localhost:4000. The production version of the GitBook is at published at https://polkadot.js.org/api/.We encountered an issue, whereby if we apply TypeDoc to TypeScript Getters
get
and Settersset
, TypeDoc doesn't appear to correctly recognise them and so does not render them correctly in the generated Gitbook pages.For example, in the following code snippet we define a Getter with
get provider ()
that returns the value of_provider
:However in Gitbook page it, whilst it correctly lists it under the heading "Accessors", it renders it as
getprovider()
insteadof
get provider()
(i.e. there's no space between, so it doesn't appear to be recognising the Getter correctly). See screenshot below:So this is a problem because a user reading the the Gitbook documentation may think the method name is
getprovider()
when it's actually justprovider()
We are using:
The text was updated successfully, but these errors were encountered: