run prettier formatting
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -186,8 +186,7 @@ describe('ApiDocGenerator', () => {
|
||||
type: 'method',
|
||||
name: 'z',
|
||||
path: 'MyApiType.z',
|
||||
text:
|
||||
'z(a: Promise<readonly [{k: MySecondSubType}[]]>): Array<MyThirdSubType>',
|
||||
text: 'z(a: Promise<readonly [{k: MySecondSubType}[]]>): Array<MyThirdSubType>',
|
||||
docs: ['Multiple', 'JsDoc', 'Comments'],
|
||||
links: [
|
||||
{
|
||||
|
||||
@@ -127,9 +127,9 @@ export default class ApiDocGenerator {
|
||||
);
|
||||
const docs = this.getNodeDocs(declaration);
|
||||
|
||||
const membersAndTypes = Array.from(
|
||||
interfaceMembers.values(),
|
||||
).flatMap(fieldSymbol => this.getMemberInfo(name, fieldSymbol));
|
||||
const membersAndTypes = Array.from(interfaceMembers.values()).flatMap(
|
||||
fieldSymbol => this.getMemberInfo(name, fieldSymbol),
|
||||
);
|
||||
|
||||
const members = membersAndTypes.map(t => t.member);
|
||||
const dependentTypes = this.flattenTypes(
|
||||
@@ -174,9 +174,8 @@ export default class ApiDocGenerator {
|
||||
): { member: FieldInfo; dependentTypes: TypeInfo[] } {
|
||||
const declaration = symbol.valueDeclaration;
|
||||
|
||||
const { links, infos: dependentTypes } = this.findAllTypeReferences(
|
||||
declaration,
|
||||
);
|
||||
const { links, infos: dependentTypes } =
|
||||
this.findAllTypeReferences(declaration);
|
||||
|
||||
let type: FieldInfo['type'] = 'prop';
|
||||
if (
|
||||
|
||||
@@ -92,9 +92,7 @@ export default class TypeLocator {
|
||||
return result as { [key in T]: ExportedInstance[] };
|
||||
}
|
||||
|
||||
private getExportedConstructorDeclaration(
|
||||
node: ts.Node,
|
||||
):
|
||||
private getExportedConstructorDeclaration(node: ts.Node):
|
||||
| {
|
||||
constructorType: ts.Type;
|
||||
args: ts.Expression[];
|
||||
|
||||
@@ -78,9 +78,10 @@ export default class TypescriptHighlighter implements Highlighter {
|
||||
|
||||
// Order here is important, e.g. comments must be first to avoid string literals inside comments being highlighted
|
||||
return TypescriptHighlighter.highlighters
|
||||
.reduce((parts, highlighter) => parts.flatMap(painter(...highlighter)), [
|
||||
{ text: fullText },
|
||||
])
|
||||
.reduce(
|
||||
(parts, highlighter) => parts.flatMap(painter(...highlighter)),
|
||||
[{ text: fullText }],
|
||||
)
|
||||
.map(({ text }) => text)
|
||||
.join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user