dsherret / ts-type-info

TypeScript AST and code generator [Deprecated]
MIT License
94 stars 8 forks source link

Interface documentation is not being generated #235

Closed wjheesen closed 7 years ago

wjheesen commented 7 years ago

Example:

import * as TsTypeInfo from "ts-type-info";

let file = TsTypeInfo.createFile();

let myInterface = file.addInterface({
    name: 'MyInterface',
    documentationComment: 'Comment for MyInterface.'
});

myInterface.addProperty({
    name: 'MyProperty',
    documentationComment: `Comment for MyProperty.`
})

console.log(file.write())

Output:

interface MyInterface {
    MyProperty: any;
}

Expected output:

/**
 * Comment for MyInterface.
 */
interface MyInterface {
    /**
     * Comment for MyProperty.
     */
    MyProperty: any;
}
dsherret commented 7 years ago

This was fixed in #226. Unfortunately I didn't properly document the fix because at the time I was considering to move the writing code off into a separately library, but I ended up not doing that in the end.

Anyway, this will be in v7.0. I'm planning to do a release sometime this week or next. I'll comment back here when that's done.

dsherret commented 7 years ago

v7.0 is released now. Let me know if this is still a problem.