Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/converter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,10 @@ const typeOperatorConverter: TypeConverter<ts.TypeOperatorNode> = {
const args = context.checker
.getTypeArguments(type as ts.TypeReference)
.map((type) => convertType(context, type));

// TODO: wait for https://github.com/microsoft/TypeScript/issues/37711 and remove 'any' cast
const inner =
type.objectFlags & ts.ObjectFlags.Tuple
(context as any).checker.isTupleType(type)
? new TupleType(args)
: new ArrayType(args[0]);

Expand Down
7 changes: 7 additions & 0 deletions src/test/converter/class/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export class TestClass {
* arrow method
*/
arrowMethod = () => {};

/**
* methodWithComplexArgs short text.
*
* @param readonlyTuple
*/
methodWithComplexArgs(readonlyTuple: readonly [number, string]) {}
}

export class TestSubClass extends TestClass {
Expand Down
Loading