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
I'm using the JSON feature of TypeDoc.
After upgrading from 0.19.1 to 0.20.33, there are many "..." in the generated JSON.
For example, when running TypeDoc on this code...
/** * Test */publicdata: string[]=[]
...I'm getting this:
{
"name": "data",
"defaultValue": "...",
...
}
Expected Behavior
In 0.19.1, it used to be correct:
{
"name": "data",
"defaultValue": "[]",
...
}
EDIT
The "defaultValue: "..." also appears in following situations:
publicfoo: ()=>void=()=>""
public foo: number=this.bar// this.bar is another public property of the class (with default of 1).// TypeDoc 0.19.1 wrote "this.bar" as a hardcoded string, but 1 as number is correct IMHO.
Environment
Typedoc version: 0.20.33
TypeScript version: 4.0.2
Node.js version: 14.11.0
OS: macOS Catalina
The text was updated successfully, but these errors were encountered:
This is expected behavior - TypeDoc will only display initializers if it deems them simple enough to not cause catastrophically bad behavior. See #1288 for an example. Also see #1393 for an example plugin which overrides this behavior for object literals, and can be easily extended for other initializer types.
Okay... maybe one day an empty array [] or an empty object {} will be simple enough to "not cause catastrophically bad behavior". For now I'll gonna have to explain to my readers what "..." is.
Anyways, I appreciate your outstanding work. thanks!
I'm using the JSON feature of TypeDoc.
After upgrading from 0.19.1 to 0.20.33, there are many "..." in the generated JSON.
For example, when running TypeDoc on this code...
...I'm getting this:
Expected Behavior
In 0.19.1, it used to be correct:
EDIT
The
"defaultValue: "..."
also appears in following situations:Environment
The text was updated successfully, but these errors were encountered: